Package net.sf.jmd.metarepresentation.impl

Examples of net.sf.jmd.metarepresentation.impl.ModelItem


    public Difference() {
        this.name = "";
        this.description = "";
        this.layer = Layer.UNDEFINED;
        this.status = Status.UNDEFINED;
        this.amElement = new ModelItem();
        this.dmElement = new ModelItem();
        this.parentElement = new ModelItem();
        this.subDifferences = new ArrayList<IDifference>();
    }
View Full Code Here


        architectsModel.setType(Model.Type.AM);

        developersModel = new Model();
        developersModel.setType(Model.Type.DM);

        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AddedInterface");

        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("AddedInterface");

        architectsModel.addModelItem(amModelItem);
        developersModel.addModelItem(dmModelItem);
View Full Code Here

    /**
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("AnInterface");

        architectsModel = new Model();
        architectsModel.setType(Model.Type.AM);
        architectsModel.addModelItem(amModelItem);

        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AnInterface");

        developersModel = new Model();
        developersModel.setType(Model.Type.DM);
View Full Code Here

        architectsModel.setType(Model.Type.AM);

        developersModel = new Model();
        developersModel.setType(Model.Type.DM);

        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AnInterface");

        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("AnInterface");

        developersModel.addModelItem(dmModelItem);
        architectsModel.addModelItem(amModelItem);
View Full Code Here

     * Test method for {@link de.dlr.sistec.modi.metarepresentation.impl
     *          .Parameter#setType(de.dlr.sistec.modi.metarepresentation.impl
     *          .ModelItem)}.
     */
    public void testSetType() {
        ModelItem newType = new ModelItem();
        parameter.setType(newType);
        assertSame(newType, parameter.getType());
    }
View Full Code Here

        architectsModel.setType(Model.Type.AM);

        developersModel = new Model();
        developersModel.setType(Model.Type.DM);

        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("RemovedInterface");

        architectsModel.addModelItem(amModelItem);
View Full Code Here

public class ModelItemTest extends TestCase {

    ModelItem modelItem;

    public void setUp() {
        modelItem = new ModelItem();
    }
View Full Code Here

     * Test method for
     * {@link de.dlr.sistec.modi.metarepresentation.impl.ModelItem#equals(java.
     * lang.Object)}.
     */
    public void testEquals() {
        ModelItem other = new ModelItem();

        assertFalse(modelItem.equals(null));
        assertTrue(modelItem.equals(modelItem));
        assertTrue(modelItem.equals(other));

        modelItem.setName("IModelItem");
        assertFalse(modelItem.equals(other));
        other.setName("IModelItem");
        assertTrue(modelItem.equals(other));

        modelItem.setNamespace("de.dlr.sistec.modi");
        assertFalse(modelItem.equals(other));
        other.setNamespace("de.dlr.sistec.modi");
        assertTrue(modelItem.equals(other));

        modelItem.setType("interface");
        assertFalse(modelItem.equals(other));
        other.setType("interface");
        assertTrue(modelItem.equals(other));

        modelItem.addExtendee(new ModelItem());
        assertFalse(modelItem.equals(other));
        other.addExtendee(new ModelItem());
        assertTrue(modelItem.equals(other));

        //operation
        Operation modelItemOperation = new Operation();
        modelItem.addMember(modelItemOperation);
        assertFalse(modelItem.equals(other));

        Operation othersOperation = new Operation();
        other.addMember(othersOperation);
        assertTrue(modelItem.equals(other));
       
        Parameter modelItemParameter = new Parameter();
        modelItemOperation.addParameter(modelItemParameter);
        assertFalse(modelItem.equals(other));
View Full Code Here

    /**
     * <b>The equals method is reflexive:</b> for any reference value x,
     * x.equals(x) should return true.
     */
    public void testEqualsReflexive() {
        ModelItem x = new ModelItem();
        assertTrue(x.equals(x));
    }
View Full Code Here

    /**
     * <b>The equals method is symmetric:</b> for any reference values x and y,
     * x.equals(y) should return true if and only if y.equals(x) returns true.
     */
    public void testEqualsSymmetric() {
        ModelItem x = new ModelItem();
        ModelItem y = new ModelItem();
        assertTrue(x.equals(y) && y.equals(x));
    }
View Full Code Here

TOP

Related Classes of net.sf.jmd.metarepresentation.impl.ModelItem

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.