Examples of MockDomainObject


Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

       
        // initialized calendar
        calendar = GregorianCalendar.getInstance();
       
        // mock domain object
        mockDomainObject = new MockDomainObject();
       
        // instanciate temporal map
        temporalDomainMap = new BasicTemporalDomainMapImpl(new HashMap(), mockDomainObject);
       
    }
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

        // date
        calendar.set(Calendar.MILLISECOND, calendar.get(Calendar.MILLISECOND) + 1);
        Date date = calendar.getTime();
       
        MockDomainObject mockDomainObject1 = new MockDomainObject();
        MockDomainObject mockDomainObject2 = new MockDomainObject();

        temporalDomainMap.putVersion(date, mockDomainObject1);
       
        temporalDomainMap.putVersion(date, mockDomainObject2);
       
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

        //date
        calendar.set(Calendar.MILLISECOND, calendar.get(Calendar.MILLISECOND) + 1);
        Date date = calendar.getTime();
       
        // domainOject
        MockDomainObject mockDomainObject = new MockDomainObject();
       
        temporalDomainMap.putVersion(date,mockDomainObject);
       
        assertEquals("putVersion", 2, temporalDomainMap.getMap().size());
       
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

        calendar.set(Calendar.MILLISECOND, calendar.get(Calendar.MILLISECOND) + 1);
       
        Date date = calendar.getTime();
       
        MockDomainObject mockDomainObject = new MockDomainObject();
       
        temporalDomainMap.putVersion(date, mockDomainObject);
       
        assertEquals("getLatest", mockDomainObject, temporalDomainMap.getLatest());
        assertEquals("getMapSize", 2, temporalDomainMap.getMap().size());
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

        Date date1 = calendar.getTime();
       
        calendar.set(Calendar.MILLISECOND, calendar.get(Calendar.MILLISECOND) + 1);
        Date date2 = calendar.getTime();
       
        MockDomainObject mockDomainObject1 = new MockDomainObject();
        MockDomainObject mockDomainObject2 = new MockDomainObject();
       
        temporalDomainMap.putVersion(date1, mockDomainObject1);
        temporalDomainMap.putVersion(date2, mockDomainObject2);
       
        assertEquals("getLatest", mockDomainObject2, temporalDomainMap.getLatest());
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

        Date date2 = calendar.getTime();

        calendar.set(Calendar.MILLISECOND, calendar.get(Calendar.MILLISECOND) + 1);
        Date date3 = calendar.getTime();
       
        MockDomainObject mockDomainObject1 = new MockDomainObject();
        MockDomainObject mockDomainObject2 = new MockDomainObject();
        MockDomainObject mockDomainObject3 = new MockDomainObject();
       
       
        temporalDomainMap.putVersion(date1, mockDomainObject1);
        temporalDomainMap.putVersion(date2, mockDomainObject2);
        temporalDomainMap.putVersion(date3, mockDomainObject3);
View Full Code Here

Examples of net.sf.pmr.keopsframework.domain.object.MockDomainObject

    public final void testGetMapAndModifyMap() {
       
        Map map = temporalDomainMap.getMap();
       
        try {
            map.put(new Date(), new MockDomainObject());
            fail("should throw a UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
        }
       
    }
View Full Code Here

Examples of org.apache.wicket.util.tester.MockFormPage.MockDomainObject

  @Test
  public void formTester()
  {
    tester.startPage(MockFormPage.class);
    MockFormPage page = (MockFormPage)tester.getLastRenderedPage();
    MockDomainObject domainObject = page.getDomainObject();

    assertNotNull(domainObject);
    assertNull(domainObject.getText());
    assertNull(domainObject.getTextarea());
    assertFalse(domainObject.isCheckbox());

    FormTester formTester = tester.newFormTester("form");
    formTester.setValue("text", "Mock text value");
    formTester.setValue("textarea", "Mock textarea value");
    formTester.setValue("checkbox", "true");
    formTester.submit();

    assertNotNull(domainObject);
    assertNotNull(domainObject.getText());
    assertNotNull(domainObject.getTextarea());
    assertTrue(domainObject.isCheckbox());
  }
View Full Code Here

Examples of org.apache.wicket.util.tester.MockFormPage.MockDomainObject

  @Test
  public void checkboxValuesCanBeSelectedWithBoolean()
  {
    tester.startPage(MockFormPage.class);
    MockFormPage page = (MockFormPage)tester.getLastRenderedPage();
    MockDomainObject domainObject = page.getDomainObject();
    assertFalse(domainObject.isCheckbox());

    FormTester formTester = tester.newFormTester("form");
    formTester.setValue("checkbox", true);
    formTester.submit();
    assertTrue(domainObject.isCheckbox());

    formTester = tester.newFormTester("form");
    formTester.setValue("checkbox", false);
    formTester.submit();
    assertFalse(domainObject.isCheckbox());
  }
View Full Code Here

Examples of org.apache.wicket.util.tester.MockFormPage.MockDomainObject

   */
  public void testFormTester()
  {
    tester.startPage(MockFormPage.class);
    MockFormPage page = (MockFormPage)tester.getLastRenderedPage();
    MockDomainObject domainObject = page.getDomainObject();

    assertNotNull(domainObject);
    assertNull(domainObject.getText());
    assertNull(domainObject.getTextarea());
    assertFalse(domainObject.isCheckbox());

    FormTester formTester = tester.newFormTester("form");
    formTester.setValue("text", "Mock text value");
    formTester.setValue("textarea", "Mock textarea value");
    formTester.setValue("checkbox", "true");
    formTester.submit();

    assertNotNull(domainObject);
    assertNotNull(domainObject.getText());
    assertNotNull(domainObject.getTextarea());
    assertTrue(domainObject.isCheckbox());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.