@Test public void test_adapt() throws Exception { assertThat(action.adapt((ColumnMetadata) null), is(action)); ColumnMetadata column = column().name("myColumn").id(0).type(Type.DATE).build(); assertThat(action.adapt(column), is(action)); }
@PostConstruct public void init() { action = (FillWithValue) action.adapt(ColumnMetadata.Builder.column().type(Type.DATE).build()); }
@Test public void should_not_accept_column() { assertFalse(action.acceptField(getColumn(Type.NUMERIC))); assertFalse(action.acceptField(getColumn(Type.ANY))); }
@Test public void should_have_expected_behavior() { assertEquals(1, action.getBehavior().size()); assertTrue(action.getBehavior().contains(ActionDefinition.Behavior.VALUES_COLUMN)); }
@Test public void should_accept_column() { assertTrue(action.acceptField(getColumn(Type.DATE))); }