Package uk.co.brunella.osgi.bdt.framework

Examples of uk.co.brunella.osgi.bdt.framework.BundleWrapper


      // add required bundles defined in test
      for (OSGiBundleDescriptor descriptor : testBundles) {
        addRequiredBundleFromTest(descriptor);
      }
     
      BundleWrapper testRunnerBundle = frameworkStarter.installBundle(getBundleNameAndVersion(testRunnerBundleDescriptor));
      bundleList.add(testRunnerBundle);
      for (OSGiBundleDescriptor descriptor : requiredBundles) {
        BundleWrapper bundle = frameworkStarter.installBundle(getBundleNameAndVersion(descriptor));
        if (bundle != null) {
          bundleList.add(bundle);
        }
      }
     
      List<BundleWrapper> testBundleList = new ArrayList<BundleWrapper>();
      for (OSGiBundleDescriptor descriptor : testBundles) {
        BundleWrapper bundle = frameworkStarter.installBundle(getBundleNameAndVersion(descriptor));
        if (bundle != null) {
          testBundleList.add(bundle);
        }
      }
      // start all required bundles
      for (BundleWrapper bundle : bundleList) {
        bundle.start();
      }
     
      // set the test parameters
      if (testParameters.size() > 0) {
        setTestParameters(testRunnerBundle.getBundleContext());
      }

      // start the test bundles
      for (BundleWrapper bundle : testBundleList) {
        bundle.start();
      }
      List<OSGiTestResult> testResults = getTestResults(testRunnerBundle.getBundleContext());
      return testResults;
    } finally {
      stopFramework();
View Full Code Here

TOP

Related Classes of uk.co.brunella.osgi.bdt.framework.BundleWrapper

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.