Merge pull request #17524 from dreis2211

* pr/17524:
  Polish testsupport.junit.platform package

Closes gh-17524
pull/17531/head
Phillip Webb 5 years ago
commit b7227ec927

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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); 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 { public void registerTestExecutionListeners(SummaryGeneratingListener listener) throws Throwable {
Object listeners = Array.newInstance(this.testExecutionListenerType, 1); Object listeners = Array.newInstance(this.testExecutionListenerType, 1);
Array.set(listeners, 0, listener.instance); Array.set(listeners, 0, listener.instance);

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

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

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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}. * {@code SUREFIRE-1679}.
*/ */
package org.springframework.boot.testsupport.junit.platform; package org.springframework.boot.testsupport.junit.platform;

Loading…
Cancel
Save