Package org.tinyuml.model

Examples of org.tinyuml.model.Multiplicity


 
  /**
   * Tests the equals() and hashCode() methods.
   */
  public void testEqualsHashcode() {
    Multiplicity m = Multiplicity.getBoundedInstance(3, 4);
    Multiplicity m2 = Multiplicity.getBoundedInstance(3, 4);
    Multiplicity m3 = Multiplicity.getBoundedInstance(1, 2);

    Multiplicity m4 = Multiplicity.getUnboundedInstance(2);
    Multiplicity m5 = Multiplicity.getUnboundedInstance(2);
    Multiplicity m6 = Multiplicity.getUnboundedInstance(3);

    assertFalse(m.equals(null));
    assertFalse(m.equals("someobject"));
    assertTrue(m.equals(m2));
    assertEquals(m.hashCode(), m2.hashCode());
View Full Code Here

TOP

Related Classes of org.tinyuml.model.Multiplicity

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.