Search in sources :

Example 1 with TransformationService

use of org.opentosca.toscana.core.transformation.TransformationService in project TOSCAna by StuPro-TOSCAna.

the class TransformationControllerTest method mockTransformationService.

private void mockTransformationService() {
    transformationService = mock(TransformationService.class);
    when(transformationService.createTransformation(any(Csar.class), any(Platform.class))).then(iom -> {
        Csar csar = (Csar) iom.getArguments()[0];
        Platform platform = (Platform) iom.getArguments()[1];
        Transformation t = new TransformationImpl(csar, platform, logMock(), modelMock());
        csar.getTransformations().put(platform.id, t);
        return t;
    });
}
Also used : Csar(org.opentosca.toscana.core.csar.Csar) TransformationImpl(org.opentosca.toscana.core.transformation.TransformationImpl) Transformation(org.opentosca.toscana.core.transformation.Transformation) Platform(org.opentosca.toscana.core.transformation.platform.Platform) TransformationService(org.opentosca.toscana.core.transformation.TransformationService)

Aggregations

Csar (org.opentosca.toscana.core.csar.Csar)1 Transformation (org.opentosca.toscana.core.transformation.Transformation)1 TransformationImpl (org.opentosca.toscana.core.transformation.TransformationImpl)1 TransformationService (org.opentosca.toscana.core.transformation.TransformationService)1 Platform (org.opentosca.toscana.core.transformation.platform.Platform)1