use of uk.gov.gchq.gaffer.operation.data.generator.EdgeSeedExtractor in project Gaffer by gchq.
the class EdgeSeedExtractorTest method shouldThrowIllegalArgumentExceptionForEntity.
@Test
public void shouldThrowIllegalArgumentExceptionForEntity() {
// Given
final EdgeSeedExtractor extractor = new EdgeSeedExtractor();
final Entity entity = new Entity(TestGroups.ENTITY, "identifier");
// When / Then
try {
extractor.getObject(entity);
fail("Exception expected");
} catch (final IllegalArgumentException e) {
assertNotNull(e);
}
}
use of uk.gov.gchq.gaffer.operation.data.generator.EdgeSeedExtractor in project Gaffer by gchq.
the class EdgeSeedExtractorTest method shouldGetIdentifierFromEdge.
@Test
public void shouldGetIdentifierFromEdge() {
// Given
final EdgeSeedExtractor extractor = new EdgeSeedExtractor();
final Edge edge = new Edge(TestGroups.EDGE, "source", "destination", true);
// When
final EdgeSeed seed = extractor.getObject(edge);
// Then
assertEquals("source", seed.getSource());
assertEquals("destination", seed.getDestination());
assertTrue(seed.isDirected());
}
Aggregations