DATAREST-1198 - Add Converter to convert String to javax.naming.ldap.LdapName.
We now provide and configure a converter for String to LdapName conversion so Spring Data LDAP can be used with Spring Data REST without further configuration. Original pull request: #290.
This commit is contained in:
committed by
Oliver Gierke
parent
843540b746
commit
65ad7cd3e1
@@ -17,6 +17,8 @@ package org.springframework.data.rest.webmvc.config;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.ldap.LdapName;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -63,6 +65,7 @@ import com.jayway.jsonpath.JsonPath;
|
||||
* Integration tests for basic application bootstrapping (general configuration related checks).
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class RepositoryRestMvConfigurationIntegrationTests {
|
||||
|
||||
@@ -184,6 +187,15 @@ public class RepositoryRestMvConfigurationIntegrationTests {
|
||||
assertThat(service.canConvert(Distance.class, String.class)).isTrue();
|
||||
}
|
||||
|
||||
@Test // DATAREST-1198
|
||||
public void hasConvertersForNamAndLdapName() {
|
||||
|
||||
ConversionService service = context.getBean("defaultConversionService", ConversionService.class);
|
||||
|
||||
assertThat(service.canConvert(String.class, Name.class)).isTrue();
|
||||
assertThat(service.canConvert(String.class, LdapName.class)).isTrue();
|
||||
}
|
||||
|
||||
@Test // DATAREST-686
|
||||
public void defaultsEncodingForMessageSourceToUtfEight() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user