use of uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.dataframe.GetDataFrameOfElementsHandler in project Gaffer by gchq.
the class SparkOperationDeclarationsTest method shouldContainAllSparkOperationsAndHandlers.
@Test
public void shouldContainAllSparkOperationsAndHandlers() throws SerialisationException {
// When
final OperationDeclarations deserialised = JSONSerialiser.deserialise(StreamUtil.openStream(getClass(), ACCUMULO_OP_DECLARATIONS_JSON_PATH), OperationDeclarations.class);
// Then
final List<OperationDeclaration> deserialisedOps = deserialised.getOperations();
final List<OperationDeclaration> expectedOps = Arrays.asList(new Builder().operation(GetJavaRDDOfElements.class).handler(new GetJavaRDDOfElementsHandler()).build(), new Builder().operation(GetRDDOfElements.class).handler(new GetRDDOfElementsHandler()).build(), new Builder().operation(GetRDDOfAllElements.class).handler(new GetRDDOfAllElementsHandler()).build(), new Builder().operation(GetJavaRDDOfAllElements.class).handler(new GetJavaRDDOfAllElementsHandler()).build(), new Builder().operation(GetDataFrameOfElements.class).handler(new GetDataFrameOfElementsHandler()).build(), new Builder().operation(ImportKeyValueJavaPairRDDToAccumulo.class).handler(new ImportKeyValueJavaPairRDDToAccumuloHandler()).build(), new Builder().operation(ImportJavaRDDOfElements.class).handler(new ImportJavaRDDOfElementsHandler()).build(), new Builder().operation(ImportKeyValuePairRDDToAccumulo.class).handler(new ImportKeyValuePairRDDToAccumuloHandler()).build(), new Builder().operation(ImportRDDOfElements.class).handler(new ImportRDDOfElementsHandler()).build(), new Builder().operation(GetGraphFrameOfElements.class).handler(new GetGraphFrameOfElementsHandler()).build(), new Builder().operation(GetJavaRDDOfElementsInRanges.class).handler(new GetJavaRDDOfElementsInRangesHandler()).build(), new Builder().operation(GetRDDOfElementsInRanges.class).handler(new GetRDDOfElementsInRangesHandler()).build(), new Builder().operation(SplitStoreFromJavaRDDOfElements.class).handler(new SplitStoreFromJavaRDDOfElementsHandler()).build(), new Builder().operation(SplitStoreFromRDDOfElements.class).handler(new SplitStoreFromRDDOfElementsHandler()).build());
assertEquals(expectedOps.size(), deserialisedOps.size());
for (int i = 0; i < expectedOps.size(); i++) {
assertEquals(expectedOps.get(i).getOperation(), deserialisedOps.get(i).getOperation());
assertEquals(expectedOps.get(i).getHandler().getClass(), deserialisedOps.get(i).getHandler().getClass());
}
}
Aggregations