Package com.puppetlabs.geppetto.forge.model

Examples of com.puppetlabs.geppetto.forge.model.Dependency.matches()


    // workspace
    Iterator<Dependency> depsItor = deps.iterator();
    nextDep: while(depsItor.hasNext()) {
      Dependency dep = depsItor.next();
      for(Metadata metadata : metadatas)
        if(dep.matches(metadata)) {
          depsItor.remove();
          continue nextDep;
        }
    }
View Full Code Here


  @Test
  public void testMatches__String_String() {
    Dependency dep = new Dependency();
    dep.setName(ModuleName.fromString("amodule/name"));
    dep.setVersionRequirement(VersionRange.create("2.3.x"));
    assertTrue(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.3.2")));
    assertFalse(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.2.9")));
    assertFalse(dep.matches(ModuleName.fromString("anotherModule/name"), Version.fromString("2.3.2")));
  }
}
View Full Code Here

  public void testMatches__String_String() {
    Dependency dep = new Dependency();
    dep.setName(ModuleName.fromString("amodule/name"));
    dep.setVersionRequirement(VersionRange.create("2.3.x"));
    assertTrue(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.3.2")));
    assertFalse(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.2.9")));
    assertFalse(dep.matches(ModuleName.fromString("anotherModule/name"), Version.fromString("2.3.2")));
  }
}
View Full Code Here

    Dependency dep = new Dependency();
    dep.setName(ModuleName.fromString("amodule/name"));
    dep.setVersionRequirement(VersionRange.create("2.3.x"));
    assertTrue(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.3.2")));
    assertFalse(dep.matches(ModuleName.fromString("amodule-name"), Version.fromString("2.2.9")));
    assertFalse(dep.matches(ModuleName.fromString("anotherModule/name"), Version.fromString("2.3.2")));
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.