Search in sources :

Example 1 with Repository

use of org.opentosca.toscana.model.artifact.Repository in project TOSCAna by StuPro-TOSCAna.

the class LinkResolverTest method resolveRepositoryLink.

@Test
public void resolveRepositoryLink() {
    EffectiveModel model = new EffectiveModelFactory().create(REPOSITORY, logMock());
    WebServer node = (WebServer) model.getNodeMap().get("test-node");
    Set<Artifact> artifacts = node.getArtifacts();
    Artifact artifact = artifacts.iterator().next();
    assertNotNull(artifact);
    Optional<Repository> repo = artifact.getRepository();
    assertTrue(repo.isPresent());
    assertEquals("http://test.repo.com/", repo.get().getUrl());
}
Also used : Repository(org.opentosca.toscana.model.artifact.Repository) WebServer(org.opentosca.toscana.model.node.WebServer) 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 Repository (org.opentosca.toscana.model.artifact.Repository)1 WebServer (org.opentosca.toscana.model.node.WebServer)1