use of uk.gov.gchq.gaffer.store.schema.SchemaEdgeDefinition.Builder in project Gaffer by gchq.
the class SchemaEdgeDefinitionTest method shouldOverrideDestinationWhenMerging.
@Test
public void shouldOverrideDestinationWhenMerging() {
// Given
final SchemaEdgeDefinition elementDef1 = new SchemaEdgeDefinition.Builder().destination("destination.integer").build();
final SchemaEdgeDefinition elementDef2 = new SchemaEdgeDefinition.Builder().destination("destination.string").build();
// When
final SchemaEdgeDefinition mergedDef = new Builder().merge(elementDef1).merge(elementDef2).build();
// Then
assertEquals("destination.string", mergedDef.getDestination());
}
use of uk.gov.gchq.gaffer.store.schema.SchemaEdgeDefinition.Builder in project Gaffer by gchq.
the class SchemaEdgeDefinitionTest method shouldOverrideSourceWhenMerging.
@Test
public void shouldOverrideSourceWhenMerging() {
// Given
final SchemaEdgeDefinition elementDef1 = new SchemaEdgeDefinition.Builder().source("source.integer").build();
final SchemaEdgeDefinition elementDef2 = new SchemaEdgeDefinition.Builder().source("source.string").build();
// When
final SchemaEdgeDefinition mergedDef = new Builder().merge(elementDef1).merge(elementDef2).build();
// Then
assertEquals("source.string", mergedDef.getSource());
}