Package org.ytreza.mock

Examples of org.ytreza.mock.MockModelWithField


  public void tearDown() throws Exception {
  }

  @Test
  public void testAfterCreation(){
    MockModelWithField model = table.createItem();
    assertFalse("model is updated after creation", model.isUpdated());
    assertTrue("value of model is initialised after creation", model.fieldDate.isNotInitialized());
  }
View Full Code Here


    assertTrue("value of model is initialised after creation", model.fieldDate.isNotInitialized());
  }
 
  @Test
  public void testSetValue(){
    MockModelWithField model = table.createItem();
    Date initialValue = new GregorianCalendar(1984, Calendar.MARCH,16).getTime();
    model.fieldDate.setValue(initialValue);
    assertTrue("model is not updated", model.isUpdated());
    assertFalse("value of model is not initialised after set", model.fieldDate.isNotInitialized());
    assertEquals("value are not equals", model.fieldDate.getValue(), initialValue);
  }
View Full Code Here

    assertEquals("value are not equals", model.fieldDate.getValue(), initialValue);
  }
 
  @Test
  public void testInitValue(){
    MockModelWithField model = table.createItem();
    Date initialValue = new GregorianCalendar(1984, Calendar.MARCH,16).getTime();
    model.fieldDate.writeValue(initialValue);
    assertFalse("model is updated", model.isUpdated());
    assertFalse("value of model is not initialised after init", model.fieldDate.isNotInitialized());
    assertEquals("value are not equals", model.fieldDate.getValue(), initialValue);
  }
View Full Code Here

  public void tearDown() throws Exception {
  }
 
  @Test
  public void testAfterCreation() {
    MockModelWithField model = table.createItem();
    assertFalse("model is updated after creation", model.isUpdated());
    assertTrue("value of model is initialised after creation", model.fieldString.isNotInitialized());
  }
View Full Code Here

    assertTrue("value of model is initialised after creation", model.fieldString.isNotInitialized());
  }
 
  @Test
  public void testSetValue() {
    MockModelWithField model = table.createItem();
    String initialValue = "coucou";
    model.fieldString.setValue(initialValue);
    assertTrue("model is not updated", model.isUpdated());
    assertFalse("value of model is not initialised after set", model.fieldString.isNotInitialized());
    assertEquals("value are not equals", model.fieldString.getValue(), initialValue);
  }
View Full Code Here

    assertEquals("value are not equals", model.fieldString.getValue(), initialValue);
  }
 
  @Test
  public void testInitValue() {
    MockModelWithField model = table.createItem();
    String initialValue = "coucou";
    model.fieldString.writeValue(initialValue);
    assertFalse("model is updated", model.isUpdated());
    assertFalse("value of model is not initialised after init", model.fieldString.isNotInitialized());
    assertEquals("value are not equals", model.fieldString.getValue(), initialValue);
  }
View Full Code Here

    assertEquals("value are not equals", model.fieldString.getValue(), initialValue);
  }
 
  @Test
  public void testGetValue() throws ItemException, UnregisteredTableError, UnableToInitializeException {
    MockModelWithField model = table.getItem(1);
    Print.print(model.fieldString.getValue());
    assertFalse(model.fieldString.getValue().equals(""));
  }
View Full Code Here

TOP

Related Classes of org.ytreza.mock.MockModelWithField

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.