Package org.bifrost.xmlio.test.helpers

Examples of org.bifrost.xmlio.test.helpers.TestHelperDate


    ObjectMap omap = new ObjectMap("TestHelperDate", "TestHelperDate", plist);
    config.addObjectMap(omap);
   
    CharArrayWriter output = new CharArrayWriter();
    assertNotNull(output);
    TestHelperDate helper = new TestHelperDate();
    assertNotNull(helper);
   
    Calendar cal = new GregorianCalendar();
    cal.set(Calendar.YEAR, 2003);
    cal.set(Calendar.MONTH, 9);
    cal.set(Calendar.DAY_OF_MONTH, 20);
    cal.set(Calendar.HOUR_OF_DAY, 10);
    cal.set(Calendar.MINUTE, 32);
    helper.setCreated(new Timestamp(cal.getTime().getTime()));

    cal = new GregorianCalendar();
    cal.set(Calendar.YEAR, 2002);
    cal.set(Calendar.MONTH, 5);
    cal.set(Calendar.DAY_OF_MONTH, 16);
    helper.setStartDate(cal.getTime());
   
    cal = new GregorianCalendar();
    cal.set(Calendar.HOUR_OF_DAY, 10);
    cal.set(Calendar.MINUTE, 32);
    cal.set(Calendar.SECOND, 54);
    helper.setStartTime(cal.getTime());

    cal = new GregorianCalendar();
    cal.set(Calendar.HOUR_OF_DAY, 23);
    cal.set(Calendar.MINUTE, 4);
    cal.set(Calendar.SECOND, 47);
    helper.setEndTime(cal.getTime());

    GregorianCalendar gcal = new GregorianCalendar();
    gcal.set(Calendar.YEAR, 2002);
    gcal.set(Calendar.MONTH, 8);
    gcal.set(Calendar.DAY_OF_MONTH, 21);
    gcal.set(Calendar.HOUR_OF_DAY, 23);
    gcal.set(Calendar.MINUTE, 47);
    gcal.set(Calendar.SECOND, 34);
    helper.setCalendar(gcal);

    Diff myDiff = null;
    try
    {
      XmlWriter xmlWriter = new XmlWriter(output);
View Full Code Here

TOP

Related Classes of org.bifrost.xmlio.test.helpers.TestHelperDate

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.