Repository: syncope Updated Branches: refs/heads/master 7af5e995d -> f19e261cf
http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 ec17ed3..c44f52a 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 @@ -28,11 +28,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RealmsITCase extends AbstractConsoleITCase { @Before @@ -113,9 +110,9 @@ public class RealmsITCase extends AbstractConsoleITCase { TESTER.executeAjaxEvent("body:content:realmChoicePanel:container:realms:btn", Constants.ON_CLICK); TESTER.executeAjaxEvent("body:content:realmChoicePanel:container:realms:dropdown-menu:buttons:3:button", Constants.ON_CLICK); - + TESTER.assertLabel("body:content:realmChoicePanel:container:realm", "/odd"); - + TESTER.clickLink( "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelTemplate:templateLink"); TESTER.assertComponent("body:content:toggleTemplates", TogglePanel.class); @@ -133,7 +130,7 @@ public class RealmsITCase extends AbstractConsoleITCase { TESTER.assertInfoMessages("Operation executed successfully"); TESTER.cleanupFeedbackMessages(); - + TESTER.assertLabel("body:content:realmChoicePanel:container:realm", "/odd"); TESTER.clickLink( @@ -149,7 +146,7 @@ public class RealmsITCase extends AbstractConsoleITCase { TESTER.assertModelValue("body:content:templateModal:form:content:form:view:username:textField", "'k' + firstname"); - + formTester = TESTER.newFormTester("body:content:templateModal:form:content:form"); formTester.setValue("view:username:textField", ""); formTester.submit("buttons:finish"); @@ -192,10 +189,10 @@ public class RealmsITCase extends AbstractConsoleITCase { TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:second:remoteObject:propView:0:value:oldAttribute:textField", null); - + TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:second:remoteObject:propView:1:value:oldAttribute:textField", null); - + TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:second:remoteObject:propView:2:value:oldAttribute:textField", null); @@ -253,10 +250,10 @@ public class RealmsITCase extends AbstractConsoleITCase { TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:second:remoteObject:propView:1:value:newAttribute:textField", null); - + TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:second:remoteObject:propView:2:value:newAttribute:textField", null); - + TESTER.clickLink("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:" + "secondLevelContainer:back"); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypeITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypeITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypeITCase.java deleted file mode 100644 index 0f9af86..0000000 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypeITCase.java +++ /dev/null @@ -1,124 +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.syncope.fit.console; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import org.apache.syncope.client.console.panels.AjaxDataTablePanel; -import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; -import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink; -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.FixMethodOrder; -import org.junit.Test; -import org.junit.runners.MethodSorters; - -@FixMethodOrder(MethodSorters.JVM) -public class RelationshipTypeITCase extends AbstractTypesITCase { - - @Test - public void read() { - browsingToRelationshipType(); - - Component result = findComponentByProp(KEY, DATATABLE_PATH, "inclusion"); - - TESTER.assertComponent( - result.getPageRelativePath() + ":cells:1:cell", Label.class); - - TESTER.assertComponent( - result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class); - - TESTER.clickLink( - result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink"); - - TESTER.assertComponent( - "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class); - } - - @Test - public void create() { - final String name = "relationshipTypeTest"; - createRelationshipType(name); - browsingToRelationshipType(); - - TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class); - - Component result = findComponentByProp(KEY, DATATABLE_PATH, name); - - TESTER.assertLabel(result.getPageRelativePath() + ":cells:1:cell", name); - TESTER.assertLabel(result.getPageRelativePath() + ":cells:2:cell", "test relationshipType"); - } - - @Test - public void update() { - final String name = "relationshipTypeUpdate"; - createRelationshipType(name); - browsingToRelationshipType(); - - TESTER.assertComponent( - DATATABLE_PATH - + ":tablePanel:groupForm:checkgroup:dataTable:" - + "body:rows:1:cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class); - - TESTER.clickLink( - DATATABLE_PATH - + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:3:cell:panelEdit:editLink"); - - final FormTester formTester = - TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"); - formTester.setValue( - "content:relationshipTypeDetails:container:form:description:textField", "new description"); - - TESTER.clickLink( - "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit"); - TESTER.assertInfoMessages("Operation executed successfully"); - } - - @Test - public void delete() { - final String name = "relationshipTypeDelete"; - createRelationshipType(name); - browsingToRelationshipType(); - - TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class); - - Component result = findComponentByProp(KEY, DATATABLE_PATH, name); - - assertNotNull(result); - TESTER.assertComponent( - result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink", - IndicatingOnConfirmAjaxLink.class); - - TESTER.getRequest().addParameter("confirm", "true"); - TESTER.clickLink(TESTER.getComponentFromLastRenderedPage( - result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink")); - - TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage( - result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"), "onclick"); - TESTER.assertInfoMessages("Operation executed successfully"); - - TESTER.cleanupFeedbackMessages(); - result = findComponentByProp(KEY, DATATABLE_PATH, name); - - assertNull(result); - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 new file mode 100644 index 0000000..c5bde0c --- /dev/null +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java @@ -0,0 +1,121 @@ +/* + * 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.syncope.fit.console; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import org.apache.syncope.client.console.panels.AjaxDataTablePanel; +import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; +import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink; +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.Test; + +public class RelationshipTypesITCase extends AbstractTypesITCase { + + @Test + public void read() { + browsingToRelationshipType(); + + Component result = findComponentByProp(KEY, DATATABLE_PATH, "inclusion"); + + TESTER.assertComponent( + result.getPageRelativePath() + ":cells:1:cell", Label.class); + + TESTER.assertComponent( + result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class); + + TESTER.clickLink( + result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink"); + + TESTER.assertComponent( + "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class); + } + + @Test + public void create() { + final String name = "relationshipTypeTest"; + createRelationshipType(name); + browsingToRelationshipType(); + + TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class); + + Component result = findComponentByProp(KEY, DATATABLE_PATH, name); + + TESTER.assertLabel(result.getPageRelativePath() + ":cells:1:cell", name); + TESTER.assertLabel(result.getPageRelativePath() + ":cells:2:cell", "test relationshipType"); + } + + @Test + public void update() { + final String name = "relationshipTypeUpdate"; + createRelationshipType(name); + browsingToRelationshipType(); + + TESTER.assertComponent( + DATATABLE_PATH + + ":tablePanel:groupForm:checkgroup:dataTable:" + + "body:rows:1:cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class); + + TESTER.clickLink( + DATATABLE_PATH + + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:3:cell:panelEdit:editLink"); + + final FormTester formTester = + TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"); + formTester.setValue( + "content:relationshipTypeDetails:container:form:description:textField", "new description"); + + TESTER.clickLink( + "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit"); + TESTER.assertInfoMessages("Operation executed successfully"); + } + + @Test + public void delete() { + final String name = "relationshipTypeDelete"; + createRelationshipType(name); + browsingToRelationshipType(); + + TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class); + + Component result = findComponentByProp(KEY, DATATABLE_PATH, name); + + assertNotNull(result); + TESTER.assertComponent( + result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink", + IndicatingOnConfirmAjaxLink.class); + + TESTER.getRequest().addParameter("confirm", "true"); + TESTER.clickLink(TESTER.getComponentFromLastRenderedPage( + result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink")); + + TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage( + result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"), "onclick"); + TESTER.assertInfoMessages("Operation executed successfully"); + + TESTER.cleanupFeedbackMessages(); + result = findComponentByProp(KEY, DATATABLE_PATH, name); + + assertNull(result); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 2d489cb..7adf92d 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 @@ -28,11 +28,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ReportsITCase extends AbstractConsoleITCase { @Before http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 80a286b..05d98e3 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 @@ -27,11 +27,8 @@ import org.apache.syncope.client.console.pages.Roles; import org.apache.wicket.Component; import org.apache.wicket.util.tester.FormTester; import org.junit.Before; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RolesITCase extends AbstractConsoleITCase { @Before http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 1b24196..75f3057 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 @@ -30,11 +30,8 @@ import org.apache.wicket.Component; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.util.tester.FormTester; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SchemasITCase extends AbstractTypesITCase { @Test @@ -152,7 +149,7 @@ public class SchemasITCase extends AbstractTypesITCase { TESTER.getRequest().addParameter("confirm", "true"); TESTER.clickLink(TESTER.getComponentFromLastRenderedPage( - result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink")); + result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink")); TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage( result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink"), "onclick"); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 a9dac35..50aa667 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 @@ -29,11 +29,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SecurityQuestionsITCase extends AbstractConsoleITCase { @Before http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 713e899..7a6d343 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 @@ -25,19 +25,16 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink; import org.junit.Before; -@FixMethodOrder(MethodSorters.JVM) public class UsersITCase extends AbstractConsoleITCase { private static final String TAB_PANEL = "body:content:body:container:content:tabbedPanel:panel:searchResult:"; - private static final String SEARCH_RES_CONTAINER = TAB_PANEL + "container:content:"; + private static final String CONTAINER = TAB_PANEL + "container:content:"; @Before public void login() { @@ -66,7 +63,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink("body:realmsLI:realms"); TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link"); - Component component = findComponentByProp("username", SEARCH_RES_CONTAINER + Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "verdi"); assertNotNull(component); @@ -81,7 +78,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink("body:realmsLI:realms"); TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link"); - Component component = findComponentByProp("username", SEARCH_RES_CONTAINER + Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini"); assertNotNull(component); @@ -102,7 +99,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink("body:realmsLI:realms"); TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link"); - Component component = findComponentByProp("username", SEARCH_RES_CONTAINER + Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini"); assertNotNull(component); @@ -153,7 +150,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink"); - component = findComponentByProp("username", SEARCH_RES_CONTAINER + component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini"); assertNotNull(component); } @@ -167,11 +164,11 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link"); - Component component = findComponentByProp("username", SEARCH_RES_CONTAINER + Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini"); assertNull(component); - component = findComponentByProp("username", SEARCH_RES_CONTAINER + component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini"); assertNotNull(component); @@ -217,7 +214,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink"); - component = findComponentByProp("username", SEARCH_RES_CONTAINER + component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini"); assertNotNull(component); @@ -247,7 +244,7 @@ public class UsersITCase extends AbstractConsoleITCase { TESTER.clickLink("body:realmsLI:realms"); TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link"); - Component component = findComponentByProp("username", SEARCH_RES_CONTAINER + Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini"); assertNotNull(component); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 171a197..b4aaf2e 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 @@ -42,11 +42,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class AnyObjectITCase extends AbstractITCase { public static AnyObjectTO getSampleTO(final String location) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 bdce865..5cc40f8 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 @@ -36,11 +36,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class AnyTypeClassITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 561ca42..93cd326 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 @@ -34,11 +34,8 @@ 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.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class AnyTypeITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 9d42df9..af6914e 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 @@ -30,6 +30,7 @@ import java.security.AccessControlException; import java.util.HashSet; import java.util.Map; import java.util.Set; +import javax.sql.DataSource; import javax.ws.rs.core.GenericType; import javax.ws.rs.core.Response; import org.apache.commons.collections4.CollectionUtils; @@ -75,14 +76,20 @@ 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.junit.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +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; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class AuthenticationITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + private int getFailedLogins(final UserService userService, final String userKey) { UserTO readUserTO = userService.read(userKey); assertNotNull(readUserTO); @@ -206,7 +213,8 @@ public class AuthenticationITCase extends AbstractITCase { UserService userService2 = clientFactory.create(userTO.getUsername(), "password123"). getService(UserService.class); - PagedResult<UserTO> matchingUsers = userService2.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM). + PagedResult<UserTO> matchingUsers = userService2.search(new AnyQuery.Builder(). + realm(SyncopeConstants.ROOT_REALM). fiql(SyncopeClient.getUserSearchConditionBuilder().isNotNull("key").query()).build()); assertNotNull(matchingUsers); assertFalse(matchingUsers.getResult().isEmpty()); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/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 1f1ec32..20feec6 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 @@ -34,11 +34,8 @@ 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.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class CamelRouteITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConfigurationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConfigurationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConfigurationITCase.java index c6bde9c..d1780e7 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConfigurationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConfigurationITCase.java @@ -42,11 +42,8 @@ import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.EntityViolationType; import org.apache.syncope.common.lib.types.SchemaType; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ConfigurationITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java index 067022b..cfc2cd1 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java @@ -63,11 +63,8 @@ import org.apache.syncope.fit.AbstractITCase; import org.identityconnectors.common.security.GuardedString; import org.identityconnectors.framework.common.objects.ObjectClass; import org.junit.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ConnectorITCase extends AbstractITCase { private static String connectorServerLocation; http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DerSchemaITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DerSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DerSchemaITCase.java index 71a3814..db8bdaa 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DerSchemaITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DerSchemaITCase.java @@ -33,11 +33,8 @@ import org.apache.syncope.common.lib.types.EntityViolationType; import org.apache.syncope.common.lib.types.SchemaType; import org.apache.syncope.common.rest.api.beans.SchemaQuery; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class DerSchemaITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DomainITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DomainITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DomainITCase.java index 6b84092..5c635e5 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DomainITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/DomainITCase.java @@ -31,11 +31,8 @@ import org.apache.syncope.common.lib.to.DomainTO; import org.apache.syncope.common.lib.types.CipherAlgorithm; import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class DomainITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java index e24941a..8a8e6a2 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java @@ -35,11 +35,8 @@ 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.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ExceptionMapperITCase extends AbstractITCase { private static final Properties ERROR_MESSAGES = new Properties(); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java index 939e1f8..9c86a8e 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java @@ -88,11 +88,8 @@ import org.apache.syncope.common.rest.api.beans.AnyQuery; import org.apache.syncope.common.rest.api.service.GroupService; import org.apache.syncope.core.provisioning.java.job.TaskJob; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class GroupITCase extends AbstractITCase { public static GroupTO getBasicSampleTO(final String name) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/LoggerITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/LoggerITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/LoggerITCase.java index e181689..ccd5d24 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/LoggerITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/LoggerITCase.java @@ -44,11 +44,8 @@ import org.apache.syncope.core.logic.ResourceLogic; import org.apache.syncope.core.logic.GroupLogic; import org.apache.syncope.core.logic.UserLogic; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class LoggerITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java index c43cb9b..4911382 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java @@ -36,11 +36,8 @@ import org.apache.syncope.common.lib.to.MailTemplateTO; import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.MailTemplateFormat; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class MailTemplateITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MembershipITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MembershipITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MembershipITCase.java index 946b918..577af66 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MembershipITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MembershipITCase.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import javax.sql.DataSource; import javax.ws.rs.core.Response; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.IterableUtils; @@ -54,14 +55,20 @@ import org.apache.syncope.common.lib.types.ResourceDeassociationAction; import org.apache.syncope.common.rest.api.beans.AnyQuery; import org.apache.syncope.common.rest.api.service.TaskService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +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; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class MembershipITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + @Test public void misc() { UserTO user = UserITCase.getUniqueSampleTO("m...@apache.org"); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java index b2c719f..fee17fb 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java @@ -64,15 +64,15 @@ import org.apache.syncope.core.provisioning.api.utils.ExceptionUtils2; import org.identityconnectors.common.security.GuardedString; import org.identityconnectors.framework.common.objects.ObjectClass; import org.junit.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@ContextConfiguration(locations = { "classpath:migrationContext.xml" }) -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:migrationEnv.xml" }) public class MigrationITCase extends AbstractTaskITCase { private static final String CONNINSTANCE_DISPLAY_NAME = "syncope12DB"; http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java index d5209ac..ae97d2b 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java @@ -62,11 +62,8 @@ import org.apache.syncope.common.rest.api.service.UserService; import org.apache.syncope.fit.AbstractITCase; import org.identityconnectors.framework.common.objects.ObjectClass; import org.junit.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class MultitenancyITCase extends AbstractITCase { @BeforeClass @@ -212,7 +209,8 @@ public class MultitenancyITCase extends AbstractITCase { assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(status)); // verify that pulled user is found - PagedResult<UserTO> matchingUsers = adminClient.getService(UserService.class).search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM). + PagedResult<UserTO> matchingUsers = adminClient.getService(UserService.class).search(new AnyQuery.Builder(). + realm(SyncopeConstants.ROOT_REALM). fiql(SyncopeClient.getUserSearchConditionBuilder().is("username").equalTo("pullFromLDAP").query()). build()); assertNotNull(matchingUsers); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java index 012acb9..c161768 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java @@ -33,11 +33,8 @@ import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.TraceLevel; import org.apache.syncope.common.rest.api.service.NotificationService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class NotificationITCase extends AbstractITCase { private NotificationTO buildNotificationTO() { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java index 02a4c9b..8f3a1cb 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java @@ -55,11 +55,8 @@ import org.apache.syncope.core.logic.notification.NotificationJob; import org.apache.syncope.fit.core.reference.TestNotificationRecipientsProvider; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class NotificationTaskITCase extends AbstractTaskITCase { private static final String MAIL_ADDRESS = "notificationt...@syncope.apache.org"; http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java index 7dad413..8841851 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java @@ -44,11 +44,8 @@ import org.apache.syncope.common.lib.types.EntityViolationType; import org.apache.syncope.common.lib.types.SchemaType; import org.apache.syncope.common.rest.api.beans.SchemaQuery; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class PlainSchemaITCase extends AbstractITCase { private PlainSchemaTO buildPlainSchemaTO(final String name, final AttrSchemaType type) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PolicyITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PolicyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PolicyITCase.java index c66e4d0..7b8d6d9 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PolicyITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PolicyITCase.java @@ -40,11 +40,8 @@ import org.apache.syncope.common.lib.types.PolicyType; import org.apache.syncope.common.lib.policy.PullPolicySpec; import org.apache.syncope.fit.AbstractITCase; import org.apache.syncope.fit.core.reference.TestPullRule; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class PolicyITCase extends AbstractITCase { private PullPolicyTO buildPullPolicyTO() { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java index 68a5bde..abf2d5d 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java @@ -44,11 +44,8 @@ import org.apache.syncope.common.lib.types.TaskType; import org.apache.syncope.common.rest.api.beans.ExecuteQuery; import org.apache.syncope.common.rest.api.beans.ExecQuery; import org.apache.syncope.common.rest.api.beans.TaskQuery; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class PropagationTaskITCase extends AbstractTaskITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java index 47a69cd..c88131f 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java @@ -37,6 +37,7 @@ import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.UUID; +import javax.sql.DataSource; import javax.ws.rs.core.Response; import org.apache.commons.collections4.IterableUtils; import org.apache.commons.collections4.Predicate; @@ -89,15 +90,21 @@ import org.apache.syncope.fit.core.reference.TestPullActions; import org.apache.syncope.fit.core.reference.TestPullRule; import org.identityconnectors.framework.common.objects.Name; import org.junit.BeforeClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class PullTaskITCase extends AbstractTaskITCase { + @Autowired + private DataSource testDataSource; + @BeforeClass public static void testPullActionsSetup() { PullTaskTO pullTask = taskService.read(PULL_TASK_KEY, true); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java index 1edbb8e..9c9a149 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java @@ -27,6 +27,7 @@ import static org.junit.Assert.fail; import java.util.HashSet; import java.util.Set; +import javax.sql.DataSource; import javax.ws.rs.core.Response; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.common.lib.to.AbstractTaskTO; @@ -56,14 +57,20 @@ import org.apache.syncope.common.rest.api.service.NotificationService; import org.apache.syncope.common.rest.api.service.ResourceService; import org.apache.syncope.common.rest.api.service.TaskService; import org.identityconnectors.framework.common.objects.ObjectClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +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; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class PushTaskITCase extends AbstractTaskITCase { + @Autowired + private DataSource testDataSource; + @Test public void getPushActionsClasses() { Set<String> actions = syncopeService.platform().getPushActions(); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RESTITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RESTITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RESTITCase.java index 2af4718..f11e421 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RESTITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RESTITCase.java @@ -52,11 +52,8 @@ import org.apache.syncope.common.rest.api.service.AnyTypeClassService; import org.apache.syncope.common.rest.api.service.GroupService; import org.apache.syncope.common.rest.api.service.UserService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RESTITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RealmITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RealmITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RealmITCase.java index e6ac00a..3d1622e 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RealmITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RealmITCase.java @@ -40,11 +40,8 @@ import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.PropagationTaskExecStatus; import org.apache.syncope.common.rest.api.service.RealmService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RealmITCase extends AbstractITCase { private RealmTO getRealm(final String fullPath) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RelationshipTypeITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RelationshipTypeITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RelationshipTypeITCase.java index bcf0b23..0afa80e 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RelationshipTypeITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RelationshipTypeITCase.java @@ -30,11 +30,8 @@ import org.apache.syncope.common.lib.to.RelationshipTypeTO; import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.rest.api.service.RelationshipTypeService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RelationshipTypeITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java index 651e9bb..9f9f8be 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java @@ -51,11 +51,8 @@ import org.apache.syncope.common.rest.api.beans.BulkExecDeleteQuery; import org.apache.syncope.common.rest.api.beans.ExecuteQuery; import org.apache.syncope.common.rest.api.service.ReportService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ReportITCase extends AbstractITCase { private ReportTO createReport(final ReportTO report) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportTemplateITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportTemplateITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportTemplateITCase.java index 487e936..f640c43 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportTemplateITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportTemplateITCase.java @@ -36,11 +36,8 @@ import org.apache.syncope.common.lib.to.ReportTemplateTO; import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.ReportTemplateFormat; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ReportTemplateITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java index b0b03eb..c2d23b8 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java @@ -56,11 +56,8 @@ import org.apache.syncope.common.rest.api.beans.ConnObjectTOListQuery; import org.apache.syncope.common.rest.api.service.ResourceService; import org.identityconnectors.framework.common.objects.ObjectClass; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class ResourceITCase extends AbstractITCase { private ResourceTO buildResourceTO(final String resourceKey) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RoleITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RoleITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RoleITCase.java index 10b301c..62fdde1 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RoleITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/RoleITCase.java @@ -33,11 +33,8 @@ import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.StandardEntitlement; import org.apache.syncope.common.rest.api.service.RoleService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class RoleITCase extends AbstractITCase { public static RoleTO getSampleRoleTO(final String name) { http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java index fcaf479..c155831 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java @@ -46,11 +46,8 @@ import org.apache.syncope.common.rest.api.beans.ExecQuery; import org.apache.syncope.common.rest.api.beans.TaskQuery; import org.apache.syncope.common.rest.api.service.TaskService; import org.apache.syncope.fit.core.reference.TestSampleJobDelegate; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SchedTaskITCase extends AbstractTaskITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java index 2d9a20d..a044c22 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java @@ -38,11 +38,8 @@ import org.apache.syncope.common.lib.to.UserTO; import org.apache.syncope.common.rest.api.beans.AnyQuery; import org.apache.syncope.common.rest.api.service.RoleService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SearchITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SecurityQuestionITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SecurityQuestionITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SecurityQuestionITCase.java index a4b1d39..cb9b018 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SecurityQuestionITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SecurityQuestionITCase.java @@ -30,11 +30,8 @@ import org.apache.syncope.common.lib.to.SecurityQuestionTO; import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.rest.api.service.SecurityQuestionService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SecurityQuestionITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SwaggerITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SwaggerITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SwaggerITCase.java index 654583b..78c219b 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SwaggerITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SwaggerITCase.java @@ -31,11 +31,8 @@ import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.client.WebClient; import org.apache.syncope.fit.AbstractITCase; import org.junit.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class SwaggerITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java index febe081..f5f73a5 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java @@ -84,11 +84,8 @@ import org.apache.syncope.fit.AbstractITCase; import org.apache.syncope.fit.ActivitiDetector; import org.identityconnectors.framework.common.objects.OperationalAttributes; import org.junit.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class UserITCase extends AbstractITCase { private static final FastDateFormat DATE_FORMAT = DateFormatUtils.ISO_DATE_FORMAT; http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java index fc7aa62..f143290 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import javax.naming.NamingException; +import javax.sql.DataSource; import javax.ws.rs.core.GenericType; import org.apache.commons.lang3.tuple.Pair; import org.apache.cxf.common.util.Base64Utility; @@ -70,15 +71,21 @@ import org.apache.syncope.fit.AbstractITCase; import org.apache.syncope.fit.core.reference.DoubleValueLogicActions; import org.identityconnectors.framework.common.objects.Name; import org.identityconnectors.framework.common.objects.OperationalAttributes; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class UserIssuesITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + @Test public void issue186() { // 1. create an user with strict mandatory attributes only http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java index 2db3b95..15a4bbe 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java @@ -31,6 +31,7 @@ import static org.junit.Assert.fail; import java.security.AccessControlException; import java.util.Map; import java.util.Set; +import javax.sql.DataSource; import javax.ws.rs.core.GenericType; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; @@ -55,14 +56,20 @@ import org.apache.syncope.common.rest.api.service.UserSelfService; import org.apache.syncope.common.rest.api.service.UserService; import org.apache.syncope.fit.AbstractITCase; import org.junit.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +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; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class UserSelfITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + @Test public void selfRegistrationAllowed() { assertTrue(syncopeService.platform().isSelfRegAllowed()); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java index c8570a0..53b9303 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java @@ -30,6 +30,7 @@ import static org.junit.Assert.fail; import java.util.Collections; import java.util.List; import java.util.Map; +import javax.sql.DataSource; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.patch.PasswordPatch; import org.apache.syncope.common.lib.patch.StringPatchItem; @@ -44,15 +45,21 @@ import org.apache.syncope.common.lib.types.PatchOperation; import org.apache.syncope.common.rest.api.service.UserWorkflowService; import org.apache.syncope.fit.AbstractITCase; import org.junit.Assume; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class UserWorkflowITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + @Test public void createWithReject() { Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java index 3c439ec..accf2a7 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java @@ -25,6 +25,7 @@ import static org.junit.Assert.assertTrue; import java.util.Locale; import java.util.Map; +import javax.sql.DataSource; import javax.ws.rs.core.GenericType; import javax.ws.rs.core.Response; import org.apache.commons.collections4.CollectionUtils; @@ -59,14 +60,20 @@ import org.apache.syncope.common.rest.api.service.AnyTypeClassService; import org.apache.syncope.common.rest.api.service.ResourceService; import org.apache.syncope.fit.AbstractITCase; import org.identityconnectors.framework.common.objects.ObjectClass; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; +import org.junit.runner.RunWith; +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; -@FixMethodOrder(MethodSorters.JVM) +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:testJDBCEnv.xml" }) public class VirAttrITCase extends AbstractITCase { + @Autowired + private DataSource testDataSource; + @Test public void issueSYNCOPE16() { UserTO userTO = UserITCase.getUniqueSampleTO("issu...@apache.org"); http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java index b7ab0ce..15faa01 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java @@ -36,11 +36,8 @@ import org.apache.syncope.common.lib.types.SchemaType; import org.apache.syncope.common.rest.api.beans.SchemaQuery; import org.apache.syncope.common.rest.api.service.SchemaService; import org.apache.syncope.fit.AbstractITCase; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runners.MethodSorters; -@FixMethodOrder(MethodSorters.JVM) public class VirSchemaITCase extends AbstractITCase { @Test http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/resources/migrationContext.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/resources/migrationContext.xml b/fit/core-reference/src/test/resources/migrationContext.xml deleted file mode 100644 index bd83dca..0000000 --- a/fit/core-reference/src/test/resources/migrationContext.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="syncope12DataSource" - class="org.springframework.jdbc.datasource.DriverManagerDataSource"> - <property name="driverClassName" value="${testdb.driver}"/> - <property name="url" value="jdbc:h2:tcp://localhost:9092/mem:syncope12db;DB_CLOSE_DELAY=-1"/> - <property name="username" value="${testdb.username}"/> - <property name="password" value="${testdb.password}"/> - </bean> - <bean id="syncope12DataSourceInit" class="org.springframework.jdbc.datasource.init.DataSourceInitializer"> - <property name="dataSource" ref="syncope12DataSource"/> - <property name="enabled" value="true"/> - <property name="databasePopulator"> - <bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator"> - <property name="continueOnError" value="true"/> - <property name="ignoreFailedDrops" value="true"/> - <property name="sqlScriptEncoding" value="UTF-8"/> - <property name="scripts"> - <array> - <value type="org.springframework.core.io.Resource"> - classpath:/syncope12.sql - </value> - </array> - </property> - </bean> - </property> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/resources/migrationEnv.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/resources/migrationEnv.xml b/fit/core-reference/src/test/resources/migrationEnv.xml new file mode 100644 index 0000000..bd83dca --- /dev/null +++ b/fit/core-reference/src/test/resources/migrationEnv.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + + <bean id="syncope12DataSource" + class="org.springframework.jdbc.datasource.DriverManagerDataSource"> + <property name="driverClassName" value="${testdb.driver}"/> + <property name="url" value="jdbc:h2:tcp://localhost:9092/mem:syncope12db;DB_CLOSE_DELAY=-1"/> + <property name="username" value="${testdb.username}"/> + <property name="password" value="${testdb.password}"/> + </bean> + <bean id="syncope12DataSourceInit" class="org.springframework.jdbc.datasource.init.DataSourceInitializer"> + <property name="dataSource" ref="syncope12DataSource"/> + <property name="enabled" value="true"/> + <property name="databasePopulator"> + <bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator"> + <property name="continueOnError" value="true"/> + <property name="ignoreFailedDrops" value="true"/> + <property name="sqlScriptEncoding" value="UTF-8"/> + <property name="scripts"> + <array> + <value type="org.springframework.core.io.Resource"> + classpath:/syncope12.sql + </value> + </array> + </property> + </bean> + </property> + </bean> + +</beans> http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/resources/testJDBCContext.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/resources/testJDBCContext.xml b/fit/core-reference/src/test/resources/testJDBCContext.xml deleted file mode 100644 index d89e067..0000000 --- a/fit/core-reference/src/test/resources/testJDBCContext.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="testDataSource" - class="org.springframework.jdbc.datasource.DriverManagerDataSource"> - <property name="driverClassName" value="${testdb.driver}"/> - <property name="url" value="${testdb.url}"/> - <property name="username" value="${testdb.username}"/> - <property name="password" value="${testdb.password}"/> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/syncope/blob/f19e261c/fit/core-reference/src/test/resources/testJDBCEnv.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/resources/testJDBCEnv.xml b/fit/core-reference/src/test/resources/testJDBCEnv.xml new file mode 100644 index 0000000..d89e067 --- /dev/null +++ b/fit/core-reference/src/test/resources/testJDBCEnv.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + + <bean id="testDataSource" + class="org.springframework.jdbc.datasource.DriverManagerDataSource"> + <property name="driverClassName" value="${testdb.driver}"/> + <property name="url" value="${testdb.url}"/> + <property name="username" value="${testdb.username}"/> + <property name="password" value="${testdb.password}"/> + </bean> + +</beans>