diff --git a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java index 0386f2dd..705f1d22 100644 --- a/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java +++ b/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java @@ -212,7 +212,7 @@ public abstract class AbstractContextSource implements BaseLdapPathContextSource * @param ldapUrls all individual url Strings. * @return the full url String */ - protected String assembleProviderUrlString(String[] ldapUrls) { + public String assembleProviderUrlString(String[] ldapUrls) { StringBuilder providerUrlBuffer = new StringBuilder(1024); for (String ldapUrl : ldapUrls) { providerUrlBuffer.append(ldapUrl); diff --git a/core/src/test/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtilsTest.java b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTest.java similarity index 89% rename from core/src/test/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtilsTest.java rename to core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTest.java index 6ec997bd..024edbc1 100644 --- a/core/src/test/java/org/springframework/transaction/compensating/support/CompensatingTransactionUtilsTest.java +++ b/core/src/test/java/org/springframework/ldap/transaction/compensating/manager/CompensatingTransactionUtilsTest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.transaction.compensating.support; +package org.springframework.ldap.transaction.compensating.manager; import org.junit.Before; import org.junit.Test; import org.springframework.ldap.core.ContextSource; -import org.springframework.ldap.transaction.compensating.manager.DirContextHolder; import org.springframework.transaction.compensating.CompensatingTransactionOperationManager; +import org.springframework.transaction.compensating.support.CompensatingTransactionHolderSupport; +import org.springframework.transaction.compensating.support.CompensatingTransactionUtils; import org.springframework.transaction.support.TransactionSynchronizationManager; import javax.naming.directory.DirContext; diff --git a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/control/LdapTemplatePagedSearchITest.java b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/control/LdapTemplatePagedSearchITest.java similarity index 94% rename from test/integration-tests-openldap/src/test/java/org/springframework/ldap/control/LdapTemplatePagedSearchITest.java rename to test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/control/LdapTemplatePagedSearchITest.java index 85cc96f4..eef211e2 100644 --- a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/control/LdapTemplatePagedSearchITest.java +++ b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/control/LdapTemplatePagedSearchITest.java @@ -13,24 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.control; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertNull; - -import java.util.List; - -import javax.naming.Name; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.DirContext; -import javax.naming.directory.SearchControls; +package org.springframework.ldap.itest.control; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.control.PagedResultsCookie; +import org.springframework.ldap.control.PagedResultsRequestControl; +import org.springframework.ldap.control.Person; import org.springframework.ldap.core.CollectingNameClassPairCallbackHandler; import org.springframework.ldap.core.ContextMapper; import org.springframework.ldap.core.ContextMapperCallbackHandler; @@ -41,6 +32,17 @@ import org.springframework.ldap.core.SearchExecutor; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; +import javax.naming.Name; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.SearchControls; +import java.util.List; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertNull; + /** * Tests the paged search result capability of LdapTemplate. *

diff --git a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/LdapTemplateSearchResultITest.java b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/LdapTemplateSearchResultITest.java similarity index 96% rename from test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/LdapTemplateSearchResultITest.java rename to test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/LdapTemplateSearchResultITest.java index 88d360ce..b530c746 100644 --- a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/LdapTemplateSearchResultITest.java +++ b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/LdapTemplateSearchResultITest.java @@ -13,14 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core; - -import static junit.framework.Assert.assertEquals; - -import java.util.List; - -import javax.naming.Name; -import javax.naming.directory.SearchControls; +package org.springframework.ldap.itest.core; import org.junit.After; import org.junit.Before; @@ -33,6 +26,12 @@ import org.springframework.ldap.test.AttributeCheckContextMapper; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; +import javax.naming.Name; +import javax.naming.directory.SearchControls; +import java.util.List; + +import static junit.framework.Assert.assertEquals; + /** * Verifies that LdapTemplate search methods work against OpenLDAP with TLS. * diff --git a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/support/DigestMd5AuthenticationITest.java b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/support/DigestMd5AuthenticationITest.java similarity index 95% rename from test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/support/DigestMd5AuthenticationITest.java rename to test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/support/DigestMd5AuthenticationITest.java index e65c102e..cebc5000 100644 --- a/test/integration-tests-openldap/src/test/java/org/springframework/ldap/core/support/DigestMd5AuthenticationITest.java +++ b/test/integration-tests-openldap/src/test/java/org/springframework/ldap/itest/core/support/DigestMd5AuthenticationITest.java @@ -3,7 +3,7 @@ * distributed with this file and available online at * http://www.ja-sig.org/products/cas/overview/license/index.html */ -package org.springframework.ldap.core.support; +package org.springframework.ldap.itest.core.support; import javax.naming.directory.DirContext; diff --git a/test/integration-tests-sunone/src/test/java/org/springframework/ldap/core/LdapTemplateVirtualListViewSearchITest.java b/test/integration-tests-sunone/src/test/java/org/springframework/ldap/itest/core/LdapTemplateVirtualListViewSearchITest.java similarity index 95% rename from test/integration-tests-sunone/src/test/java/org/springframework/ldap/core/LdapTemplateVirtualListViewSearchITest.java rename to test/integration-tests-sunone/src/test/java/org/springframework/ldap/itest/core/LdapTemplateVirtualListViewSearchITest.java index 93c0dc1a..250537a8 100644 --- a/test/integration-tests-sunone/src/test/java/org/springframework/ldap/core/LdapTemplateVirtualListViewSearchITest.java +++ b/test/integration-tests-sunone/src/test/java/org/springframework/ldap/itest/core/LdapTemplateVirtualListViewSearchITest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core; +package org.springframework.ldap.itest.core; import static junit.framework.Assert.assertEquals; @@ -25,6 +25,9 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.core.CollectingNameClassPairCallbackHandler; +import org.springframework.ldap.core.ContextMapperCallbackHandler; +import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.itest.Person; import org.springframework.ldap.itest.PersonContextMapper; import org.springframework.ldap.control.VirtualListViewControlDirContextProcessor; diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/AbstractLdapTemplateIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/AbstractLdapTemplateIntegrationTest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/AbstractLdapTemplateIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/AbstractLdapTemplateIntegrationTest.java index a2130851..344143c8 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/AbstractLdapTemplateIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/AbstractLdapTemplateIntegrationTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Before; import org.springframework.beans.factory.annotation.Autowired; diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/InvalidBackslashITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/InvalidBackslashITest.java similarity index 94% rename from test/integration-tests/src/test/java/org/springframework/ldap/InvalidBackslashITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/InvalidBackslashITest.java index 23018ebe..73df9cf0 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/InvalidBackslashITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/InvalidBackslashITest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; @@ -39,7 +39,7 @@ import static junit.framework.Assert.assertEquals; * * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class InvalidBackslashITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAttributesMapperITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAttributesMapperITest.java similarity index 91% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAttributesMapperITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAttributesMapperITest.java index 0976455b..c1214aba 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAttributesMapperITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAttributesMapperITest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -37,13 +37,13 @@ import static junit.framework.Assert.assertEquals; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateAttributesMapperITest extends AbstractLdapTemplateIntegrationTest { @Autowired private LdapTemplate tested; protected String[] getConfigLocations() { - return new String[] { "/conf/ldapTemplateTestContext.xml" }; + return new String[] {"/conf/ldapTemplateTestContext.xml"}; } @Test diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAuthenticationITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAuthenticationITest.java similarity index 94% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAuthenticationITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAuthenticationITest.java index 10952883..e8c03456 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateAuthenticationITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateAuthenticationITest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; @@ -27,6 +27,7 @@ import javax.naming.directory.DirContext; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.IncorrectResultSizeDataAccessException; +import org.springframework.ldap.AuthenticationException; import org.springframework.ldap.core.AuthenticatedLdapEntryContextCallback; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapEntryIdentification; @@ -44,7 +45,7 @@ import org.springframework.test.context.ContextConfiguration; * @author Mattias Hellborg Arthursson * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateAuthenticationITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateBindUnbindITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateBindUnbindITest.java similarity index 93% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateBindUnbindITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateBindUnbindITest.java index 450102e1..be5f0768 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateBindUnbindITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateBindUnbindITest.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.support.LdapUtils; @@ -40,7 +41,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateBindUnbindITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextExecutorTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextExecutorTest.java similarity index 91% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextExecutorTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextExecutorTest.java index 7ade51c5..50d7ab15 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextExecutorTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextExecutorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import static junit.framework.Assert.assertTrue; @@ -32,7 +32,7 @@ import org.springframework.test.context.ContextConfiguration; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateContextExecutorTest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextMapperITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextMapperITest.java similarity index 93% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextMapperITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextMapperITest.java index ca9d7188..5e9b81e8 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateContextMapperITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateContextMapperITest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -35,7 +35,7 @@ import static junit.framework.Assert.assertEquals; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateContextMapperITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateListITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateListITest.java similarity index 94% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateListITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateListITest.java index 9361771a..0fe8c902 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateListITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateListITest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; @@ -37,7 +37,7 @@ import static junit.framework.Assert.assertTrue; * * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateListITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateLookupITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateLookupITest.java similarity index 96% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateLookupITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateLookupITest.java index 66fa413f..a39762f6 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateLookupITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateLookupITest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +42,7 @@ import static junit.framework.Assert.assertNull; * @author Mattias Hellborg Arthursson * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateLookupITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateModifyITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateModifyITest.java similarity index 96% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateModifyITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateModifyITest.java index 2b22f43b..012c0643 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateModifyITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateModifyITest.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.AttributeInUseException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.DistinguishedName; @@ -50,7 +51,7 @@ import static junit.framework.Assert.fail; * @author Mattias Hellborg Arthursson * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateModifyITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateNoBaseSuffixITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateNoBaseSuffixITest.java similarity index 92% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateNoBaseSuffixITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateNoBaseSuffixITest.java index 10f7f1c6..238e5c4e 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateNoBaseSuffixITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateNoBaseSuffixITest.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.core.support.CountNameClassPairCallbackHandler; @@ -39,7 +40,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateNoBaseSuffixTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateNoBaseSuffixTestContext.xml"}) public class LdapTemplateNoBaseSuffixITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateObjectBindIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateObjectBindIntegrationTest.java similarity index 93% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateObjectBindIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateObjectBindIntegrationTest.java index f495ba84..06678467 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateObjectBindIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateObjectBindIntegrationTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.fail; @@ -37,7 +37,7 @@ import org.springframework.test.context.ContextConfiguration; * * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateObjectBindTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateObjectBindTestContext.xml"}) public class LdapTemplateObjectBindIntegrationTest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRecursiveDeleteITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRecursiveDeleteITest.java similarity index 93% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRecursiveDeleteITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRecursiveDeleteITest.java index 6e19827d..359f33cf 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRecursiveDeleteITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRecursiveDeleteITest.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.support.LdapUtils; @@ -37,7 +38,7 @@ import static junit.framework.Assert.fail; * @author Mattias Hellborg Arthursson * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateRecursiveDeleteITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRenameITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRenameITest.java similarity index 91% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRenameITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRenameITest.java index 5d0015c6..bf0122d1 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateRenameITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateRenameITest.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.support.LdapUtils; @@ -38,7 +39,7 @@ import static junit.framework.Assert.fail; * * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateRenameITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateSearchCountITest.xls b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchCountITest.xls similarity index 100% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateSearchCountITest.xls rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchCountITest.xls diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateSearchResultITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateSearchResultITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java index 2239fdf0..0b565234 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/LdapTemplateSearchResultITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap; +package org.springframework.ldap.itest; import org.junit.After; import org.junit.Before; @@ -21,6 +21,7 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.dao.IncorrectResultSizeDataAccessException; +import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.LdapTemplate; @@ -46,7 +47,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapTemplateSearchResultITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/control/SupportedControlsITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/control/SupportedControlsITest.java similarity index 89% rename from test/integration-tests/src/test/java/org/springframework/ldap/control/SupportedControlsITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/control/SupportedControlsITest.java index b5f84cd2..0c7d2a13 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/control/SupportedControlsITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/control/SupportedControlsITest.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.ldap.control; +package org.springframework.ldap.itest.control; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.core.ContextMapper; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.LdapTemplate; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.support.LdapUtils; import org.springframework.test.context.ContextConfiguration; @@ -35,7 +35,7 @@ import static junit.framework.Assert.assertEquals; * * @author Ulrik Sandberg */ -@ContextConfiguration(locations = { "/conf/rootContextSourceTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/rootContextSourceTestContext.xml"}) public class SupportedControlsITest extends AbstractLdapTemplateIntegrationTest { /** must use a context source that has no base set */ @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DistinguishedNameEditorITest.java similarity index 81% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DistinguishedNameEditorITest.java index 00c55b1d..58c62654 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/DistinguishedNameEditorITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DistinguishedNameEditorITest.java @@ -13,23 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core; +package org.springframework.ldap.itest.core; + +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.core.DistinguishedName; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.itest.core.DummyDistinguishedNameConsumer; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; - /** - * Integration tests for {@link DistinguishedNameEditor}. + * Integration tests for {@link org.springframework.ldap.core.DistinguishedNameEditor}. * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/distinguishedNameEditorTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/distinguishedNameEditorTestContext.xml"}) public class DistinguishedNameEditorITest extends AbstractJUnit4SpringContextTests { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/DnParsePerformanceITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DnParsePerformanceITest.java similarity index 94% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/DnParsePerformanceITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DnParsePerformanceITest.java index 2d404e92..f88e42a5 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/DnParsePerformanceITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/DnParsePerformanceITest.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package org.springframework.ldap.core; +package org.springframework.ldap.itest.core; import org.junit.Test; +import org.springframework.ldap.core.DistinguishedName; import org.springframework.util.StopWatch; /** diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/simple/SimpleLdapTemplateITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/simple/SimpleLdapTemplateITest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/simple/SimpleLdapTemplateITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/simple/SimpleLdapTemplateITest.java index c37f0633..20e1a77a 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/simple/SimpleLdapTemplateITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/simple/SimpleLdapTemplateITest.java @@ -13,17 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core.simple; +package org.springframework.ldap.itest.core.simple; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.DirContextProcessor; +import org.springframework.ldap.core.simple.ParameterizedContextMapper; +import org.springframework.ldap.core.simple.SimpleLdapTemplate; import org.springframework.ldap.filter.AndFilter; import org.springframework.ldap.filter.EqualsFilter; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.support.LdapUtils; import org.springframework.test.context.ContextConfiguration; @@ -37,7 +39,7 @@ import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertTrue; import static junit.framework.Assert.fail; -@ContextConfiguration(locations = { "/conf/simpleLdapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/simpleLdapTemplateTestContext.xml"}) public class SimpleLdapTemplateITest extends AbstractLdapTemplateIntegrationTest { private static String DN_STRING = "cn=Some Person4,ou=company1,c=Sweden"; diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostprocessorITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/BaseLdapPathBeanPostprocessorITest.java similarity index 89% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostprocessorITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/BaseLdapPathBeanPostprocessorITest.java index b322f7f3..ffdc9b12 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/BaseLdapPathBeanPostprocessorITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/BaseLdapPathBeanPostprocessorITest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core.support; +package org.springframework.ldap.itest.core.support; import org.junit.Test; import org.springframework.beans.factory.BeanCreationException; @@ -39,7 +39,7 @@ public class BaseLdapPathBeanPostprocessorITest { @Test public void testPostProcessBeforeInitialization() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( - "/conf/baseLdapPathPostProcessorTestContext.xml"); + "/conf/baseLdapPathPostProcessorTestContext.xml"); DummyBaseLdapPathAware tested = ctx.getBean(DummyBaseLdapPathAware.class); DistinguishedName base = tested.getBase(); @@ -65,7 +65,7 @@ public class BaseLdapPathBeanPostprocessorITest { @Test public void testPostProcessBeforeInitializationMultipleContextSourcesOneSpecified() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( - "/conf/baseLdapPathPostProcessorMultiContextSourceOneSpecTestContext.xml"); + "/conf/baseLdapPathPostProcessorMultiContextSourceOneSpecTestContext.xml"); DummyBaseLdapPathAware tested = (DummyBaseLdapPathAware) ctx.getBean("dummyBaseContextAware"); DistinguishedName base = tested.getBase(); @@ -88,7 +88,7 @@ public class BaseLdapPathBeanPostprocessorITest { @Test public void testPostProcessBeforeInitializationBaseSetInProperty() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( - "/conf/baseLdapPathPostProcessorPropertyOverrideTestContext.xml"); + "/conf/baseLdapPathPostProcessorPropertyOverrideTestContext.xml"); DummyBaseLdapPathAware tested = (DummyBaseLdapPathAware) ctx.getBean("dummyBaseContextAware"); DistinguishedName base = tested.getBase(); @@ -99,7 +99,7 @@ public class BaseLdapPathBeanPostprocessorITest { @Test public void testPostProcessBeforeInitializationTransactionProxy() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( - "/conf/baseLdapPathPostProcessorTransactionTestContext.xml"); + "/conf/baseLdapPathPostProcessorTransactionTestContext.xml"); DummyBaseLdapPathAware tested = (DummyBaseLdapPathAware) ctx.getBean("dummyBaseContextAware"); DistinguishedName base = tested.getBase(); diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceIntegrationTest.java similarity index 91% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceIntegrationTest.java index 8a9efc73..583d1a5b 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceIntegrationTest.java @@ -14,17 +14,18 @@ * limitations under the License. */ -package org.springframework.ldap.core.support; +package org.springframework.ldap.itest.core.support; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.IncorrectResultSizeDataAccessException; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.core.ContextSource; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.core.simple.AbstractParameterizedContextMapper; +import org.springframework.ldap.core.support.LdapContextSource; import org.springframework.ldap.filter.EqualsFilter; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.support.LdapUtils; import org.springframework.test.context.ContextConfiguration; @@ -45,7 +46,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) public class LdapContextSourceIntegrationTest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceMultiServerIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceMultiServerIntegrationTest.java similarity index 85% rename from test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceMultiServerIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceMultiServerIntegrationTest.java index 22eea086..eedbb78c 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/core/support/LdapContextSourceMultiServerIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/core/support/LdapContextSourceMultiServerIntegrationTest.java @@ -13,23 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.core.support; - -import static junit.framework.Assert.assertEquals; - -import javax.naming.NamingException; +package org.springframework.ldap.itest.core.support; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ldap.core.support.LdapContextSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; +import javax.naming.NamingException; + +import static junit.framework.Assert.assertEquals; + /** * Advanced integration tests for LdapContextSource. * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapContextSourceTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapContextSourceTestContext.xml"}) public class LdapContextSourceMultiServerIntegrationTest extends AbstractJUnit4SpringContextTests { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/filter/HardcodedFilterIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/filter/HardcodedFilterIntegrationTest.java similarity index 85% rename from test/integration-tests/src/test/java/org/springframework/ldap/filter/HardcodedFilterIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/filter/HardcodedFilterIntegrationTest.java index a1d2b406..caaeb93c 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/filter/HardcodedFilterIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/filter/HardcodedFilterIntegrationTest.java @@ -13,14 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.filter; +package org.springframework.ldap.itest.filter; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.core.support.CountNameClassPairCallbackHandler; -import org.springframework.ldap.itest.filter.DummyFilterConsumer; +import org.springframework.ldap.filter.Filter; +import org.springframework.ldap.filter.HardcodedFilter; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.support.LdapUtils; import org.springframework.test.context.ContextConfiguration; @@ -30,7 +31,7 @@ import static junit.framework.Assert.assertTrue; /** * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/hardcodedFilterTestContext.xml", "/conf/ldapTemplateTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/hardcodedFilterTestContext.xml", "/conf/ldapTemplateTestContext.xml" }) public class HardcodedFilterIntegrationTest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/integration/JiraLdap247ITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/integration/JiraLdap247ITest.java similarity index 87% rename from test/integration-tests/src/test/java/org/springframework/ldap/integration/JiraLdap247ITest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/integration/JiraLdap247ITest.java index 95066f85..874e0cfb 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/integration/JiraLdap247ITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/integration/JiraLdap247ITest.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.springframework.ldap.integration; +package org.springframework.ldap.itest.integration; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.itest.LdapGroupDao; import org.springframework.test.context.ContextConfiguration; @@ -30,7 +30,7 @@ import static org.junit.Assert.assertNotNull; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldap-247-testContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldap-247-testContext.xml"}) public class JiraLdap247ITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java index 843f6215..057afe50 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerIntegrationTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager; +package org.springframework.ldap.itest.manager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -25,10 +25,10 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.AttributesMapper; import org.springframework.ldap.core.LdapTemplate; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.itest.transaction.compensating.manager.DummyDao; import org.springframework.ldap.itest.transaction.compensating.manager.DummyException; import org.springframework.test.context.ContextConfiguration; @@ -49,7 +49,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapAndJdbcTransactionTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapAndJdbcTransactionTestContext.xml"}) public class ContextSourceAndDataSourceTransactionManagerIntegrationTest extends AbstractLdapTemplateIntegrationTest { private static Log log = LogFactory.getLog(ContextSourceAndDataSourceTransactionManagerIntegrationTest.class); diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java index 720a6ce9..3cf91b86 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceAndDataSourceTransactionManagerLdap179IntegrationTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager; +package org.springframework.ldap.itest.manager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerIntegrationTest.java similarity index 94% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerIntegrationTest.java index fca45953..6a340819 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerIntegrationTest.java @@ -13,15 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertTrue; -import static junit.framework.Assert.fail; - -import javax.naming.NamingException; -import javax.naming.directory.Attributes; +package org.springframework.ldap.itest.manager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -29,21 +21,29 @@ import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.AttributesMapper; import org.springframework.ldap.core.LdapTemplate; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.itest.transaction.compensating.manager.DummyDao; import org.springframework.ldap.itest.transaction.compensating.manager.DummyException; import org.springframework.test.context.ContextConfiguration; import org.springframework.transaction.support.TransactionSynchronizationManager; +import javax.naming.NamingException; +import javax.naming.directory.Attributes; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertTrue; +import static junit.framework.Assert.fail; + /** * Integration tests for {@link ContextSourceAndDataSourceTransactionManager}. * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTransactionTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTransactionTestContext.xml"}) public class ContextSourceTransactionManagerIntegrationTest extends AbstractLdapTemplateIntegrationTest { private static Log log = LogFactory.getLog(ContextSourceTransactionManagerIntegrationTest.class); diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java similarity index 90% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java index 8938632a..64e923cb 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/ContextSourceTransactionManagerSubtreeIntegrationTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager; +package org.springframework.ldap.itest.manager; import org.junit.Before; import org.junit.Test; @@ -22,9 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.LdapTemplate; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.itest.transaction.compensating.manager.DummyDao; import org.springframework.ldap.itest.transaction.compensating.manager.DummyException; import org.springframework.test.context.ContextConfiguration; @@ -39,7 +39,7 @@ import static junit.framework.Assert.fail; * * @author Mattias Hellborg Arthursson */ -@ContextConfiguration(locations = { "/conf/ldapTemplateTransactionSubtreeTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapTemplateTransactionSubtreeTestContext.xml"}) public class ContextSourceTransactionManagerSubtreeIntegrationTest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java similarity index 95% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java index de0fad3a..5f8e1753 100755 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerIntegrationTest.java @@ -13,18 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager.hibernate; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertNull; -import static junit.framework.Assert.assertTrue; -import static junit.framework.Assert.fail; - -import java.util.List; - -import javax.naming.NamingException; -import javax.naming.directory.Attributes; +package org.springframework.ldap.itest.manager.hibernate; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -37,10 +26,10 @@ import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.ldap.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.NameNotFoundException; import org.springframework.ldap.core.AttributesMapper; import org.springframework.ldap.core.LdapTemplate; +import org.springframework.ldap.itest.AbstractLdapTemplateIntegrationTest; import org.springframework.ldap.itest.transaction.compensating.manager.DummyException; import org.springframework.ldap.itest.transaction.compensating.manager.hibernate.OrgPerson; import org.springframework.ldap.itest.transaction.compensating.manager.hibernate.OrgPersonDao; @@ -49,12 +38,22 @@ import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.transaction.support.TransactionSynchronizationManager; +import javax.naming.NamingException; +import javax.naming.directory.Attributes; +import java.util.List; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertNull; +import static junit.framework.Assert.assertTrue; +import static junit.framework.Assert.fail; + /** * Integration tests for {@link ContextSourceAndHibernateTransactionManager}. * * @author Hans Westerbeek */ -@ContextConfiguration(locations = { "/conf/ldapAndHibernateTransactionTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/ldapAndHibernateTransactionTestContext.xml"}) public class ContextSourceAndHibernateTransactionManagerIntegrationTest extends AbstractLdapTemplateIntegrationTest { private static Log log = LogFactory.getLog(ContextSourceAndHibernateTransactionManagerIntegrationTest.class); diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java similarity index 92% rename from test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java rename to test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java index 8b782c1a..79f77bb2 100755 --- a/test/integration-tests/src/test/java/org/springframework/ldap/transaction/compensating/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/manager/hibernate/ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.ldap.transaction.compensating.manager.hibernate; +package org.springframework.ldap.itest.manager.hibernate; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -38,7 +38,7 @@ import static org.junit.Assert.assertTrue; * * @author Hans Westerbeek */ -@ContextConfiguration(locations = { "/conf/missingLdapAndHibernateTransactionTestContext.xml" }) +@ContextConfiguration(locations = {"/conf/missingLdapAndHibernateTransactionTestContext.xml"}) public class ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest extends AbstractJUnit4SpringContextTests { private static Log log = LogFactory.getLog(ContextSourceAndHibernateTransactionManagerLdap179IntegrationTest.class);