Search in sources :

Example 1 with JavaApplication

use of org.opentosca.toscana.model.node.custom.JavaApplication in project TOSCAna by StuPro-TOSCAna.

the class NodeConvertTest method java.

@Test
public void java() {
    EffectiveModel model = new EffectiveModelFactory().create(JAVA, logMock());
    JavaApplication app = (JavaApplication) model.getNodeMap().get("app");
    assertEquals("test-vm_options", app.getVmOptions().get());
    assertEquals("test-arguments", app.getArguments().get());
    Artifact artifact = app.getJar();
    assertEquals("test-artifact-path", artifact.getFilePath());
    JavaRuntime jre = (JavaRuntime) model.getNodeMap().get("jre");
    assertEquals("1.8", jre.getComponentVersion().get());
}
Also used : JavaRuntime(org.opentosca.toscana.model.node.custom.JavaRuntime) JavaApplication(org.opentosca.toscana.model.node.custom.JavaApplication) EffectiveModel(org.opentosca.toscana.model.EffectiveModel) EffectiveModelFactory(org.opentosca.toscana.model.EffectiveModelFactory) Artifact(org.opentosca.toscana.model.artifact.Artifact) BaseUnitTest(org.opentosca.toscana.core.BaseUnitTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 BaseUnitTest (org.opentosca.toscana.core.BaseUnitTest)1 EffectiveModel (org.opentosca.toscana.model.EffectiveModel)1 EffectiveModelFactory (org.opentosca.toscana.model.EffectiveModelFactory)1 Artifact (org.opentosca.toscana.model.artifact.Artifact)1 JavaApplication (org.opentosca.toscana.model.node.custom.JavaApplication)1 JavaRuntime (org.opentosca.toscana.model.node.custom.JavaRuntime)1