Package org.jamesii.core.base

Examples of org.jamesii.core.base.NamedEntity.compareTo()


  /**
   * Test compare to.
   */
  public void testCompareTo() {
    NamedEntity ne = new NamedEntity();
    assertTrue(ne.compareTo(ne) == 0);
    NamedEntity ne2 = new NamedEntity();
    assertTrue(ne.compareTo(ne2) == 0);
    ne.setName("test name 1");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
View Full Code Here


    assertTrue(ne.compareTo(ne) == 0);
    NamedEntity ne2 = new NamedEntity();
    assertTrue(ne.compareTo(ne2) == 0);
    ne.setName("test name 1");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
    ne2.setName("test name 2");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
    ne2.setName("test name 1");
    assertTrue(ne.compareTo(ne2) == 0);
View Full Code Here

    ne.setName("test name 1");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
    ne2.setName("test name 2");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
    ne2.setName("test name 1");
    assertTrue(ne.compareTo(ne2) == 0);
    assertTrue(ne2.compareTo(ne) == 0);
  }
View Full Code Here

    ne2.setName("test name 2");
    assertTrue(ne.compareTo(ne2) != 0);
    assertTrue(ne2.compareTo(ne) != 0);
    ne2.setName("test name 1");
    assertTrue(ne.compareTo(ne2) == 0);
    assertTrue(ne2.compareTo(ne) == 0);
  }

}
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.