You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2021/05/03 04:13:10 UTC
[directory-studio] 04/07: Remove JUnit4
This is an automated email from the ASF dual-hosted git repository.
seelmann pushed a commit to branch DIRSTUDIO-1274-rework-integration-tests
in repository https://gitbox.apache.org/repos/asf/directory-studio.git
commit b8b4574bea75ac9afafa505354590de1b1075be1
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sun May 2 20:33:31 2021 +0200
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(-)
diff --git a/tests/test.integration.core/pom-first.xml b/tests/test.integration.core/pom-first.xml
index d9ab520..0097936 100644
--- a/tests/test.integration.core/pom-first.xml
+++ b/tests/test.integration.core/pom-first.xml
@@ -49,8 +49,7 @@
<Export-Package>org.apache.directory.studio.test.integration.junit5</Export-Package>
- <Require-Bundle>org.junit;bundle-version="4.11.0",
- org.hamcrest.library;bundle-version="1.3.0",
+ <Require-Bundle>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 44c8662..ec475be 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 bca53f7..ed2c872 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 3656cd9..9e91593 100644
--- a/tests/test.integration.ui/pom-first.xml
+++ b/tests/test.integration.ui/pom-first.xml
@@ -47,15 +47,13 @@
<Eclipse-LazyStart>true</Eclipse-LazyStart>
<Bundle-Activator>org.apache.directory.studio.test.integration.ui.Activator</Bundle-Activator>
- <Require-Bundle>org.junit;bundle-version="4.11.0",
- org.junit.jupiter.api;bundle-version="5.7.0",
+ <Require-Bundle>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 6a50864..0000000
--- 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 );
- }
- }
-
-}