Beispiel #1
0
 @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));
 }
Beispiel #2
0
 @PostConstruct
 public void init() {
   action = (FillWithValue) action.adapt(ColumnMetadata.Builder.column().type(Type.DATE).build());
 }
Beispiel #3
0
 @Test
 public void should_not_accept_column() {
   assertFalse(action.acceptField(getColumn(Type.NUMERIC)));
   assertFalse(action.acceptField(getColumn(Type.ANY)));
 }
Beispiel #4
0
 @Test
 public void should_have_expected_behavior() {
   assertEquals(1, action.getBehavior().size());
   assertTrue(action.getBehavior().contains(ActionDefinition.Behavior.VALUES_COLUMN));
 }
Beispiel #5
0
 @Test
 public void should_accept_column() {
   assertTrue(action.acceptField(getColumn(Type.DATE)));
 }