Package modTransf.engine

Examples of modTransf.engine.ArrayArguments


  /**
   * @return Arguments
   */
  public Arguments nextArguments()
  {
    return new ArrayArguments(computeNextResult());
  }
View Full Code Here


    rule.addRule( createSimpleRule( "r1", "in, out", false) );

    rule.engineStart( context );

    // execute the rule
    Arguments args = new ArrayArguments();
    rule.execute( args, context );

    // Check the descriptors
    assertEquals("desc size", registeredRule.getParameterDescriptors().size(), rule.getParameterDescriptors().size());
    Iterator iterRegistered = registeredRule.getParameterDescriptors().iterator();
View Full Code Here

    rule.addRule( createSimpleRule( "rule3", "in, out", true) );

    rule.engineStart( context );

    // execute the rule
    Arguments args = new ArrayArguments();
    args.add( attr1 );
    args.add( null );
    rule.execute( args, context );

    // Check if the rule is called
    //assertEquals("rule is called", 1, methodCallsTrace.size());
    assertTrue("rule1 is checked", methodCallsTrace.remove("rule1.execute()"));
View Full Code Here

    rule.addRule( rule3);

    rule.engineStart( context );

    // execute the rule
    Arguments args = new ArrayArguments();
    args.add( attr1 );
    args.add( null );
    rule.isAllowed( args, context );

    // Check if the rule is called
    //assertEquals("rule is called", 1, methodCallsTrace.size());
    assertTrue("rule1 is checked", methodCallsTrace.remove("rule1.isAllowed()"));
View Full Code Here

    //rule.addDomain( createDomain( "uml", 1, null, null, true) );
    String actionName = "action";
    rule.addAction( new CheckContextAction(actionName) );

    // execute the rule
    Arguments args = new ArrayArguments();
    rule.execute( args, context );

    // Check if the action is called
    assertTrue("trace", methodCallsTrace.remove(actionName+".execute()"));
    assertEquals("trace", 0, methodCallsTrace.size());
View Full Code Here

  {
    String VARNAME = "aVarName";
    Domain domain = createDomain("src", 0, VARNAME, null);

    String value = new String("aValue");
    Arguments args = new ArrayArguments();
    args.add(value);
    contextImpl.setArguments(args);

    // Try to get the value
    Object res = domain.getPropertyValue(null, context); // Surrounding rule is not set
    assertEquals("property value", value, res);

    // Try to set the value
    Object newValue = new String("aNewValue");
    domain.setPropertyValue(null, newValue, context); // Surrounding rule is not set
    res = domain.getPropertyValue(null, context); // Surrounding rule is not set
    assertEquals("property value", newValue, res);
    assertEquals("arguments out value", newValue, args.get(0));
  }
View Full Code Here

    throws TransformationException
  {
    Domain domain = new Domain();

    String value = new String("aValue");
    Arguments args = new ArrayArguments();
    args.add(value);
    contextImpl.setArguments(args);

    ConceptDescriptor property = new ConceptDescriptor();
    domain.addSubPropertyDescriptor(property);
    assertEquals("domain accessible from sub-property", domain, property.getDomain());
View Full Code Here

TOP

Related Classes of modTransf.engine.ArrayArguments

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.