Package com.tuenti.supernanny.repo.artifacts

Examples of com.tuenti.supernanny.repo.artifacts.Requirement.matches()


public class MatchTest {
  @Test
  public void testPrefixMatches() {
    Requirement r = new Requirement("test", ReqType.SW, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
View Full Code Here


public class MatchTest {
  @Test
  public void testPrefixMatches() {
    Requirement r = new Requirement("test", ReqType.SW, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
View Full Code Here

  @Test
  public void testPrefixMatches() {
    Requirement r = new Requirement("test", ReqType.SW, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
View Full Code Here

  public void testPrefixMatches() {
    Requirement r = new Requirement("test", ReqType.SW, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
View Full Code Here

    Requirement r = new Requirement("test", ReqType.SW, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
View Full Code Here

    Assert.assertFalse(r.matches(new Version("5.10.0")));
    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
    Assert.assertFalse(r.matches(new Version("50.4.5")));
    r = new Requirement("test", ReqType.SW, "*", RepositoryType.GIT, "");
View Full Code Here

    Assert.assertTrue(r.matches(new Version("5.9")));
    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
    Assert.assertFalse(r.matches(new Version("50.4.5")));
    r = new Requirement("test", ReqType.SW, "*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.0.0")));
View Full Code Here

    Assert.assertTrue(r.matches(new Version("5.9.0")));
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
    Assert.assertFalse(r.matches(new Version("50.4.5")));
    r = new Requirement("test", ReqType.SW, "*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.0.0")));
    Assert.assertTrue(r.matches(new Version("1")));
View Full Code Here

    Assert.assertTrue(r.matches(new Version("5.9.1")));
    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
    Assert.assertFalse(r.matches(new Version("50.4.5")));
    r = new Requirement("test", ReqType.SW, "*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.0.0")));
    Assert.assertTrue(r.matches(new Version("1")));
  }
View Full Code Here

    r = new Requirement("test", ReqType.SW, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
    Assert.assertTrue(r.matches(new Version("5.10.1")));
    Assert.assertTrue(r.matches(new Version("5")));
    Assert.assertFalse(r.matches(new Version("4.6.5")));
    Assert.assertFalse(r.matches(new Version("50.4.5")));
    r = new Requirement("test", ReqType.SW, "*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.0.0")));
    Assert.assertTrue(r.matches(new Version("1")));
  }

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.