Package com.puppetlabs.geppetto.pp.pptp

Examples of com.puppetlabs.geppetto.pp.pptp.Function


      // should have found two functions "echotest" and "echotest2"
      // and the log functions (8)
      assertEquals("Should have found two functions", 10, target.getFunctions().size());
      {
        Function f = getFunction("echotest", target);
        assertNotNull("Should have found function 'echotest'", f);
        assertTrue("echotest should be an rValue", f.isRValue());
      }
      {
        Function f = getFunction("echotest2", target);
        assertNotNull("Should have found function 'echotest2'", f);
        assertFalse("echotest2 should not be an rValue", f.isRValue());
      }

    }
    finally {
      helper.tearDown();
View Full Code Here


        case FUNCTION: {
          List<PPFunctionInfo> functions = helper.getFunctionInfo(uri.path(), new InputStreamReader(
            inputStream));

          for(PPFunctionInfo info : functions) {
            Function pptpFunc = PPTPFactory.eINSTANCE.createFunction();
            pptpFunc.setName(info.getFunctionName());
            pptpFunc.setRValue(info.isRValue());
            pptpFunc.setDocumentation(info.getDocumentation());
            getContents().add(pptpFunc);
          }
        }
          break;
View Full Code Here

  }

  private List<Function> functionInfoToFunction(List<PPFunctionInfo> functionInfos) {
    List<Function> result = Lists.newArrayList();
    for(PPFunctionInfo info : functionInfos) {
      Function pptpFunc = PPTPFactory.eINSTANCE.createFunction();
      pptpFunc.setName(info.getFunctionName());
      pptpFunc.setRValue(info.isRValue());
      pptpFunc.setDocumentation(info.getDocumentation());
      result.add(pptpFunc);
    }
    return result;

  }
View Full Code Here

    Resource r = resourceSet.getResource(uri, true);

    assertEquals("Should have loaded one thing", 1, r.getContents().size());
    EObject f = r.getContents().get(0);
    assertTrue("Should have loaded a function", f instanceof Function);
    Function func = (Function) f;
    assertEquals("Name should be the expected name", functionName, func.getName());
    assertTrue("Should be an rValue", func.isRValue());
  }
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.pp.pptp.Function

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.