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


Java GivenName.setName方法代碼示例

本文整理匯總了Java中org.opensaml.saml2.metadata.GivenName.setName方法的典型用法代碼示例。如果您正苦於以下問題:Java GivenName.setName方法的具體用法?Java GivenName.setName怎麽用?Java GivenName.setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.opensaml.saml2.metadata.GivenName的用法示例。


在下文中一共展示了GivenName.setName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testNameFailure

import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/**
 * Tests for Name failure.
 * 
 * @throws ValidationException
 */
public void testNameFailure() throws ValidationException {
    GivenName givenName = (GivenName) target;

    givenName.setName(null);
    assertValidationFail("Name was null, should raise a Validation Exception.");

    givenName.setName("");
    assertValidationFail("Name was empty string, should raise a Validation Exception.");

    givenName.setName("   ");
    assertValidationFail("Name was white space, should raise a Validation Exception.");
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:18,代碼來源:GivenNameSchemaTest.java

示例2: testSingleElementMarshall

import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/** {@inheritDoc} */
public void testSingleElementMarshall() {
    QName qname = new QName(SAMLConstants.SAML20MD_NS, GivenName.DEFAULT_ELEMENT_LOCAL_NAME);
    GivenName name = (GivenName) buildXMLObject(qname);
    
    name.setName(expectName);

    assertEquals(expectedDOM, name);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:10,代碼來源:GivenNameTest.java

示例3: processElementContent

import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
    GivenName name = (GivenName) samlObject;

    name.setName(elementContent);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:7,代碼來源:GivenNameUnmarshaller.java

示例4: populateRequiredData

import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/** {@inheritDoc} */
protected void populateRequiredData() {
    super.populateRequiredData();
    GivenName givenName = (GivenName) target;
    givenName.setName("name");
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:7,代碼來源:GivenNameSchemaTest.java


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