Package org.jamesii.core.base

Examples of org.jamesii.core.base.NamedEntity


    // Queue has eles elements in it

    // add 10 elements with time time, thus together with the one already in
    // there should be 11 at all
    for (int i = 0; i < 10; i++) {
      myQueue.enqueue(new NamedEntity("" + i), ti);
      assertTrue("Size should be " + (eles + i + rememberSize) + " but is "
          + myQueue.size(), myQueue.size() == eles + i + rememberSize);
    }

    assertTrue("Size is " + myQueue.size() + " instead of " + eles + 10,
View Full Code Here


  /**
   * Test get complete info string.
   */
  @Override
  public void testGetCompleteInfoString() {
    assertTrue(new NamedEntity("").getCompleteInfoString().compareTo("") == 0);
    assertTrue(new NamedEntity().getCompleteInfoString() == null);
    assertTrue(new NamedEntity("test name").getCompleteInfoString().compareTo(
        "test name") == 0);
  }
View Full Code Here

  /**
   * Test constructor.
   */
  public void testConstructor() {
    assertTrue(new NamedEntity("").getName().compareTo("") == 0);
    assertTrue(new NamedEntity().getName() == null);
    assertTrue(new NamedEntity("test name").getName().compareTo("test name") == 0);
  }
View Full Code Here

  /**
   * Test set name.
   */
  public void testSetName() {
    NamedEntity ne = new NamedEntity();
    assertTrue(ne.getName() == null);
    ne.setName("test name");
    assertTrue(ne.getName().compareTo("test name") == 0);
    ne.setName("");
    assertTrue(ne.getName().compareTo("") == 0);
    ne.setName("test name2");
    ne.setName("test name3");
    ne.setName("test name4");
    assertTrue(ne.getName().compareTo("test name4") == 0);
  }
View Full Code Here

  /**
   * 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);
    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

Related Classes of org.jamesii.core.base.NamedEntity

Copyright © 2018 www.massapicom. 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.