Package org.tinyuml.umldraw.shared

Examples of org.tinyuml.umldraw.shared.NoteConnection


  /**
   * Tests the NoteConnection class.
   */
  public void testNoteConnection() {
    // relation has no effect
    NoteConnection connection = NoteConnection.getPrototype();
    connection.setRelation(new UmlRelation());
    assertNull(connection.getModelElement());
  }
View Full Code Here


   * Tests the creation of a note connection.
   */
  public void testCreateNoteConnection() {
    ClassElement clss = (ClassElement) factory.createNode(ElementType.CLASS);
    NoteElement note = (NoteElement) factory.createNode(ElementType.NOTE);
    NoteConnection conn = (NoteConnection)
      factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
    assertStdConnectionConditions(conn, clss, note);
    assertNull(conn.getModelElement());
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Connection createNoteConnection(UmlNode sourceNode,
    UmlNode targetNode) {
    Connection connection = new NoteConnection();
    bindConnection(connection, sourceNode, targetNode);
    return connection;
  }
View Full Code Here

  /**
   * Tests the NoteConnection class.
   */
  public void testNoteConnection() {
    // relation has no effect
    NoteConnection connection = NoteConnection.getPrototype();
    connection.setRelation(new UmlRelation());
    assertNull(connection.getModelElement());
  }
View Full Code Here

  public void testCreateNoteConnection() {
    mockElementFactory.expects(atLeastOnce()).method("create").
      with(eq(ElementType.CLASS)).will(returnValue(clss));
    ClassElement clss = factory.createClass();
    NoteElement note = factory.createNote();
    NoteConnection conn = (NoteConnection)
      factory.createNoteConnection(clss, note);
    assertEquals(clss, conn.getNode1());
    assertEquals(note, conn.getNode2());
    assertEquals(1, clss.getConnections().size());
    assertEquals(1, note.getConnections().size());
    assertNull(conn.getParent());
  }
View Full Code Here

   * Tests the creation of a note connection.
   */
  public void testCreateNoteConnection() {
    ClassElement clss = (ClassElement) factory.createNode(ElementType.CLASS);
    NoteElement note = (NoteElement) factory.createNode(ElementType.NOTE);
    NoteConnection conn = (NoteConnection)
      factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
    assertStdConnectionConditions(conn, clss, note);
    assertNull(conn.getModelElement());
  }
View Full Code Here

  public void testCreateNoteConnection() {
    mockElementFactory.expects(atLeastOnce()).method("create").
      with(eq(ElementType.CLASS)).will(returnValue(clss));
    ClassElement clss = factory.createClass();
    NoteElement note = factory.createNote();
    NoteConnection conn = (NoteConnection)
      factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
    assertEquals(clss, conn.getNode1());
    assertEquals(note, conn.getNode2());
    assertEquals(1, clss.getConnections().size());
    assertEquals(1, note.getConnections().size());
    assertNull(conn.getParent());
  }
View Full Code Here

   * Tests the creation of a note connection.
   */
  public void testCreateNoteConnection() {
    ClassElement clss = (ClassElement) factory.createNode(ElementType.CLASS);
    NoteElement note = (NoteElement) factory.createNode(ElementType.NOTE);
    NoteConnection conn = (NoteConnection)
      factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
    assertStdConnectionConditions(conn, clss, note);
    assertNull(conn.getModelElement());
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.umldraw.shared.NoteConnection

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.