Search in sources :

Example 11 with CsarImpl

use of org.opentosca.toscana.core.csar.CsarImpl in project TOSCAna by StuPro-TOSCAna.

the class BaseTransformTest method initContext.

/**
 *     initializes the transformation context
 */
protected TransformationContext initContext() throws Exception {
    Csar csar = new CsarImpl(tmpdir, "csarId", logMock());
    Transformation t = new TransformationImpl(csar, plugin.getPlatform(), logMock(), model);
    Transformation transformation = spy(t);
    when(transformation.getInputs()).thenReturn(inputs);
    return new TransformationContext(transformation, workingDir);
}
Also used : Csar(org.opentosca.toscana.core.csar.Csar) TransformationImpl(org.opentosca.toscana.core.transformation.TransformationImpl) Transformation(org.opentosca.toscana.core.transformation.Transformation) CsarImpl(org.opentosca.toscana.core.csar.CsarImpl) TransformationContext(org.opentosca.toscana.core.transformation.TransformationContext)

Aggregations

CsarImpl (org.opentosca.toscana.core.csar.CsarImpl)11 File (java.io.File)8 Csar (org.opentosca.toscana.core.csar.Csar)8 Before (org.junit.Before)6 TransformationImpl (org.opentosca.toscana.core.transformation.TransformationImpl)5 Transformation (org.opentosca.toscana.core.transformation.Transformation)4 Platform (org.opentosca.toscana.core.transformation.platform.Platform)4 EffectiveModel (org.opentosca.toscana.model.EffectiveModel)4 HashSet (java.util.HashSet)3 TransformationContext (org.opentosca.toscana.core.transformation.TransformationContext)3 Log (org.opentosca.toscana.core.transformation.logging.Log)3 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 BaseUnitTest (org.opentosca.toscana.core.BaseUnitTest)2 CsarService (org.opentosca.toscana.core.csar.CsarService)2 EffectiveModelFactory (org.opentosca.toscana.model.EffectiveModelFactory)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 InputStream (java.io.InputStream)1 HashMap (java.util.HashMap)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1