/** This method tests the {@code isNull} assertion method. */ @Test @NeedReload public void test_is_null() { Table table = new Table(source, "test2"); Changes changes = new Changes(table).setStartPointNow(); update("update test2 set var14 = 1 where var1 is null"); changes.setEndPointNow(); ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isNull(); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(1); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isNull(); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); }
/** This method tests the {@code isBefore} assertion method. */ @Test @NeedReload public void test_is_before() throws ParseException { Table table = new Table(source, "test"); Changes changes = new Changes(table).setStartPointNow(); update("update test set var14 = 1 where var1 = 1"); changes.setEndPointNow(); ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isBefore(DateTimeValue.parse("2014-05-24T09:46:31")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isBefore(DateTimeValue.parse("2014-05-24T09:46:31")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); }
/** This method tests the {@code isCloseTo} assertion method. */ @Test @NeedReload public void test_is_close_to() { Table table = new Table(source, "test"); Changes changes = new Changes(table).setStartPointNow(); update("update test set var14 = 1 where var1 = 1"); changes.setEndPointNow(); ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isCloseTo( DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), TimeValue.of(0, 0, 0)); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isCloseTo( DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), TimeValue.of(0, 0, 0)); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); }