use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class ViewFacadeTest method itShouldListEntityExcerptsForAllViewsInDB.
@Test
@MongoDBFixtures("ViewFacadeTest.json")
public void itShouldListEntityExcerptsForAllViewsInDB() {
final ViewDTO viewDTO = viewService.get(viewId).orElseThrow(() -> new NotFoundException("Missing view with id: " + viewId));
final EntityExcerpt entityExcerpt = EntityExcerpt.builder().title(viewDTO.title()).id(ModelId.of(viewId)).type(ModelTypes.SEARCH_V1).build();
final Set<EntityExcerpt> entityExcerpts = facade.listEntityExcerpts();
assertThat(entityExcerpts).hasSize(1).contains(entityExcerpt);
}
use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class LookupTableFacadeTest method listEntityExcerpts.
@Test
@MongoDBFixtures("LookupTableFacadeTest.json")
public void listEntityExcerpts() {
final EntityExcerpt expectedEntityExcerpt = EntityExcerpt.builder().id(ModelId.of("5adf24dd4b900a0fdb4e530d")).type(ModelTypes.LOOKUP_TABLE_V1).title("HTTP DSV without Cache").build();
final Set<EntityExcerpt> entityExcerpts = facade.listEntityExcerpts();
assertThat(entityExcerpts).containsOnly(expectedEntityExcerpt);
}
use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class PipelineFacadeTest method listEntityExcerpts.
@Test
@MongoDBFixtures("PipelineFacadeTest/pipelines.json")
public void listEntityExcerpts() {
final EntityExcerpt expectedEntityExcerpt = EntityExcerpt.builder().id(ModelId.of("5a85c4854b900afd5d662be3")).type(ModelTypes.PIPELINE_V1).title("Test").build();
final Set<EntityExcerpt> entityExcerpts = facade.listEntityExcerpts();
assertThat(entityExcerpts).containsOnly(expectedEntityExcerpt);
}
use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class LookupDataAdapterFacadeTest method listEntityExcerpts.
@Test
@MongoDBFixtures("LookupDataAdapterFacadeTest.json")
public void listEntityExcerpts() {
final EntityExcerpt expectedEntityExcerpt = EntityExcerpt.builder().id(ModelId.of("5adf24a04b900a0fdb4e52c8")).type(ModelTypes.LOOKUP_ADAPTER_V1).title("HTTP DSV").build();
final Set<EntityExcerpt> entityExcerpts = facade.listEntityExcerpts();
assertThat(entityExcerpts).containsOnly(expectedEntityExcerpt);
}
use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class OutputFacadeTest method listEntityExcerpts.
@Test
@MongoDBFixtures("OutputFacadeTest.json")
public void listEntityExcerpts() {
final EntityExcerpt expectedEntityExcerpt = EntityExcerpt.builder().id(ModelId.of("5adf239e4b900a0fdb4e5197")).type(ModelTypes.OUTPUT_V1).title("STDOUT").build();
final Set<EntityExcerpt> entityExcerpts = facade.listEntityExcerpts();
assertThat(entityExcerpts).containsOnly(expectedEntityExcerpt);
}
Aggregations