本文整理汇总了Java中javax.naming.directory.BasicAttributes.getAll方法的典型用法代码示例。如果您正苦于以下问题:Java BasicAttributes.getAll方法的具体用法?Java BasicAttributes.getAll怎么用?Java BasicAttributes.getAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.naming.directory.BasicAttributes
的用法示例。
在下文中一共展示了BasicAttributes.getAll方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testToAttributes001
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with the string
* "t=\\4C\\4c", notice that here the values are quoted.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes001() throws Exception {
BasicAttributes t = new BasicAttributes("t", "\\4C\\4C");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例2: testToAttributes003
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with the string
* "t=hola", notice that here the values are not quoted.
* </p>
* <p>
* The expected result is the map of the Rdn."
* </p>
*/
public void testToAttributes003() throws Exception {
BasicAttributes t = new BasicAttributes("t", "hola");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例3: testToAttributes004
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with the string
* "t=", notice that here the values are not quoted.
* </p>
* <p>
* The expected result is the map of the Rdn."
* </p>
*/
public void testToAttributes004() throws Exception {
BasicAttributes t = new BasicAttributes("t", "");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例4: testToAttributes005
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with the string
* "t=test+a=test2+b=test3", notice that here the values are not
* quoted.
* </p>
* <p>
* The expected result is the map of the Rdn."
* </p>
*/
public void testToAttributes005() throws Exception {
BasicAttributes t = new BasicAttributes("t", "test+a=test2+b=test3");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例5: testToAttributes006
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with multiple
* values.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes006() throws Exception {
BasicAttributes t = new BasicAttributes("t", "test+a=test2");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例6: testToAttributes007
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with multiple
* values.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes007() throws Exception {
BasicAttributes t = new BasicAttributes("a", "test+a=test2");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例7: testToAttributes008
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with multiple
* values.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes008() throws Exception {
BasicAttributes t = new BasicAttributes("a", ">asd+t=t+t=t=s<asd");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例8: testToAttributes009
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with multiple
* values.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes009() throws Exception {
BasicAttributes t = new BasicAttributes("a", "+t=t=");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
assertNotNull(ba);
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}
示例9: testToAttributes010
import javax.naming.directory.BasicAttributes; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.Rdn.toAttributes()'
* </p>
* <p>
* Here we are testing if this method correctly returns the Rdn's contents
* as an Attributes map. For this test the Rdn is created with multiple
* values.
* </p>
* <p>
* The expected result is the map of the Rdn.
* </p>
*/
public void testToAttributes010() throws Exception {
BasicAttributes t = new BasicAttributes("a", "t=t");
Rdn rdn = new Rdn(t);
BasicAttributes ba = (BasicAttributes) rdn.toAttributes();
assertNotNull(ba);
NamingEnumeration ne = ba.getAll();
assertAttributesEqual(ne, t);
}