use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class NotificationFacadeTest method listExcerpts.
@Test
@MongoDBFixtures("NotificationFacadeTest.json")
public void listExcerpts() {
final Set<EntityExcerpt> excerpts = facade.listEntityExcerpts();
final EntityExcerpt excerpt = excerpts.iterator().next();
assertThat(excerpt.title()).isEqualTo("title");
assertThat(excerpt.id()).isEqualTo(ModelId.of("5d4d33753d27460ad18e0c4d"));
assertThat(excerpt.type()).isEqualTo(ModelTypes.NOTIFICATION_V1);
}
use of org.graylog2.contentpacks.model.entities.EntityExcerpt in project graylog2-server by Graylog2.
the class EventDefinitionFacadeTest method createExcerpt.
@Test
@MongoDBFixtures("EventDefinitionFacadeTest.json")
public void createExcerpt() {
final Optional<EventDefinitionDto> eventDefinitionDto = eventDefinitionService.get("5d4032513d2746703d1467f6");
assertThat(eventDefinitionDto).isPresent();
final EntityExcerpt excerpt = facade.createExcerpt(eventDefinitionDto.get());
assertThat(excerpt.title()).isEqualTo("title");
assertThat(excerpt.id()).isEqualTo(ModelId.of("5d4032513d2746703d1467f6"));
assertThat(excerpt.type()).isEqualTo(ModelTypes.EVENT_DEFINITION_V1);
}
Aggregations