Package net.sf.jmd.metarepresentation.impl

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


    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

    private ICheck interfacesAddedCheck;


    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

    /**
     * <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

    public JavaTransformer() {
    }


    public IModel transform(List<File> modelFileList) throws MoDiException {
        IModel result = new Model();
        IModelItem item = null;

        IParser joda = new JavaParser();
        ITreeWalker luke = new ASTtoMetaRepresentationTransformer();
       
        for (File file : modelFileList) {
            //TODO remove debug
//           LOGGER.info("parsing file: " + file.getAbsolutePath());
            AST ast = joda.getAST(file);// parse the file
            item = luke.walk(ast); // build a ModelItem from the AST
            result.addModelItem(item); // add it to the model
        }
       
        return result;
    }
View Full Code Here

    public JavaTransformer() {
    }


    public IModel transform(List<File> modelFileList) throws MoDiException {
        IModel result = new Model();
        IModelItem item = null;

        IParser joda = new JavaParser();
        ITreeWalker luke = new ASTtoMetaRepresentationTransformer();
       
        for (File file : modelFileList) {
            //TODO remove debug
//           LOGGER.info("parsing file: " + file.getAbsolutePath());
            AST ast = joda.getAST(file);// parse the file
            item = luke.walk(ast); // build a ModelItem from the AST
            result.addModelItem(item); // add it to the model
        }
       
        return result;
    }
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.