use of io.spine.server.entity.storage.given.ColumnTestEnv.TestEntity in project core-java by SpineEventEngine.
the class ColumnShould method check_value_if_getter_is_not_null.
@Test(expected = NullPointerException.class)
public void check_value_if_getter_is_not_null() {
final EntityColumn column = forMethod("getNotNull", TestEntity.class);
column.getFor(new TestEntity(""));
}
use of io.spine.server.entity.storage.given.ColumnTestEnv.TestEntity in project core-java by SpineEventEngine.
the class ColumnShould method allow_nulls_if_getter_is_nullable.
@Test
public void allow_nulls_if_getter_is_nullable() {
final EntityColumn column = forMethod("getNull", TestEntity.class);
final Object value = column.getFor(new TestEntity(""));
assertNull(value);
}
use of io.spine.server.entity.storage.given.ColumnTestEnv.TestEntity in project core-java by SpineEventEngine.
the class ColumnShould method memoize_value_regarding_nulls.
@Test
public void memoize_value_regarding_nulls() {
final EntityColumn nullableColumn = forMethod("getNull", TestEntity.class);
final MemoizedValue memoizedNull = nullableColumn.memoizeFor(new TestEntity(""));
assertTrue(memoizedNull.isNull());
assertNull(memoizedNull.getValue());
}
Aggregations