You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/10/02 13:29:23 UTC
[3/5] syncope git commit: [SYNCOPE-1208] Now using JUnit 5 (with
temporary junit-platform-surefire-provider 1.1.0-SNAPSHOT)
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java
----------------------------------------------------------------------
diff --git a/core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java b/core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java
index a18ef15..2edab6d 100644
--- a/core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java
+++ b/core/spring/src/test/java/org/apache/syncope/core/spring/security/PasswordGeneratorTest.java
@@ -18,9 +18,10 @@
*/
package org.apache.syncope.core.spring.security;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.ArrayList;
import java.util.Collections;
@@ -29,7 +30,7 @@ import org.apache.syncope.common.lib.policy.DefaultPasswordRuleConf;
import org.apache.syncope.common.lib.policy.PasswordRuleConf;
import org.apache.syncope.core.provisioning.api.utils.policy.InvalidPasswordRuleConf;
import org.apache.syncope.core.provisioning.api.utils.policy.PolicyPattern;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class PasswordGeneratorTest {
@@ -107,18 +108,20 @@ public class PasswordGeneratorTest {
assertTrue(Character.isLetter(generatedPassword.charAt(generatedPassword.length() - 1)));
}
- @Test(expected = InvalidPasswordRuleConf.class)
- public void incopatiblePolicies() throws InvalidPasswordRuleConf {
- DefaultPasswordRuleConf pwdRuleConf = createBaseDefaultPasswordRuleConf();
- pwdRuleConf.setMinLength(12);
-
- DefaultPasswordRuleConf pwdRuleConf2 = createBaseDefaultPasswordRuleConf();
- pwdRuleConf.setMaxLength(10);
-
- List<PasswordRuleConf> pwdRuleConfs = new ArrayList<>();
- pwdRuleConfs.add(pwdRuleConf);
- pwdRuleConfs.add(pwdRuleConf2);
- passwordGenerator.generate(pwdRuleConfs);
+ @Test
+ public void incopatiblePolicies() {
+ assertThrows(InvalidPasswordRuleConf.class, () -> {
+ DefaultPasswordRuleConf pwdRuleConf = createBaseDefaultPasswordRuleConf();
+ pwdRuleConf.setMinLength(12);
+
+ DefaultPasswordRuleConf pwdRuleConf2 = createBaseDefaultPasswordRuleConf();
+ pwdRuleConf.setMaxLength(10);
+
+ List<PasswordRuleConf> pwdRuleConfs = new ArrayList<>();
+ pwdRuleConfs.add(pwdRuleConf);
+ pwdRuleConfs.add(pwdRuleConf2);
+ passwordGenerator.generate(pwdRuleConfs);
+ });
}
@Test
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/console-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index d91fc16..3ceedf0 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -100,8 +100,8 @@ under the License.
<!-- TEST -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index a6fddb1..aebc662 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -172,8 +172,8 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
index f29786d..98a80a9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.fit;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.InputStream;
import java.net.URI;
@@ -99,14 +99,11 @@ import org.apache.syncope.common.rest.api.service.UserWorkflowService;
import org.apache.syncope.common.rest.api.service.WorkflowService;
import org.apache.syncope.fit.core.UserITCase;
import org.identityconnectors.common.security.Encryptor;
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.BeforeAll;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
import org.springframework.jdbc.core.JdbcTemplate;
-@FixMethodOrder(MethodSorters.JVM)
public abstract class AbstractITCase {
protected static final Logger LOG = LoggerFactory.getLogger(AbstractITCase.class);
@@ -243,7 +240,7 @@ public abstract class AbstractITCase {
protected static SAML2IdPService saml2IdPService;
- @BeforeClass
+ @BeforeAll
public static void securitySetup() {
InputStream propStream = null;
try {
@@ -267,7 +264,7 @@ public abstract class AbstractITCase {
assertNotNull(JWT_ISSUER);
}
- @BeforeClass
+ @BeforeAll
public static void restSetup() {
clientFactory = new SyncopeClientFactoryBean().setAddress(ADDRESS);
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/cli/CLIITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/cli/CLIITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/cli/CLIITCase.java
index c902481..431e119 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/cli/CLIITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/cli/CLIITCase.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.fit.cli;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.io.IOException;
@@ -43,8 +43,8 @@ import org.apache.syncope.client.cli.commands.report.ReportCommand;
import org.apache.syncope.client.cli.commands.role.RoleCommand;
import org.apache.syncope.client.cli.commands.user.UserCommand;
import org.apache.syncope.fit.AbstractITCase;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
public class CLIITCase extends AbstractITCase {
@@ -52,7 +52,7 @@ public class CLIITCase extends AbstractITCase {
private static ProcessBuilder PROCESS_BUILDER;
- @BeforeClass
+ @BeforeAll
public static void install() {
Properties props = new Properties();
InputStream propStream = null;
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
index 5ba0f70..b7574e1 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
@@ -31,13 +31,10 @@ import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.util.tester.FormTester;
import org.apache.wicket.util.tester.WicketTester;
import org.apache.wicket.util.visit.IVisit;
-import org.junit.BeforeClass;
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
+import org.junit.jupiter.api.BeforeAll;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@FixMethodOrder(MethodSorters.JVM)
public abstract class AbstractConsoleITCase {
protected static final Logger LOG = LoggerFactory.getLogger(AbstractConsoleITCase.class);
@@ -56,7 +53,7 @@ public abstract class AbstractConsoleITCase {
protected static SyncopeService SYNCOPE_SERVICE;
- @BeforeClass
+ @BeforeAll
public static void setUp() {
TESTER = ConsoleSetup.TESTER;
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractTypesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractTypesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractTypesITCase.java
index 6a395ad..bf8ebff 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractTypesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractTypesITCase.java
@@ -22,7 +22,7 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.pages.Types;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
public abstract class AbstractTypesITCase extends AbstractConsoleITCase {
@@ -35,7 +35,7 @@ public abstract class AbstractTypesITCase extends AbstractConsoleITCase {
protected static final String DATATABLE_PATH =
"body:content:tabbedPanel:panel:container:content:searchContainer:resultTable";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java
index a941be5..31d05aa 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java
@@ -31,7 +31,7 @@ import org.apache.syncope.client.console.pages.Types;
import org.apache.syncope.client.console.pages.Workflow;
import org.apache.syncope.client.console.topology.Topology;
import org.apache.syncope.fit.FlowableDetector;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
// Please, keep the class name as is in order to respect the execution order. It seems that from wicket 7.5.0 the
// session creted never expire and the unsuccessfulLogin test fail
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxPalettePanelITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxPalettePanelITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxPalettePanelITCase.java
index a8da748..e33acb3 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxPalettePanelITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxPalettePanelITCase.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Arrays;
import java.util.Collection;
@@ -28,7 +28,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePane
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.util.ListModel;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AjaxPalettePanelITCase extends AbstractConsoleITCase {
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxTextFieldITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxTextFieldITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxTextFieldITCase.java
index a29b296..04547e4 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxTextFieldITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxTextFieldITCase.java
@@ -18,14 +18,14 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.wicket.util.string.Strings;
import org.apache.wicket.util.tester.FormTester;
import org.apache.wicket.validation.validator.StringValidator;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
index 75d65bb..a40cb6d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
@@ -18,16 +18,16 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.markup.html.form.TextField;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
public class AnyObjectsITCase extends AbstractConsoleITCase {
@@ -35,7 +35,7 @@ public class AnyObjectsITCase extends AbstractConsoleITCase {
private static final String CONTAINER = TAB_PANEL + "container:content:";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
index d17ee20..1885bf3 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -29,7 +29,7 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.wicket.Component;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AnyTypeClassesITCase extends AbstractTypesITCase {
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
index 3125d26..94f4695 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -30,7 +30,7 @@ import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.Bas
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AnyTypesITCase extends AbstractTypesITCase {
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
index a55bf67..cd20170 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.status.Status;
@@ -28,8 +28,8 @@ import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class BulkActionITCase extends AbstractConsoleITCase {
@@ -37,7 +37,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
private static final String CONTAINER = TAB_PANEL + "container:content:";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
index 7de9a0d..21cdfb6 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
@@ -21,12 +21,12 @@ package org.apache.syncope.fit.console;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.pages.Realms;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class DisplayAttributesITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:realmsLI:realms");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
index 3f69966..daac35d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
@@ -18,18 +18,18 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
public class GroupsITCase extends AbstractConsoleITCase {
@@ -37,7 +37,7 @@ public class GroupsITCase extends AbstractConsoleITCase {
private final static String CONTAINER = TAB_PANEL + "container:content:";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java
index 904afab..9d8beaf 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/LogsITCase.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.lang.reflect.InvocationTargetException;
import org.apache.syncope.client.console.pages.Logs;
@@ -30,14 +30,14 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.util.visit.IVisit;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class LogsITCase extends AbstractConsoleITCase {
private static final String CONTAINER_PATH = "body:content:tabbedPanel:panel:loggerContainer";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:logsLI:logs");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
index 4e5ff94..9b9c3e0 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -27,12 +27,12 @@ import org.apache.syncope.client.console.pages.Notifications;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class NotificationsITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:notificationsLI:notifications");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
index cd2bb43..a57f004 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -26,12 +26,12 @@ import org.apache.syncope.client.console.pages.Parameters;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class ParametersITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:parametersLI:parameters");
@@ -73,7 +73,7 @@ public class ParametersITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(SCHEMA, "body:content:parametersPanel", "notification.maxRetries");
assertNotNull(result);
-
+
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:parametersPanel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -112,7 +112,7 @@ public class ParametersITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(SCHEMA, "body:content:parametersPanel", "deleteParam");
assertNotNull(result);
-
+
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:parametersPanel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
index 0db5e95..f3be793 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -30,13 +30,12 @@ import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class PoliciesITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:policiesLI:policies");
@@ -72,7 +71,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -94,7 +93,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
}
private void createPasswordPolicy(final String description) {
@@ -122,7 +121,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -140,7 +139,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button",
Constants.ON_CLICK);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
}
@@ -168,7 +167,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -182,7 +181,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button",
Constants.ON_CLICK);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
}
@@ -191,7 +190,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
@@ -206,7 +205,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- Assert.assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
}
@@ -215,7 +214,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
@@ -230,7 +229,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- Assert.assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
}
@@ -239,7 +238,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
@@ -254,13 +253,13 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- Assert.assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
}
@Test
public void read() {
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "an account policy"));
}
@@ -279,7 +278,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
@@ -301,12 +300,12 @@ public class PoliciesITCase extends AbstractConsoleITCase {
closeCallBack(modal);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
deleteAccountPolicy(description);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2"));
deleteAccountPolicy(description + "2");
@@ -327,7 +326,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
@@ -349,12 +348,12 @@ public class PoliciesITCase extends AbstractConsoleITCase {
closeCallBack(modal);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
deletePasswordPolicy(description);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2"));
deletePasswordPolicy(description + "2");
@@ -375,7 +374,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
@@ -397,12 +396,12 @@ public class PoliciesITCase extends AbstractConsoleITCase {
closeCallBack(modal);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
deletePullPolicy(description);
- Assert.assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2"));
deletePullPolicy(description + "2");
@@ -416,7 +415,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -441,7 +440,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -463,7 +462,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", policyDescription);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
@@ -497,7 +496,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "content:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
ruleName);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.clickLink(
"body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:exit");
@@ -521,7 +520,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -546,7 +545,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -571,7 +570,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
@@ -604,7 +603,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "content:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
"myrule");
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.clickLink(
"body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:exit");
@@ -625,7 +624,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component modal = TESTER.getComponentFromLastRenderedPage(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -647,7 +646,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2");
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -672,7 +671,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
@@ -703,7 +702,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
- Assert.assertNotNull(component);
+ assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
index cb02357..a5ba6a0 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -26,12 +26,12 @@ import org.apache.syncope.client.console.pages.Realms;
import org.apache.syncope.client.console.panels.TogglePanel;
import org.apache.wicket.Component;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class RealmsITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:realmsLI:realms");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
index a9fe924..a740dfa 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
@@ -27,7 +27,7 @@ import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.Bas
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class RelationshipTypesITCase extends AbstractTypesITCase {
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
index c94b48b..f4bd69b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -27,12 +27,12 @@ import org.apache.syncope.client.console.pages.Reports;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class ReportsITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:reportsLI:reports");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
index 65d6f3f..1f0ec42 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
@@ -18,20 +18,20 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Administration;
import org.apache.wicket.Component;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class RolesITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:administrationLI:administration");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
index 45303fb..50aaefa 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -28,7 +28,7 @@ import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class SchemasITCase extends AbstractTypesITCase {
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
index 7efdd45..4a06ea1 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.fit.console;
-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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
@@ -29,12 +29,12 @@ import org.apache.wicket.Component;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class SecurityQuestionsITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:configurationLI:configurationUL:securityquestionsLI:securityquestions");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
index 48963a2..0a910b0 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
@@ -18,8 +18,8 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
@@ -35,12 +35,12 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class TopologyITCase extends AbstractConsoleITCase {
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
TESTER.clickLink("body:topologyLI:topology");
@@ -114,7 +114,7 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:"
+ "content:group:beans:0:fields:0", Constants.ON_CLICK);
-
+
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:toggle:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
@@ -237,10 +237,10 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:"
+ "content:group:beans:0:fields:0", Constants.ON_CLICK);
-
+
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:toggle:container:content:"
+ "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
-
+
formTester = TESTER.newFormTester(
"body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:wizard:form");
formTester.submit("buttons:next");
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
index 25f544d..7751605 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
@@ -18,19 +18,19 @@
*/
package org.apache.syncope.fit.console;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.Calendar;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
public class UsersITCase extends AbstractConsoleITCase {
@@ -38,7 +38,7 @@ public class UsersITCase extends AbstractConsoleITCase {
private static final String CONTAINER = TAB_PANEL + "container:content:";
- @Before
+ @BeforeEach
public void login() {
doLogin(ADMIN_UNAME, ADMIN_PWD);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
index 41c7844..e1e41e9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import com.icegreen.greenmail.util.GreenMail;
import com.icegreen.greenmail.util.ServerSetup;
@@ -30,8 +30,8 @@ import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Store;
import org.apache.commons.io.IOUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase {
@@ -45,7 +45,7 @@ public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase
private static GreenMail greenMail;
- @BeforeClass
+ @BeforeAll
public static void startGreenMail() {
Properties props = new Properties();
InputStream propStream = null;
@@ -70,7 +70,7 @@ public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase
greenMail.start();
}
- @AfterClass
+ @AfterAll
public static void stopGreenMail() {
if (greenMail != null) {
greenMail.stop();
@@ -83,7 +83,6 @@ public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase
boolean found = false;
Session session = Session.getDefaultInstance(System.getProperties());
- session.setDebug(true);
Store store = session.getStore("pop3");
store.connect(POP3_HOST, POP3_PORT, mailAddress, mailAddress);
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
index 94dafbd..92aa4b2 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.ArrayList;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java
index 31e7f1b..1829c30 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java
@@ -18,11 +18,11 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.Set;
import java.util.UUID;
@@ -42,7 +42,7 @@ import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.rest.api.beans.AnyQuery;
import org.apache.syncope.fit.AbstractITCase;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AnyObjectITCase extends AbstractITCase {
@@ -83,7 +83,7 @@ public class AnyObjectITCase extends AbstractITCase {
try {
createAnyObject(anyObjectTO);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidMembership, e.getType());
}
@@ -194,7 +194,7 @@ public class AnyObjectITCase extends AbstractITCase {
try {
anyObjectService.read(anyObjectTO.getKey(), SchemaType.PLAIN, "location");
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.NotFound, e.getType());
}
@@ -208,7 +208,7 @@ public class AnyObjectITCase extends AbstractITCase {
try {
createAnyObject(anyObjectTO).getEntity();
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidAnyType, e.getType());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeClassITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeClassITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeClassITCase.java
index 5cc40f8..703cd4b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeClassITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeClassITCase.java
@@ -18,12 +18,12 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+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 static org.junit.jupiter.api.Assertions.fail;
import java.util.List;
import javax.ws.rs.core.Response;
@@ -36,7 +36,7 @@ import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
import org.apache.syncope.fit.AbstractITCase;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AnyTypeClassITCase extends AbstractITCase {
@@ -99,7 +99,7 @@ public class AnyTypeClassITCase extends AbstractITCase {
try {
anyTypeClassService.read(newClass.getKey());
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.NotFound, e.getType());
}
@@ -143,7 +143,7 @@ public class AnyTypeClassITCase extends AbstractITCase {
try {
anyTypeClassService.create(newAnyTypeClass);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.EntityExists, e.getType());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeITCase.java
index 93cd326..ba3f65c 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyTypeITCase.java
@@ -18,11 +18,11 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import java.util.List;
import javax.ws.rs.core.Response;
@@ -34,7 +34,7 @@ import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
import org.apache.syncope.common.rest.api.service.AnyTypeService;
import org.apache.syncope.fit.AbstractITCase;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class AnyTypeITCase extends AbstractITCase {
@@ -93,7 +93,7 @@ public class AnyTypeITCase extends AbstractITCase {
try {
anyTypeService.read(newType.getKey());
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.NotFound, e.getType());
}
@@ -106,7 +106,7 @@ public class AnyTypeITCase extends AbstractITCase {
newType.setKind(AnyTypeKind.USER);
try {
anyTypeService.create(newType);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidAnyType, e.getType());
}
@@ -119,7 +119,7 @@ public class AnyTypeITCase extends AbstractITCase {
newType.setKind(AnyTypeKind.GROUP);
try {
anyTypeService.create(newType);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.EntityExists, e.getType());
}
@@ -129,7 +129,7 @@ public class AnyTypeITCase extends AbstractITCase {
public void deleteInvalid() {
try {
anyTypeService.delete(AnyTypeKind.USER.name());
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidAnyType, e.getType());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
index bbc7ef3..946d97d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java
@@ -18,11 +18,12 @@
*/
package org.apache.syncope.fit.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.security.AccessControlException;
import java.util.Map;
@@ -72,16 +73,12 @@ import org.apache.syncope.common.rest.api.service.UserService;
import org.apache.syncope.core.spring.security.Encryptor;
import org.apache.syncope.fit.AbstractITCase;
import org.apache.syncope.fit.FlowableDetector;
-import org.junit.Assume;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" })
+@SpringJUnitConfig(locations = { "classpath:testJDBCEnv.xml" })
public class AuthenticationITCase extends AbstractITCase {
@Autowired
@@ -99,7 +96,7 @@ public class AuthenticationITCase extends AbstractITCase {
// 1. as not authenticated (not allowed)
try {
clientFactory.create().self();
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -181,7 +178,7 @@ public class AuthenticationITCase extends AbstractITCase {
try {
userService3.read("b3cbc78d-32e6-4bd4-92e0-bbe07566a2ee");
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertNotNull(e);
assertEquals(ClientExceptionType.DelegatedAdministration, e.getType());
@@ -253,7 +250,7 @@ public class AuthenticationITCase extends AbstractITCase {
UserTO user = UserITCase.getUniqueSampleTO("delegated@syncope.apache.org");
try {
delegatedUserService.create(user);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.DelegatedAdministration, e.getType());
}
@@ -276,7 +273,7 @@ public class AuthenticationITCase extends AbstractITCase {
try {
delegatedUserService.update(userPatch);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.DelegatedAdministration, e.getType());
}
@@ -296,7 +293,7 @@ public class AuthenticationITCase extends AbstractITCase {
try {
userService.read(user.getKey());
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.NotFound, e.getType());
}
@@ -326,13 +323,13 @@ public class AuthenticationITCase extends AbstractITCase {
// authentications failed ...
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -358,19 +355,19 @@ public class AuthenticationITCase extends AbstractITCase {
// authentications failed ...
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -380,7 +377,7 @@ public class AuthenticationITCase extends AbstractITCase {
// last authentication before suspension
try {
clientFactory.create(userTO.getUsername(), "wrongpwd1");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -388,13 +385,13 @@ public class AuthenticationITCase extends AbstractITCase {
userTO = userService.read(userTO.getKey());
assertNotNull(userTO);
assertNotNull(userTO.getFailedLogins());
- assertEquals(3, userTO.getFailedLogins(), 0);
+ assertEquals(3, userTO.getFailedLogins().intValue());
assertEquals("suspended", userTO.getStatus());
// Access with correct credentials should fail as user is suspended
try {
clientFactory.create(userTO.getUsername(), "password123");
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -408,7 +405,7 @@ public class AuthenticationITCase extends AbstractITCase {
assertEquals("active", userTO.getStatus());
SyncopeClient goodPwdClient = clientFactory.create(userTO.getUsername(), "password123");
- assertEquals(0, goodPwdClient.self().getValue().getFailedLogins(), 0);
+ assertEquals(0, goodPwdClient.self().getValue().getFailedLogins().intValue());
}
@Test
@@ -450,7 +447,7 @@ public class AuthenticationITCase extends AbstractITCase {
SyncopeClient belliniClient = clientFactory.create("bellini", ADMIN_PWD);
try {
belliniClient.getService(AnyObjectService.class).create(folder);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.DelegatedAdministration, e.getType());
}
@@ -479,7 +476,7 @@ public class AuthenticationITCase extends AbstractITCase {
@Test
public void issueSYNCOPE434() {
- Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
+ assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
// 1. create user with group 'groupForWorkflowApproval'
// (users with group groupForWorkflowApproval are defined in workflow as subject to approval)
@@ -494,7 +491,7 @@ public class AuthenticationITCase extends AbstractITCase {
// 2. try to authenticate: fail
try {
clientFactory.create(userTO.getUsername(), "password123").self();
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e);
}
@@ -558,14 +555,14 @@ public class AuthenticationITCase extends AbstractITCase {
String username = getUUIDString();
try {
userService.read(username);
- fail();
+ fail("This should not happen");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.NotFound, e.getType());
}
try {
clientFactory.create(username, "anypassword").self();
- fail();
+ fail("This should not happen");
} catch (AccessControlException e) {
assertNotNull(e.getMessage());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
index f3b9693..95516a8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
@@ -20,8 +20,10 @@ package org.apache.syncope.fit.core;
import org.apache.syncope.fit.CamelDetector;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.util.List;
import org.apache.syncope.common.lib.SyncopeConstants;
@@ -33,15 +35,13 @@ import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.AttrSchemaType;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.fit.AbstractITCase;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class CamelRouteITCase extends AbstractITCase {
@Test
public void userRoutes() {
- Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
+ assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
List<CamelRouteTO> userRoutes = camelRouteService.list(AnyTypeKind.USER);
assertNotNull(userRoutes);
@@ -51,7 +51,7 @@ public class CamelRouteITCase extends AbstractITCase {
@Test
public void groupRoutes() {
- Assume.assumeTrue(CamelDetector.isCamelEnabledForGroups(syncopeService));
+ assumeTrue(CamelDetector.isCamelEnabledForGroups(syncopeService));
List<CamelRouteTO> groupRoutes = camelRouteService.list(AnyTypeKind.GROUP);
assertNotNull(groupRoutes);
@@ -69,7 +69,7 @@ public class CamelRouteITCase extends AbstractITCase {
@Test
public void update() {
- Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
+ assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
CamelRouteTO oldRoute = camelRouteService.read("createUser");
assertNotNull(oldRoute);
@@ -103,7 +103,7 @@ public class CamelRouteITCase extends AbstractITCase {
@Test
public void scriptingUpdate() {
- Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
+ assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
CamelRouteTO oldRoute = camelRouteService.read("createUser");
// updating route content including new attribute management
@@ -169,7 +169,7 @@ public class CamelRouteITCase extends AbstractITCase {
@Test
public void issueSYNCOPE931() {
- Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
+ assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
CamelRouteTO oldRoute = camelRouteService.read("createUser");
assertNotNull(oldRoute);
@@ -197,7 +197,7 @@ public class CamelRouteITCase extends AbstractITCase {
// Try to update a route with an incorrect propagation type
try {
doUpdate("createUser", routeContent);
- Assert.fail("Error expected on an incorrect propagation type");
+ fail("Error expected on an incorrect propagation type");
} catch (Exception ex) {
// Expected
}