Exemplo n.º 1
0
 @Test
 public void durationFrom2() {
   Timestamp reference = Timestamp.now();
   assertThat(
       reference.minus(TimeDuration.ofNanos(10)).durationFrom(reference),
       equalTo(TimeDuration.ofNanos(-10)));
 }
Exemplo n.º 2
0
 @Test
 public void durationBetween2() {
   Timestamp reference = Timestamp.now();
   assertThat(
       reference.durationBetween(reference.minus(TimeDuration.ofNanos(10))),
       equalTo(TimeDuration.ofNanos(10)));
 }
Exemplo n.º 3
0
 @Test
 public void testHistoricalBrowseRecordIsSameAsHistoricalFetchDescribe() {
   long record = TestData.getLong();
   client.add("a", 1, record);
   client.add("a", 2, record);
   client.add("a", 3, record);
   client.add("b", 1, record);
   client.add("b", 2, record);
   client.add("b", 3, record);
   client.remove("a", 2, record);
   Timestamp timestamp = Timestamp.now();
   client.add("c", 1, record);
   client.add("c", 2, record);
   client.add("c", 3, record);
   client.add("d", 1, record);
   client.add("d", 2, record);
   client.add("d", 3, record);
   client.remove("c", 2, record);
   Assert.assertEquals(
       client.browse(record, timestamp),
       client.fetch(client.describe(record, timestamp), record, timestamp));
 }