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