Align Visibliity Modifiers in Integration Tests

Issue gh-750
This commit is contained in:
Josh Cummings
2023-05-09 16:05:41 -06:00
parent c16ed5a440
commit 47e7e194c9
6 changed files with 11 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class })
public abstract class AbstractLdapTemplateIntegrationTests {
private final static String DEFAULT_BASE = "dc=261consulting,dc=com";
private static final String DEFAULT_BASE = "dc=261consulting,dc=com";
@Autowired
@Qualifier("contextSource")

View File

@@ -180,6 +180,7 @@ public class DefaultLdapClientLookupITests extends AbstractLdapTemplateIntegrati
*
* @see AttributesMapper#mapFromAttributes(Attributes)
*/
@Override
public Person mapFromAttributes(Attributes attributes) throws NamingException {
Person person = new Person();
person.setFullname((String) attributes.get("cn").get());

View File

@@ -178,6 +178,7 @@ public class LdapTemplateLookupITests extends AbstractLdapTemplateIntegrationTes
*
* @see org.springframework.ldap.core.AttributesMapper#mapFromAttributes(javax.naming.directory.Attributes)
*/
@Override
public Object mapFromAttributes(Attributes attributes) throws NamingException {
Person person = new Person();
person.setFullname((String) attributes.get("cn").get());

View File

@@ -225,6 +225,7 @@ public class SimpleLdapTemplateITests extends AbstractLdapTemplateIntegrationTes
private static final class CnContextMapper implements ContextMapper<String> {
@Override
public String mapFromContext(Object ctx) {
DirContextAdapter adapter = (DirContextAdapter) ctx;
@@ -239,18 +240,20 @@ public class SimpleLdapTemplateITests extends AbstractLdapTemplateIntegrationTes
private boolean postProcessCalled;
public boolean isPreProcessCalled() {
boolean isPreProcessCalled() {
return this.preProcessCalled;
}
public boolean isPostProcessCalled() {
boolean isPostProcessCalled() {
return this.postProcessCalled;
}
@Override
public void postProcess(DirContext ctx) throws NamingException {
this.preProcessCalled = true;
}
@Override
public void preProcess(DirContext ctx) throws NamingException {
this.postProcessCalled = true;
}

View File

@@ -161,7 +161,7 @@ public class LdapContextSourceIntegrationTests extends AbstractLdapTemplateInteg
}
}
private final static class DnContextMapper extends AbstractContextMapper<String> {
private static final class DnContextMapper extends AbstractContextMapper<String> {
@Override
protected String doMapFromContext(DirContextOperations ctx) {

View File

@@ -50,7 +50,7 @@ public class Ldap473Tests {
static class ContextSourceConfig {
@Bean
public ContextSource contextSource() {
ContextSource contextSource() {
LdapContextSource contextSource = new LdapContextSource();
contextSource.setUrl("ldap://localhost:9322");
contextSource.setUserDn(null);
@@ -64,7 +64,7 @@ public class Ldap473Tests {
static class EmbeddedLdapConfig {
@Bean
public EmbeddedLdapServerFactoryBean embeddedLdapServer() {
EmbeddedLdapServerFactoryBean embeddedLdapServer() {
EmbeddedLdapServerFactoryBean embeddedLdapServer = new EmbeddedLdapServerFactoryBean();
embeddedLdapServer.setPartitionName("example");
embeddedLdapServer.setPartitionSuffix("dc=261consulting,dc=com");