mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-22 22:50:11 +01:00
Remove temp dir extension and use native junit annotation
This commit is contained in:
committed by
René Pfeuffer
parent
6cde2a90cc
commit
7636f1e845
@@ -21,14 +21,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.plugin;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.io.Resources;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junitpioneer.jupiter.TempDirectory;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
@@ -43,13 +42,12 @@ import java.util.UUID;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ExtendWith(TempDirectory.class)
|
||||
class UberClassLoaderTest {
|
||||
|
||||
private final URLClassLoader parentClassLoader = new URLClassLoader(new URL[0]);
|
||||
|
||||
@Test
|
||||
void shouldOnlyUseClassloaderOnce(@TempDirectory.TempDir Path tempDir) throws IOException {
|
||||
void shouldOnlyUseClassloaderOnce(@TempDir Path tempDir) throws IOException {
|
||||
ClassLoader mailClassLoader = createClassLoader(tempDir, "plugin.txt", "mail");
|
||||
ClassLoader reviewClassLoader = createClassLoader(mailClassLoader, tempDir, "plugin.txt", "review");
|
||||
|
||||
@@ -61,7 +59,7 @@ class UberClassLoaderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldReturnResourceFromEachPluginClassLoader(@TempDirectory.TempDir Path tempDir) throws IOException {
|
||||
void shouldReturnResourceFromEachPluginClassLoader(@TempDir Path tempDir) throws IOException {
|
||||
ClassLoader mailClassLoader = createClassLoader(tempDir, "scm.txt", "mail");
|
||||
ClassLoader reviewClassLoader = createClassLoader(tempDir, "scm.txt", "review");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user