Package net.sf.jmd.metarepresentation.impl

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


    private IModel model;
    private IModel other;

    public ModelTest() {
        model = new Model();
        other = new Model();
    }
View Full Code Here


        assertNotNull(model.getType());
        assertEquals(Type.UNDEFINED, model.getType());
    }

    public void testToString(){
        assertNotNull(new Model().toString());
    }
View Full Code Here

    public void testToString(){
        assertNotNull(new Model().toString());
    }
   
    public void testSetItems(){
        IModel newModel = new Model();
        List<IModelItem> newItems = new ArrayList<IModelItem>();
        newModel.setItems(newItems);
        assertSame(newItems, newModel.getItems());
    }
View Full Code Here

        newModel.setItems(newItems);
        assertSame(newItems, newModel.getItems());
    }
   
    public void testAddModelItem(){
        IModel newModel = new Model();
        assertTrue(newModel.getItems().isEmpty());
        ModelItem newItem = new ModelItem();
        newModel.addModelItem(newItem);
        assertTrue(newModel.getItems().contains(newItem));
    }
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() {
        IModel x = new Model();
        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() {
        IModel x = new Model();
        IModel y = new Model();
        assertTrue(x.equals(y) && y.equals(x));
    }
View Full Code Here

     * <b>The equals method is transitive:</b> for any reference values x, y,
     * and z, if x.equals(y) returns true and y.equals(z) returns true, then
     * x.equals(z) should return true.
     */
    public void testEqualsTransivity() {
        IModel x = new Model();
        IModel y = new Model();
        IModel z = new Model();
        //(x=y)&(y=z)=>(x=z) , x=>y is not(x)||y
        assertTrue((!(x.equals(y) && y.equals(z)) || x.equals(z)));
        //more readable
        assertTrue(x.equals(y));
        assertTrue(y.equals(z));
View Full Code Here

        String defaultMetaRepresentation = metaRepresentation.toString();
        assertTrue(defaultMetaRepresentation != null);
    }

    public void testSetModel() {
        IModel aModel = new Model();
        aModel.setType(Type.AM);
        metaRepresentation.setAmModel(aModel);
        assertEquals(aModel, metaRepresentation.getAmModel());
       
        metaRepresentation.setDmModel(aModel);
        assertEquals(aModel, metaRepresentation.getDmModel());
View Full Code Here

    private ICheck interfacesModified;

    public void setUp() {
        metarepresenation = MetaRepresentation.getInstance();
        architectsModel = new Model();
        architectsModel.setType(Model.Type.AM);

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

        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AddedInterface");
View Full Code Here

        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);
        developersModel.addModelItem(dmModelItem);
       
        metarepresenation = MetaRepresentation.getInstance();
        metarepresenation.setAmModel(architectsModel);
View Full Code Here

TOP

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

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.