Search in sources :

Example 1 with Builder

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());
}
Also used : Builder(uk.gov.gchq.gaffer.store.schema.SchemaEdgeDefinition.Builder) Test(org.junit.Test)

Example 2 with Builder

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());
}
Also used : Builder(uk.gov.gchq.gaffer.store.schema.SchemaEdgeDefinition.Builder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Builder (uk.gov.gchq.gaffer.store.schema.SchemaEdgeDefinition.Builder)2