use of com.mercedesbenz.sechub.docgen.DocAnnotationData in project sechub by mercedes-benz.
the class ScheduleDescriptionGeneratorTest method when_collector_returns_one_entry_but_not_with_spring_value_1_result_is_empty.
@Test
public void when_collector_returns_one_entry_but_not_with_spring_value_1_result_is_empty() throws Exception {
/* prepare */
DocAnnotationData a = new DocAnnotationData();
List<DocAnnotationData> list = new ArrayList<>();
list.add(a);
when(collector.fetchMustBeDocumentParts()).thenReturn(list);
/* execute */
String generated = generatorToTest.generate(collector);
/* test */
assertNotNull(generated);
assertTrue(generated.isEmpty());
}
use of com.mercedesbenz.sechub.docgen.DocAnnotationData in project sechub by mercedes-benz.
the class ScheduleDescriptionGeneratorTest method when_collector_returns_one_entry_with_spring_scheduled_a_table_is_build.
@Test
public void when_collector_returns_one_entry_with_spring_scheduled_a_table_is_build() throws Exception {
/* prepare */
DocAnnotationData a = new DocAnnotationData();
a.springScheduled = mock(Scheduled.class);
when(a.springScheduled.cron()).thenReturn("cronjob");
List<DocAnnotationData> list = new ArrayList<>();
list.add(a);
when(collector.fetchMustBeDocumentParts()).thenReturn(list);
/* execute */
String generated = generatorToTest.generate(collector);
/* test */
assertNotNull(generated);
assertFalse(generated.isEmpty());
assertTrue(generated.indexOf("|===") != -1);
}
use of com.mercedesbenz.sechub.docgen.DocAnnotationData in project sechub by mercedes-benz.
the class ScheduleDescriptionGeneratorTest method when_collector_returns_one_entry_with_spring_value_1_result_is_empty.
@Test
public void when_collector_returns_one_entry_with_spring_value_1_result_is_empty() throws Exception {
/* prepare */
DocAnnotationData a = new DocAnnotationData();
a.springValue = "${something}";
a.description = "the description";
List<DocAnnotationData> list = new ArrayList<>();
list.add(a);
when(collector.fetchMustBeDocumentParts()).thenReturn(list);
/* execute */
String generated = generatorToTest.generate(collector);
/* test */
assertNotNull(generated);
assertTrue(generated.isEmpty());
}
use of com.mercedesbenz.sechub.docgen.DocAnnotationData in project sechub by mercedes-benz.
the class SystemPropertiesDescriptionGeneratorTest method when_list_contains_one_entry_but_not_with_spring_value_1_result_is_empty.
@Test
public void when_list_contains_one_entry_but_not_with_spring_value_1_result_is_empty() throws Exception {
/* prepare */
DocAnnotationData a = new DocAnnotationData();
List<DocAnnotationData> list = new ArrayList<>();
list.add(a);
/* execute */
String generated = generatorToTest.generate(list);
/* test */
assertNotNull(generated);
assertTrue(generated.isEmpty());
}
Aggregations