Package com.tuenti.supernanny.repo.artifacts

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


    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")));
  }

  @Test
  public void testEQMatches() {
View Full Code Here


    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")));
  }

  @Test
  public void testEQMatches() {
    Requirement r = new Requirement("test", ReqType.EQ, "5.9", RepositoryType.GIT, "");
View Full Code Here

  }

  @Test
  public void testEQMatches() {
    Requirement r = new Requirement("test", ReqType.EQ, "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.assertFalse(r.matches(new Version("5.9.0")));
    Assert.assertFalse(r.matches(new Version("5.9.1")));
    try {
View Full Code Here

  @Test
  public void testEQMatches() {
    Requirement r = new Requirement("test", ReqType.EQ, "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.assertFalse(r.matches(new Version("5.9.0")));
    Assert.assertFalse(r.matches(new Version("5.9.1")));
    try {
      r = new Requirement("test", ReqType.EQ, "5.*", RepositoryType.GIT, "");
View Full Code Here

  @Test
  public void testEQMatches() {
    Requirement r = new Requirement("test", ReqType.EQ, "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.assertFalse(r.matches(new Version("5.9.0")));
    Assert.assertFalse(r.matches(new Version("5.9.1")));
    try {
      r = new Requirement("test", ReqType.EQ, "5.*", RepositoryType.GIT, "");
      Assert.fail("Should have thrown an exception");
View Full Code Here

  public void testEQMatches() {
    Requirement r = new Requirement("test", ReqType.EQ, "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.assertFalse(r.matches(new Version("5.9.0")));
    Assert.assertFalse(r.matches(new Version("5.9.1")));
    try {
      r = new Requirement("test", ReqType.EQ, "5.*", RepositoryType.GIT, "");
      Assert.fail("Should have thrown an exception");
    } catch (SuperNannyError e) {
View Full Code Here

    Requirement r = new Requirement("test", ReqType.EQ, "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.assertFalse(r.matches(new Version("5.9.0")));
    Assert.assertFalse(r.matches(new Version("5.9.1")));
    try {
      r = new Requirement("test", ReqType.EQ, "5.*", RepositoryType.GIT, "");
      Assert.fail("Should have thrown an exception");
    } catch (SuperNannyError e) {

View Full Code Here

  }

  @Test
  public void testGEMatches() {
    Requirement r = new Requirement("test", ReqType.GE, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertTrue(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.assertFalse(r.matches(new Version("4.10.1")));
    r = new Requirement("test", ReqType.GE, "5.*", RepositoryType.GIT, "");
View Full Code Here

  @Test
  public void testGEMatches() {
    Requirement r = new Requirement("test", ReqType.GE, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertTrue(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.assertFalse(r.matches(new Version("4.10.1")));
    r = new Requirement("test", ReqType.GE, "5.*", RepositoryType.GIT, "");
    Assert.assertTrue(r.matches(new Version("5.9.1")));
View Full Code Here

  @Test
  public void testGEMatches() {
    Requirement r = new Requirement("test", ReqType.GE, "5.9", RepositoryType.GIT, "");
    Assert.assertFalse(r.matches(new Version("5.8.0")));
    Assert.assertTrue(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.assertFalse(r.matches(new Version("4.10.1")));
    r = new Requirement("test", ReqType.GE, "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

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.