Package com.enragedginger.stephenerialization.sandwich

Examples of com.enragedginger.stephenerialization.sandwich.Sandwich


 
  @Test
  public void readVersion20120927() throws Exception {
    String version = "20120927";
    ObjectInputStream input = TestStreamBuilder.createInputStream(className, version);
    Sandwich actualSandwich = (Sandwich) input.readObject();
    input.close();
    assertEquals(sandwich.getSlicesOfBread(), actualSandwich.getSlicesOfBread());
    assertEquals(sandwich.getSesameSeeds(), actualSandwich.getSesameSeeds());
    assertEquals(sandwich.getSlicesOfMeat(), actualSandwich.getSlicesOfMeat());
    assertEquals(sandwich.getMolecules(), actualSandwich.getMolecules());
    assertEquals(0, actualSandwich.getPrice(), 0.0);
    assertEquals(0, actualSandwich.getSize());
    assertEquals(null, actualSandwich.getName());
  }
View Full Code Here


 
  @Test
  public void readVersion20120928() throws Exception {
    String version = "20120928";
    ObjectInputStream input = TestStreamBuilder.createInputStream(className, version);
    Sandwich actualSandwich = (Sandwich) input.readObject();
    input.close();
    assertEquals(sandwich.getSlicesOfBread(), actualSandwich.getSlicesOfBread());
    assertEquals(sandwich.getSesameSeeds(), actualSandwich.getSesameSeeds());
    assertEquals(sandwich.getSlicesOfMeat(), actualSandwich.getSlicesOfMeat());
    assertEquals(sandwich.getMolecules(), actualSandwich.getMolecules());
    assertEquals(sandwich.getPrice(), actualSandwich.getPrice(), 0.0);
    assertEquals(sandwich.getSize(), actualSandwich.getSize());
    assertEquals(null, actualSandwich.getName());
  }
View Full Code Here

 
  @Test
  public void readVersion20121001() throws Exception {
    String version = "20121001";
    ObjectInputStream input = TestStreamBuilder.createInputStream(className, version);
    Sandwich actualSandwich = (Sandwich) input.readObject();
    input.close();
    assertEquals(sandwich.getSlicesOfBread(), actualSandwich.getSlicesOfBread());
    assertEquals(sandwich.getSesameSeeds(), actualSandwich.getSesameSeeds());
    assertEquals(sandwich.getSlicesOfMeat(), actualSandwich.getSlicesOfMeat());
    assertEquals(sandwich.getMolecules(), actualSandwich.getMolecules());
    assertEquals(sandwich.getPrice(), actualSandwich.getPrice(), 0.0);
    assertEquals(sandwich.getSize(), actualSandwich.getSize());
    assertEquals(sandwich.getName(), actualSandwich.getName());
  }
View Full Code Here

  /**
   * Run setup prior to each test.
   */
  @Before
  public void setup() {
    sandwich = new Sandwich();
    sandwich.setMolecules(8675309L);
    sandwich.setName("Turkey Club");
    sandwich.setPrice(5.99);
    sandwich.setSesameSeeds((byte) 30);
    sandwich.setSize('M');
View Full Code Here

    String version = String.valueOf(annotation.version());
    ObjectOutputStream output = TestStreamBuilder.createOutputStream(className, version);
    output.writeObject(sandwich);
    output.close();
    ObjectInputStream input = TestStreamBuilder.createInputStream(className, version);
    Sandwich actualSandwich = (Sandwich) input.readObject();
    input.close();
    assertEquals(sandwich.getSlicesOfBread(), actualSandwich.getSlicesOfBread());
    assertEquals(sandwich.getSesameSeeds(), actualSandwich.getSesameSeeds());
    assertEquals(sandwich.getSlicesOfMeat(), actualSandwich.getSlicesOfMeat());
    assertEquals(sandwich.getMolecules(), actualSandwich.getMolecules());
    assertEquals(sandwich.getPrice(), actualSandwich.getPrice(), 0.0);
    assertEquals(sandwich.getSize(), actualSandwich.getSize());
    assertEquals(sandwich.getName(), actualSandwich.getName());
  }
View Full Code Here

 
  @Test
  public void readVersion20120926() throws Exception {
    String version = "20120926";
    ObjectInputStream input = TestStreamBuilder.createInputStream(className, version);
    Sandwich actualSandwich = (Sandwich) input.readObject();
    input.close();
    assertEquals(sandwich.getSlicesOfBread(), actualSandwich.getSlicesOfBread());
    assertEquals(sandwich.getSesameSeeds(), actualSandwich.getSesameSeeds());
    assertEquals(0, actualSandwich.getSlicesOfMeat());
    assertEquals(0, actualSandwich.getMolecules());
    assertEquals(0, actualSandwich.getPrice(), 0.0);
    assertEquals(0, actualSandwich.getSize());
    assertEquals(null, actualSandwich.getName());
  }
View Full Code Here

TOP

Related Classes of com.enragedginger.stephenerialization.sandwich.Sandwich

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.