@Test public void checkGetTransformationParameterParallel() { ITransformation<EObject, IOcl2CodeSettings, Tuple<String, EObject>> trans = TransformationFactory.getInstance() .getParallelTransformation( itrans.getClass().getSimpleName(), EObject.class, String.class, EObject.class, IOcl2CodeSettings.class, "", ""); assertNull("The transformation is created with false paramter", trans); trans = TransformationFactory.getInstance() .getParallelTransformation( "TestParallelTrans", EObject.class, String.class, EObject.class, IOcl2CodeSettings.class, "", ""); assertNotNull(trans); assertEquals( "Isn't of same transformation type.", trans.getClass().getSimpleName(), "TestParallelTrans"); }
@Test public void checkGetTransformationSimple() { ITransformation<?, ?, ?> trans = TransformationFactory.getInstance().getTransformation("TestTrans1X", "", ""); assertNull("A not exists transformation is created", trans); trans = TransformationFactory.getInstance().getTransformation("TestParallelTrans", "", ""); assertNotNull(trans); assertNotSame( "Is same transformation type.", trans.getClass().getName(), itrans.getClass().getName()); trans = TransformationFactory.getInstance() .getTransformation(itrans.getClass().getSimpleName(), "", ""); assertNotNull(trans); assertNotSame("Isn't generate a new instance", trans, itrans); assertEquals( "Isn't same transformation type.", trans.getClass().getName(), itrans.getClass().getName()); }