From b8b4574bea75ac9afafa505354590de1b1075be1 Mon Sep 17 00:00:00 2001 From: Stefan Seelmann Date: Sun, 2 May 2021 20:33:31 +0200 Subject: Remove JUnit4 --- tests/test.integration.core/pom-first.xml | 3 +- .../core/DirectoryApiConnectionWrapperTest.java | 12 ++--- .../studio/test/integration/core/SchemaTest.java | 4 +- tests/test.integration.ui/pom-first.xml | 4 +- ...ameworkRunnerWithScreenshotCaptureListener.java | 54 ---------------------- 5 files changed, 10 insertions(+), 67 deletions(-) delete mode 100644 tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/utils/FrameworkRunnerWithScreenshotCaptureListener.java diff --git a/tests/test.integration.core/pom-first.xml b/tests/test.integration.core/pom-first.xml index d9ab52038..00979367f 100644 --- a/tests/test.integration.core/pom-first.xml +++ b/tests/test.integration.core/pom-first.xml @@ -49,8 +49,7 @@ org.apache.directory.studio.test.integration.junit5 - org.junit;bundle-version="4.11.0", - org.hamcrest.library;bundle-version="1.3.0", + org.hamcrest.library;bundle-version="1.3.0", org.junit.jupiter.api;bundle-version="5.7.0", org.junit.jupiter.params;bundle-version="5.7.0", org.opentest4j;bundle-version="1.2.0", diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java index 44c86620e..ec475be76 100644 --- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java +++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java @@ -35,12 +35,12 @@ import static org.apache.directory.studio.test.integration.junit5.TestFixture.US import static org.apache.directory.studio.test.integration.junit5.TestFixture.dn; import static org.hamcrest.CoreMatchers.hasItems; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.net.ConnectException; import java.nio.channels.UnresolvedAddressException; diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/SchemaTest.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/SchemaTest.java index bca53f7aa..ed2c87241 100644 --- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/SchemaTest.java +++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/SchemaTest.java @@ -21,8 +21,8 @@ package org.apache.directory.studio.test.integration.core; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.Collection; diff --git a/tests/test.integration.ui/pom-first.xml b/tests/test.integration.ui/pom-first.xml index 3656cd932..9e9159380 100644 --- a/tests/test.integration.ui/pom-first.xml +++ b/tests/test.integration.ui/pom-first.xml @@ -47,15 +47,13 @@ true org.apache.directory.studio.test.integration.ui.Activator - org.junit;bundle-version="4.11.0", - org.junit.jupiter.api;bundle-version="5.7.0", + org.junit.jupiter.api;bundle-version="5.7.0", org.junit.jupiter.params;bundle-version="5.7.0", org.opentest4j;bundle-version="1.2.0", org.hamcrest.library;bundle-version="1.3.0", org.eclipse.swtbot.eclipse.finder;bundle-version="3.0.0", org.eclipse.swtbot.eclipse.core;bundle-version="3.0.0", org.eclipse.swtbot.forms.finder;bundle-version="3.0.0", - org.eclipse.swtbot.junit4_x;bundle-version="3.0.0", org.eclipse.swtbot.junit5_x;bundle-version="3.0.0", org.apache.directory.server.apacheds-test-framework;bundle-version="${org.apache.directory.server.version}", diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/utils/FrameworkRunnerWithScreenshotCaptureListener.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/utils/FrameworkRunnerWithScreenshotCaptureListener.java deleted file mode 100644 index 6a508649d..000000000 --- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/utils/FrameworkRunnerWithScreenshotCaptureListener.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://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.apache.directory.studio.test.integration.ui.utils; - - -import org.apache.directory.server.core.integ.FrameworkRunner; -import org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener; -import org.junit.runner.notification.RunListener; -import org.junit.runner.notification.RunNotifier; -import org.junit.runners.model.InitializationError; - - -public class FrameworkRunnerWithScreenshotCaptureListener extends FrameworkRunner -{ - - public FrameworkRunnerWithScreenshotCaptureListener( Class clazz ) throws InitializationError - { - super( clazz ); - } - - - public void run( RunNotifier notifier ) - { - RunListener failureSpy = new ScreenshotCaptureListener(); - notifier.removeListener( failureSpy ); - notifier.addListener( failureSpy ); - try - { - super.run( notifier ); - } - finally - { - notifier.removeListener( failureSpy ); - } - } - -} -- cgit v1.2.3