ParametrizedWidgetFactory { public boolean isSupported(ContractInput input) { return inputTypeResolver.isSupported(input); } ParametrizedWidgetFactory(); AbstractParametrizedWidget createParametrizedWidget(ContractInput input); boolean isSupported(ContractInput input); WidgetContainer createWidgetContainer(ContractInput contractInput); WidgetContainer createWidgetContainer(); TitleWidget createTitle(String title); TitleWidget createTitle(ContractInput input); ButtonWidget createSubmitButton(ButtonAction actionType); ButtonWidget createAddButton(ContractInput contractInput); ButtonWidget createRemoveButton(); LinkWidget createLink(String text, String url, ButtonStyle style); static final String ITEM_ITERATOR; }
@Test public void text_contract_input_is_supported() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aStringContractInput("name")); assertThat(isSupported).isTrue(); }
@Test public void integer_contract_input_is_supported() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(anIntegerContractInput("age")); assertThat(isSupported).isTrue(); }
@Test public void should_be_supported_date_contract_input() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aLocalDateContractInput("creationDate")); assertThat(isSupported).isTrue(); }
@Test public void should_be_supported_local_date_contract_input() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aLocalDateContractInput("creationLocalDate")); assertThat(isSupported).isTrue(); }
@Test public void should_be_supported_local_date_time_contract_input() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aLocalDateTimeContractInput("creationLocalDateTime")); assertThat(isSupported).isTrue(); }
@Test public void should_be_supported_local_offset_date_time_contract_input() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aLocalDateTimeContractInput("creationOffsetDateTime")); assertThat(isSupported).isTrue(); }
@Test public void file_contract_input_is_supported() throws Exception { ParametrizedWidgetFactory elementFactory = createFactory(); boolean isSupported = elementFactory.isSupported(aFileContractInput("document")); assertThat(isSupported).isTrue(); }