Search in sources :

Example 1 with SoftwareComponent

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

the class NodeConvertTest method softwareComponent.

@Test
public void softwareComponent() {
    EffectiveModel model = new EffectiveModelFactory().create(SOFTWARE_COMPONENT, logMock());
    SoftwareComponent softwareComponent = (SoftwareComponent) model.getNodes().iterator().next();
    Credential credential = softwareComponent.getAdminCredential().get();
    assertEquals("securePassword", credential.getToken());
    assertEquals("alice", credential.getUser().get());
    assertEquals("3.5.1", softwareComponent.getComponentVersion().get());
}
Also used : Credential(org.opentosca.toscana.model.datatype.Credential) EffectiveModel(org.opentosca.toscana.model.EffectiveModel) EffectiveModelFactory(org.opentosca.toscana.model.EffectiveModelFactory) SoftwareComponent(org.opentosca.toscana.model.node.SoftwareComponent) 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 Credential (org.opentosca.toscana.model.datatype.Credential)1 SoftwareComponent (org.opentosca.toscana.model.node.SoftwareComponent)1