Пример #1
0
  public void testEqualityWithString() {

    String uri = "http://my.service.com";

    Origin o = null;

    try {
      o = new Origin(uri);

    } catch (OriginException e) {

      fail(e.getMessage());
    }

    assertTrue(o.equals(uri));
  }
Пример #2
0
  public void testEquality2() {

    String uri1 = "http://MY.service.com";
    String uri2 = "HTTPS://my.service.com/my-app";

    Origin o1 = null;
    Origin o2 = null;

    try {
      o1 = new Origin(uri1);
      o2 = new Origin(uri2);

    } catch (OriginException e) {

      fail(e.getMessage());
    }

    assertFalse(o1.equals(o2));
  }
Пример #3
0
  public void testConstructorUnknown() {

    Origin o = new Origin();

    assertTrue(o.equals(Origin.UNKNOWN));
  }