Browse Source

Polish testsupport.junit.platform package

See gh-17524
pull/17531/head
dreis2211 7 years ago committed by Phillip Webb
parent
commit
4ec035977b
  1. 7
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/Launcher.java
  2. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/LauncherDiscoveryRequest.java
  3. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/LauncherDiscoveryRequestBuilder.java
  4. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/ReflectiveWrapper.java
  5. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/SummaryGeneratingListener.java
  6. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/TestExecutionSummary.java
  7. 34
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/TestPlan.java
  8. 4
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/package-info.java

7
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/Launcher.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,11 +37,6 @@ public class Launcher extends ReflectiveWrapper { @@ -37,11 +37,6 @@ public class Launcher extends ReflectiveWrapper {
this.instance = factoryClass.getMethod("create").invoke(null);
}
public TestPlan discover(LauncherDiscoveryRequest request) throws Throwable {
return new TestPlan(getClassLoader(),
this.type.getMethod("discover", request.type).invoke(this.instance, request.instance));
}
public void registerTestExecutionListeners(SummaryGeneratingListener listener) throws Throwable {
Object listeners = Array.newInstance(this.testExecutionListenerType, 1);
Array.set(listeners, 0, listener.instance);

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/LauncherDiscoveryRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/LauncherDiscoveryRequestBuilder.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/ReflectiveWrapper.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/SummaryGeneratingListener.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/TestExecutionSummary.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

34
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/TestPlan.java

@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
/*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.testsupport.junit.platform;
/**
* Reflective mirror of JUnit 5's {@code TestPlan}.
*
* @author Phillip Webb
* @since 2.2.0
*/
public class TestPlan extends ReflectiveWrapper {
final Object instance;
TestPlan(ClassLoader classLoader, Object instance) throws Throwable {
super(classLoader, "org.junit.platform.launcher.TestPlan");
this.instance = instance;
}
}

4
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/platform/package-info.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
*/
/**
* Reflective mirror of JUnit 5 classes required to workaround shurefire bug
* Reflective mirror of JUnit 5 classes required to workaround surefire bug
* {@code SUREFIRE-1679}.
*/
package org.springframework.boot.testsupport.junit.platform;

Loading…
Cancel
Save