本文整理匯總了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);
}