コード例 #1
0
  /**
   * Test method for
   * org.ccnx.ccn.profiles.VersioningProfile#addVersion(org.ccnx.ccn.protocol.ContentName,
   * java.sql.Timestamp).
   */
  @Test
  public void testVersionNameContentNameTimestamp() {
    /* try with length 2 contentname */
    CCNTime ts = new CCNTime(1000);
    ts.setNanos(15722656);

    ContentName name = VersioningProfile.addVersion(abName, ts);
    if (!name.equals(abvName)) fail("timestamp encode version failed");
  }
コード例 #2
0
ファイル: TextXMLCodecTest.java プロジェクト: remap/ws-ndn
  @Test
  public void testParseDateTime() {
    Log.info(Log.FAC_TEST, "Starting testParseDateTime");

    CCNTime now = CCNTime.now();
    testDateTime(now);

    now.setNanos(384);
    testDateTime(now);

    now.setNanos(1105384);
    testDateTime(now);
    now.setNanos(550105384);
    testDateTime(now);
    now.setNanos(550000000);

    testDateTime(now);
    now.setNanos(953405384);
    testDateTime(now);

    now.setNanos(110672800);
    testDateTime(now);

    Log.info(Log.FAC_TEST, "Completed testParseDateTime");
  }