Package net.sf.jmd.metarepresentation.impl

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


        super(name);
    }

    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("AnInterface");
View Full Code Here


     *
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        metarepresenation = MetaRepresentation.getInstance();
        architectsModel = new Model();
        architectsModel.setType(Model.Type.AM);

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

        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("RemovedInterface");
View Full Code Here

        amMember.addModifier("static");
        amMember.setType(voidTypeAM);
        amMember.setName("aMember");
        amMember.setNamespace(amModelItem.getIdentifier());

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

       
        //the DM with an interface and a member
        voidTypeDM = new ModelItem();
        voidTypeDM.setName("void");
       
        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AnInterface");
        dmModelItem.addMember(dmMember);

        dmMember = new Operation();
        dmMember.addModifier("public");
        dmMember.setType(voidTypeAM);
        dmMember.setName("aMember");
        dmMember.setNamespace(amModelItem.getIdentifier());

        developersModel = new Model();
        developersModel.setType(Model.Type.DM);
        developersModel.addModelItem(dmModelItem);
       
       
        //the metarepresentation with to 2 models
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

        if (amFiles == null) {
            throw new MoDiException("We have no model files, call "
                    + "findArchitectsModelFiles(...) first.");
        }

        IModel amModel = new Model();
        amModel.setType(Model.Type.AM);
        amModel = transformModel(amFiles, language);
        metaRepresentation.setAmModel(amModel);
    }
View Full Code Here

        if (dmFiles == null) {
            throw new MoDiException("We have no model files, call "
                    + "findDevelopersModelFiles(...) first.");
        }

        IModel dmModel = new Model();
        dmModel.setType(Model.Type.DM);
        dmModel = transformModel(dmFiles, language);
        metaRepresentation.setDmModel(dmModel);
    }
View Full Code Here

       
        IMember amMethod =  new Operation();
        amMethod.setName("myMethod");
        amInterface.addMember(amMethod);
       
        architectsModel = new Model();
        architectsModel.setType(Model.Type.AM);
        architectsModel.addModelItem(amInterface);
       
        metarepresenation = MetaRepresentation.getInstance();
        metarepresenation.setAmModel(architectsModel);
View Full Code Here

        anExtraMethod.setModifiers(modifiers);
        anExtraMethod.setName("extraMethod");
        dmClass.addMember(anExtraMethod);
       
        //putting all together
        developersModel = new Model();
        developersModel.setType(Model.Type.DM);
        developersModel.addModelItem(dmInterface);
        developersModel.addModelItem(dmClass);

        metarepresenation = MetaRepresentation.getInstance();
View Full Code Here

    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

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.