Search in sources :

Example 6 with ProjectTester

use of aQute.bnd.build.ProjectTester in project bnd by bndtools.

the class LauncherTest method testJUnitLessTester.

/**
	 * Try out the new tester that does not contain JUnit
	 */
public static void testJUnitLessTester() throws Exception {
    Project project = getProject();
    List<Container> bundles = project.getBundles(Strategy.HIGHEST, "biz.aQute.tester", "TESTER");
    assertNotNull(bundles);
    assertEquals(1, bundles.size());
    project.setProperty(Constants.TESTPATH, "");
    project.setProperty(Constants.TESTER, "biz.aQute.tester");
    project.clear();
    project.build();
    assertTrue(project.check());
    ProjectTester pt = project.getProjectTester();
    pt.addTest("test.TestCase1");
    pt.addTest("test.TestCase2:m1");
    assertEquals(2, pt.test());
}
Also used : Project(aQute.bnd.build.Project) Container(aQute.bnd.build.Container) ProjectTester(aQute.bnd.build.ProjectTester)

Aggregations

ProjectTester (aQute.bnd.build.ProjectTester)6 Project (aQute.bnd.build.Project)5 Container (aQute.bnd.build.Container)1 ProjectLauncher (aQute.bnd.build.ProjectLauncher)1 Tag (aQute.lib.tag.Tag)1 File (java.io.File)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 ZipException (java.util.zip.ZipException)1 XPathExpressionException (javax.xml.xpath.XPathExpressionException)1 BuildException (org.apache.tools.ant.BuildException)1