Exemplo n.º 1
0
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.birt.report.model.metadata.PropertyTypeTestCase#testToXml()
   */
  public void testToXml() {
    assertEquals(null, type.toXml(design, propDefn, null));
    calendar.set(2004, Calendar.OCTOBER, 18);

    String value = type.toXml(design, propDefn, calendar.getTime());

    // in format "yyyy-MM-dd HH:mm:ss"
    int index = value.indexOf(" "); // $NON-NLS-1$
    value = value.substring(0, index);

    assertEquals("2004-10-18", value); // $NON-NLS-1$
  }