Polish and revive disabled tests
This commit revives some previously disabled tests and converts some usage of @Disabled to @EnabledForTestGroups(...).
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.ServiceLoader;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
@@ -33,12 +34,15 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public class ServiceLoaderTests {
|
||||
class ServiceLoaderTests {
|
||||
|
||||
@BeforeAll
|
||||
static void assumeDocumentBuilderFactoryCanBeLoaded() {
|
||||
assumeTrue(ServiceLoader.load(DocumentBuilderFactory.class).iterator().hasNext());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServiceLoaderFactoryBean() {
|
||||
assumeTrue(ServiceLoader.load(DocumentBuilderFactory.class).iterator().hasNext());
|
||||
|
||||
void testServiceLoaderFactoryBean() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
RootBeanDefinition bd = new RootBeanDefinition(ServiceLoaderFactoryBean.class);
|
||||
bd.getPropertyValues().add("serviceType", DocumentBuilderFactory.class.getName());
|
||||
@@ -49,9 +53,7 @@ public class ServiceLoaderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServiceFactoryBean() {
|
||||
assumeTrue(ServiceLoader.load(DocumentBuilderFactory.class).iterator().hasNext());
|
||||
|
||||
void testServiceFactoryBean() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
RootBeanDefinition bd = new RootBeanDefinition(ServiceFactoryBean.class);
|
||||
bd.getPropertyValues().add("serviceType", DocumentBuilderFactory.class.getName());
|
||||
@@ -61,9 +63,7 @@ public class ServiceLoaderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServiceListFactoryBean() {
|
||||
assumeTrue(ServiceLoader.load(DocumentBuilderFactory.class).iterator().hasNext());
|
||||
|
||||
void testServiceListFactoryBean() {
|
||||
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
|
||||
RootBeanDefinition bd = new RootBeanDefinition(ServiceListFactoryBean.class);
|
||||
bd.getPropertyValues().add("serviceType", DocumentBuilderFactory.class.getName());
|
||||
|
||||
Reference in New Issue
Block a user