當前位置: 首頁>>代碼示例>>Java>>正文


Java BasicAttributes.getAll方法代碼示例

本文整理匯總了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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:23,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java

示例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);
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:22,代碼來源:RdnTest.java


注:本文中的javax.naming.directory.BasicAttributes.getAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。