@Test
public void testValidatePropertyTypes_objectClass() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put(Constants.OBJECTCLASS, "test");
Map<String, Object> config = validatePropertyTypes(map);
assertThat(config.containsKey(Constants.OBJECTCLASS), is(true));
assertThat(config.get(Constants.OBJECTCLASS), Is.<Object>is(new String[]{"test"}));
map = new HashMap<String, Object>();
map.put(Constants.OBJECTCLASS, new String[]{"test"});
config = validatePropertyTypes(map);
assertThat(config.get(Constants.OBJECTCLASS), Is.<Object>is(new String[]{"test"}));
map = new HashMap<String, Object>();
map.put(Constants.OBJECTCLASS, singletonList("test"));
config = validatePropertyTypes(map);
assertThat(config.get(Constants.OBJECTCLASS), Is.<Object>is(new String[]{"test"}));
}
PropertyValidatorTest.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:aries-rsa
作者:
评论列表
文章目录