use of uk.gov.gchq.gaffer.operation.data.generator.EntityIdExtractor in project Gaffer by gchq.
the class EntityIdExtractorTest method shouldGetOppositeMatchedVertexFromEdge.
@Test
public void shouldGetOppositeMatchedVertexFromEdge() {
// Given
final EntityIdExtractor extractor = new EntityIdExtractor(IdentifierType.ADJACENT_MATCHED_VERTEX);
final Edge edge = new Edge.Builder().group(TestGroups.EDGE).source("1").dest("2").directed(false).build();
// When
final EntityId seed = extractor._apply(edge);
// Then
assertEquals("2", seed.getVertex());
}
use of uk.gov.gchq.gaffer.operation.data.generator.EntityIdExtractor in project Gaffer by gchq.
the class EntityIdExtractorTest method shouldGetMatchedVertexFromEdge.
@Test
public void shouldGetMatchedVertexFromEdge() {
// Given
final EntityIdExtractor extractor = new EntityIdExtractor(IdentifierType.MATCHED_VERTEX);
final Edge edge = new Edge.Builder().group(TestGroups.EDGE).source("1").dest("2").directed(false).build();
// When
final EntityId seed = extractor._apply(edge);
// Then
assertEquals("1", seed.getVertex());
}
use of uk.gov.gchq.gaffer.operation.data.generator.EntityIdExtractor in project Gaffer by gchq.
the class EntityIdExtractorTest method shouldGetDestinationFromEdge.
@Test
public void shouldGetDestinationFromEdge() {
// Given
final EntityIdExtractor extractor = new EntityIdExtractor(IdentifierType.DESTINATION);
final Edge edge = new Edge.Builder().group(TestGroups.EDGE).source("1").dest("2").directed(false).build();
// When
final EntityId seed = extractor._apply(edge);
// Then
assertEquals("2", seed.getVertex());
}
Aggregations