Package org.apache.ws.jaxme.util

Examples of org.apache.ws.jaxme.util.Duration


    cal.set(Calendar.MONTH, 11);
    cal.set(Calendar.YEAR, 2002);
    return cal;
  }
  public Duration getDuration() {
    Duration d = new Duration(1, 2, 3, 4, 5, 6.7);
    return d;
  }
View Full Code Here


  /**
   * Tests that toString returns an appropriate xsd:duration value
   */
  public void testImplicitToString() {
      String dur2 = "PT2M60S";
      Duration duration2 = Duration.valueOf(dur2);
      String actualReturn = duration2.toString();
      String expect = "P0Y0M0DT0H2M60S";
      assertEquals("return value not as expected ", expect, actualReturn);
  }
View Full Code Here

   * Test that getMillis returns the total time of duration in
   milliseconds
   */
  public void testMillis() {
      String dur2 = "PT2M60S";
      Duration duration2 = Duration.valueOf(dur2);
      assertEquals(2, duration2.getMinutes());
      assertEquals(60, duration2.getSeconds());
  }
View Full Code Here

    cal.set(Calendar.MILLISECOND, 0);
    return cal;
  }

  protected Duration getDuration() {
    Duration d = new Duration(false, 1, 2, 3, 4, 5, 6, 7);
    return d;
  }
View Full Code Here

  /**
   * Tests that toString returns an appropriate xsd:duration value
   */
  public void testExplicitToString() {
      String dur1 = "P0Y0M0DT0H2M60S";
      Duration duration1 = Duration.valueOf(dur1);
      String actualReturn = duration1.toString();
      assertEquals("return value not as expected", dur1, actualReturn);
  }
View Full Code Here

    cal.set(Calendar.MILLISECOND, 0);
    return cal;
  }

  protected Duration getDuration() {
    Duration d = new Duration(false, 1, 2, 3, 4, 5, 6, 7);
    return d;
  }
View Full Code Here

  /**
   * Tests that toString returns an appropriate xsd:duration value
   */
  public void testExplicitToString() {
      String dur1 = "P0Y0M0DT0H2M60S";
      Duration duration1 = Duration.valueOf(dur1);
      String actualReturn = duration1.toString();
      assertEquals("return value not as expected", dur1, actualReturn);
  }
View Full Code Here

  /**
   * Tests that toString returns an appropriate xsd:duration value
   */
  public void testImplicitToString() {
      String dur2 = "PT2M60S";
      Duration duration2 = Duration.valueOf(dur2);
      String actualReturn = duration2.toString();
      String expect = "P0Y0M0DT0H2M60S";
      assertEquals("return value not as expected ", expect, actualReturn);
  }
View Full Code Here

   * Test that getMillis returns the total time of duration in
   milliseconds
   */
  public void testMillis() {
      String dur2 = "PT2M60S";
      Duration duration2 = Duration.valueOf(dur2);
      assertEquals(2, duration2.getMinutes());
      assertEquals(60, duration2.getSeconds());
  }
View Full Code Here

    cal.set(Calendar.MILLISECOND, 0);
    return cal;
  }

  protected Duration getDuration() {
    Duration d = new Duration(false, 1, 2, 3, 4, 5, 6, 7);
    return d;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.util.Duration

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.