Polish testsupport.junit.platform package

See gh-17524
This commit is contained in:
dreis2211 2019-07-15 20:41:34 +02:00 committed by Phillip Webb
parent 1d42f35585
commit 4ec035977b
8 changed files with 8 additions and 47 deletions

View File

@ -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 {
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);

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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;
}
}

View File

@ -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 @@
*/
/**
* 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;