Package net.sf.jmd.metarepresentation.impl

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


      List<IDifference> results = membersModified.check(differences);
        assertNotNull("The results must not be null", results);
        assertTrue(results.isEmpty());
       
        //now we modify a bit and run the check again.
        IParameter parameter = new Parameter();
        parameter.setName("newSize");
        ((IOperation)dmMember).addParameter(parameter);
        results = membersModified.check(differences);
        int size = results.size();
        assertTrue("Now there must be a difference <" + size + ">", size == 1);
    }
View Full Code Here


        assertTrue(operation.equals(operation));
    }
   
    public void testToString(){
        String operationString = operation.toString();
        operation.addParameter(new Parameter());
        assertNotNull(operationString);

    }
View Full Code Here

       
        Operation operation = new Operation();
        operation.setName("anOperation");
        operation.setNamespace(item.getIdentifier());
       
        Parameter parameter = new Parameter();
        parameter.setName("aParameter");
        parameter.setNamespace(operation.getIdentifier());
       
        operation.addParameter(parameter);
       
        Variable variable = new Variable();
        variable.setName("aVariable");
View Full Code Here

       
        Operation amOperation = new Operation();
        amOperation.setName("anotherMethod");
        amOperation.setNamespace(amItem.getIdentifier());
       
        Parameter amParameter = new Parameter();
        amParameter.setName("aParameter");
        amParameter.setNamespace(amOperation.getIdentifier());
       
        amOperation.addParameter(amParameter);
        amItem.addMember(amOperation);
        model.addModelItem(amItem);
       
        assertFalse(model.equals(other));
       
        ModelItem dmItem = new ModelItem();
        dmItem.setName("anotherInterface");
        dmItem.setType("interface");
       
        Operation dmOperation = new Operation();
        dmOperation.setName("anotherMethod");
        dmOperation.setNamespace(dmItem.getIdentifier());
       
        Parameter dmParameter = new Parameter();
        dmParameter.setName("aParameter");
        dmParameter.setNamespace(dmOperation.getIdentifier());
       
        dmOperation.addParameter(dmParameter);
        dmItem.addMember(dmOperation);
        other.addModelItem(dmItem);
       
        assertTrue(model.equals(other));
       
        //now the developer adds a parameter to the method:
        Parameter newParameter = new Parameter();
        newParameter.setName("newParameter");
        dmOperation.addParameter(newParameter);
       
        assertFalse(model.equals(other));
    }
View Full Code Here

    /* (non-Javadoc)
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        parameter = new Parameter();
    }
View Full Code Here

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

        assertFalse(operation.equals(otherOperation));

        otherOperation.setName(identifier);
        assertTrue(operation.equals(otherOperation));
       
        Parameter parameter = new Parameter();
        operation.addParameter(parameter);
        assertFalse(operation.equals(otherOperation));

        otherOperation.addParameter(parameter);
        assertTrue(operation.equals(otherOperation));
       
        parameter.setName("i");
    }
View Full Code Here

       
        Operation operation = new Operation();
        operation.setName("anOperation");
        operation.setNamespace(item.getIdentifier());
       
        Parameter parameter = new Parameter();
        parameter.setName("aParameter");
        parameter.setNamespace(operation.getIdentifier());
       
        operation.addParameter(parameter);
       
        Variable variable = new Variable();
        variable.setName("aVariable");
View Full Code Here

       
        Operation amOperation = new Operation();
        amOperation.setName("anotherMethod");
        amOperation.setNamespace(amItem.getIdentifier());
       
        Parameter amParameter = new Parameter();
        amParameter.setName("aParameter");
        amParameter.setNamespace(amOperation.getIdentifier());
       
        amOperation.addParameter(amParameter);
        amItem.addMember(amOperation);
        model.addModelItem(amItem);
       
        assertFalse(model.equals(other));
       
        ModelItem dmItem = new ModelItem();
        dmItem.setName("anotherInterface");
        dmItem.setType("interface");
       
        Operation dmOperation = new Operation();
        dmOperation.setName("anotherMethod");
        dmOperation.setNamespace(dmItem.getIdentifier());
       
        Parameter dmParameter = new Parameter();
        dmParameter.setName("aParameter");
        dmParameter.setNamespace(dmOperation.getIdentifier());
       
        dmOperation.addParameter(dmParameter);
        dmItem.addMember(dmOperation);
        other.addModelItem(dmItem);
       
        assertTrue(model.equals(other));
       
        //now the developer adds a parameter to the method:
        Parameter newParameter = new Parameter();
        newParameter.setName("newParameter");
        dmOperation.addParameter(newParameter);
       
        assertFalse(model.equals(other));
    }
View Full Code Here

    /* (non-Javadoc)
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        parameter = new Parameter();
    }
View Full Code Here

TOP

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

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.