use of uk.gov.gchq.gaffer.federatedstore.operation.AddGraph.Builder in project Gaffer by gchq.
the class AddGraphTest method shouldShallowCloneOperationWithNulls.
@Test
public void shouldShallowCloneOperationWithNulls() {
final AddGraph a = new Builder().graphId(null).parentPropertiesId(null).parentSchemaIds(null).schema(null).graphAuths(null).storeProperties(null).readAccessPredicate(READ_ACCESS_PREDICATE).writeAccessPredicate(WRITE_ACCESS_PREDICATE).build();
final AddGraph b = a.shallowClone();
assertEquals(a.getGraphId(), b.getGraphId());
assertEquals(a.getStoreProperties(), b.getStoreProperties());
assertEquals(a.getSchema(), b.getSchema());
assertEquals(a.getGraphAuths(), b.getGraphAuths());
assertEquals(a.getReadAccessPredicate(), b.getReadAccessPredicate());
assertEquals(a.getWriteAccessPredicate(), b.getWriteAccessPredicate());
}
use of uk.gov.gchq.gaffer.federatedstore.operation.AddGraph.Builder in project Gaffer by gchq.
the class AddGraphTest method shouldShallowCloneOperation.
@Test
@Override
public void shouldShallowCloneOperation() {
final AddGraph a = new Builder().graphId("graphId").parentPropertiesId("testPropID").parentSchemaIds(Lists.newArrayList("testSchemaID")).schema(new Schema.Builder().build()).graphAuths("testAuth").storeProperties(new StoreProperties()).readAccessPredicate(READ_ACCESS_PREDICATE).writeAccessPredicate(WRITE_ACCESS_PREDICATE).build();
final AddGraph b = a.shallowClone();
assertEquals(a.getGraphId(), b.getGraphId());
assertEquals(a.getStoreProperties(), b.getStoreProperties());
assertEquals(a.getSchema(), b.getSchema());
assertEquals(a.getGraphAuths(), b.getGraphAuths());
assertEquals(a.getReadAccessPredicate(), b.getReadAccessPredicate());
assertEquals(a.getWriteAccessPredicate(), b.getWriteAccessPredicate());
}
Aggregations