use of org.eclipse.tycho.surefire.provider.spi.TestFrameworkProvider in project tycho by eclipse.
the class ProviderHelperTest method testSelectJunit5WithJUnit4Present.
public void testSelectJunit5WithJUnit4Present() throws Exception {
TestFrameworkProvider provider = providerHelper.selectProvider(classPath("org.junit:4.12", "org.junit.jupiter.api:5.0.0"), new Properties(), null);
assertEquals(JUnit5Provider.class, provider.getClass());
}
use of org.eclipse.tycho.surefire.provider.spi.TestFrameworkProvider in project tycho by eclipse.
the class ProviderHelperTest method testMultipleProviderTypesFound.
public void testMultipleProviderTypesFound() throws Exception {
TestFrameworkProvider anotherProvider = new TestFrameworkProvider() {
@Override
public boolean isEnabled(List<ClasspathEntry> testBundleClassPath, Properties surefireProperties) {
return true;
}
@Override
public Version getVersion() {
return new Version("1.0");
}
@Override
public String getType() {
return "another_test_fwk";
}
@Override
public String getSurefireProviderClassName() {
return "a.nother.test.framework.Provider";
}
@Override
public List<Dependency> getRequiredBundles() {
return emptyList();
}
@Override
public Properties getProviderSpecificProperties() {
return new Properties();
}
};
PlexusContainer container = getContainer();
container.addComponent(anotherProvider, TestFrameworkProvider.class, "another_test_fwk");
ProviderHelper providerSelector = container.lookup(ProviderHelper.class);
try {
providerSelector.selectProvider(classPath("org.junit:4.8.1"), new Properties(), null);
fail();
} catch (MojoExecutionException e) {
// expected
} finally {
container.release(anotherProvider);
}
}
use of org.eclipse.tycho.surefire.provider.spi.TestFrameworkProvider in project tycho by eclipse.
the class ProviderHelperTest method testSelectJunit47.
public void testSelectJunit47() throws Exception {
Properties providerProperties = new Properties();
providerProperties.setProperty("parallel", "classes");
TestFrameworkProvider provider = providerHelper.selectProvider(classPath("org.junit:3.8.2", "org.junit4:4.8.1"), providerProperties, null);
assertEquals(JUnit47Provider.class, provider.getClass());
}
use of org.eclipse.tycho.surefire.provider.spi.TestFrameworkProvider in project tycho by eclipse.
the class ProviderHelperTest method testForceJunit3WithHint.
public void testForceJunit3WithHint() throws Exception {
TestFrameworkProvider provider = providerHelper.selectProvider(classPath("org.junit:3.8.1", "org.junit:4.8.1"), new Properties(), "junit3");
assertEquals(JUnit3Provider.class, provider.getClass());
}
use of org.eclipse.tycho.surefire.provider.spi.TestFrameworkProvider in project tycho by eclipse.
the class ProviderHelperTest method testSelectJunit5.
public void testSelectJunit5() throws Exception {
TestFrameworkProvider provider = providerHelper.selectProvider(classPath("org.junit.jupiter.api:5.0.0"), new Properties(), null);
assertEquals(JUnit5Provider.class, provider.getClass());
}
Aggregations