Package com.puppetlabs.geppetto.validation.runner.AllModuleReferences

Examples of com.puppetlabs.geppetto.validation.runner.AllModuleReferences.Export


    assertEquals("There should be no errors", 0, countErrors(chain));
    AllModuleReferences exports = buildResult.getAllModuleReferences();
    // dumpExports(exports);

    Iterable<Export> visibleExports = exports.getVisibleExports(new File("roles/production/X"));
    Export exporteda = exports.findExportedClass("aclass", visibleExports);
    assertNotNull("Should have found exported 'aclass'", exporteda);
    Export exportedb = exports.findExportedClass("bclass", visibleExports);
    assertNotNull("Should have found exported 'bclass'", exportedb);
    Export exportedc = exports.findExportedClass("cclass", visibleExports);
    assertNull("Should not have found exported 'cclass'", exportedc);

    Iterable<String> paramsForA = exports.getParameterNames(exporteda, visibleExports);
    assertTrue("Should contain 'aparam'", Iterables.contains(paramsForA, "aparam"));
    assertEquals("Should have one parameter", 1, Iterables.size(paramsForA));
View Full Code Here


    options.setFileType(FileType.PUPPET_ROOT);
    BuildResult buildResult = vs.validate(chain, root, options, null, SubMonitor.convert(null));
    AllModuleReferences exports = buildResult.getAllModuleReferences();

    Iterable<Export> visibleExports = exports.getVisibleExports(new File("roles/X"));
    Export exporteda = exports.findExportedClass("aclass", visibleExports);
    assertNotNull("Should have found exported 'aclass'", exporteda);
    Export exportedb = exports.findExportedClass("b::bclass", visibleExports);
    assertNotNull("Should have found exported 'bclass'", exportedb);
    Export exportedx = exports.findExportedClass("xclass", visibleExports);
    assertNotNull("Should have found exported 'xclass'", exportedx);
    Export exportedc = exports.findExportedClass("cclass", visibleExports);
    assertNull("Should not have found exported 'cclass'", exportedc);

    Iterable<String> paramsForA = exports.getParameterNames(exporteda, visibleExports);
    assertTrue("Should contain 'aparam'", Iterables.contains(paramsForA, "aparam"));
    assertEquals("Should have one parameter", 1, Iterables.size(paramsForA));
View Full Code Here

    BuildResult buildResult = vs.validate(chain, root, options, null, SubMonitor.convert(null));
    AllModuleReferences exports = buildResult.getAllModuleReferences();
    // dumpExports(exports);

    Iterable<Export> visibleExports = exports.getVisibleExports(new File("roles/X"));
    Export exporteda = exports.findExportedClass("aclass", visibleExports);
    assertNotNull("Should have found exported 'aclass'", exporteda);
    Export exportedb = exports.findExportedClass("bclass", visibleExports);
    assertNotNull("Should have found exported 'bclass'", exportedb);
    Export exportedc = exports.findExportedClass("cclass", visibleExports);
    assertNull("Should not have found exported 'cclass'", exportedc);

    Iterable<String> paramsForA = exports.getParameterNames(exporteda, visibleExports);
    assertTrue("Should contain 'aparam'", Iterables.contains(paramsForA, "aparam"));
    assertEquals("Should have one parameter", 1, Iterables.size(paramsForA));
View Full Code Here

  public void githubHrefProducer() {
    Injector injector = Guice.createInjector(new DependencyGraphModule(
      GraphHrefType.GITHUB.getHrefProducerClass(), "https://github.com/puppetlabs/geppetto/master"));
    IHrefProducer producer = injector.getInstance(IHrefProducer.class);

    Export fakeExport = new Export() {

      private static final long serialVersionUID = 1L;

      @Override
      public String getDefaultValueText() {
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.validation.runner.AllModuleReferences.Export

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.