本文整理匯總了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.");
}
示例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);
}
示例3: processElementContent
import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/** {@inheritDoc} */
protected void processElementContent(XMLObject samlObject, String elementContent) {
GivenName name = (GivenName) samlObject;
name.setName(elementContent);
}
示例4: populateRequiredData
import org.opensaml.saml2.metadata.GivenName; //導入方法依賴的package包/類
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
GivenName givenName = (GivenName) target;
givenName.setName("name");
}