use of org.opentosca.toscana.model.EffectiveModelFactory in project TOSCAna by StuPro-TOSCAna.
the class FileCreatorTest method setUp.
@Before
public void setUp() throws IOException {
EffectiveModel lamp = new EffectiveModelFactory().create(TestCsars.VALID_LAMP_NO_INPUT_TEMPLATE, logMock());
this.context = setUpMockTransformationContext(lamp);
appName = "testApp";
testApp = new Application("testApp", 1, context);
testApp.setName(appName);
File sourceDir = new File(tmpdir, "sourceDir");
targetDir = new File(tmpdir, "targetDir");
sourceDir.mkdir();
targetDir.mkdir();
fileAccess = new PluginFileAccess(sourceDir, targetDir, logMock());
List<Application> applications = new ArrayList<>();
applications.add(testApp);
fileCreator = new FileCreator(fileAccess, applications, context);
}
use of org.opentosca.toscana.model.EffectiveModelFactory in project TOSCAna by StuPro-TOSCAna.
the class CsarServiceImplIT method setUp.
@Before
public void setUp() throws InvalidCsarException {
EffectiveModelFactory modelFactory = mock(EffectiveModelFactory.class);
EffectiveModel model = modelMock();
when(modelFactory.create(any(Csar.class))).thenReturn(model);
csarService = new CsarServiceImpl(csarDao);
Log log = new LogImpl(new File(tmpdir, "log"));
csar = new CsarImpl(new File(""), identifier, log);
}
Aggregations