当前位置: 首页>>代码示例>>Java>>正文


Java AssertionConsumerService.setIsDefault方法代码示例

本文整理汇总了Java中org.opensaml.saml2.metadata.AssertionConsumerService.setIsDefault方法的典型用法代码示例。如果您正苦于以下问题:Java AssertionConsumerService.setIsDefault方法的具体用法?Java AssertionConsumerService.setIsDefault怎么用?Java AssertionConsumerService.setIsDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opensaml.saml2.metadata.AssertionConsumerService的用法示例。


在下文中一共展示了AssertionConsumerService.setIsDefault方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testXSBooleanAttributes

import org.opensaml.saml2.metadata.AssertionConsumerService; //导入方法依赖的package包/类
/**
 * Test the proper behavior of the XSBooleanValue attributes.
 */
public void testXSBooleanAttributes() {
    AssertionConsumerService acs = 
        (AssertionConsumerService) buildXMLObject(AssertionConsumerService.DEFAULT_ELEMENT_NAME);
    
    // isDefault attribute
    acs.setIsDefault(Boolean.TRUE);
    assertEquals("Unexpected value for boolean attribute found", Boolean.TRUE, acs.isDefault());
    assertNotNull("XSBooleanValue was null", acs.isDefaultXSBoolean());
    assertEquals("XSBooleanValue was unexpected value", new XSBooleanValue(Boolean.TRUE, false),
            acs.isDefaultXSBoolean());
    assertEquals("XSBooleanValue string was unexpected value", "true", acs.isDefaultXSBoolean().toString());
    
    acs.setIsDefault(Boolean.FALSE);
    assertEquals("Unexpected value for boolean attribute found", Boolean.FALSE, acs.isDefault());
    assertNotNull("XSBooleanValue was null", acs.isDefaultXSBoolean());
    assertEquals("XSBooleanValue was unexpected value", new XSBooleanValue(Boolean.FALSE, false),
            acs.isDefaultXSBoolean());
    assertEquals("XSBooleanValue string was unexpected value", "false", acs.isDefaultXSBoolean().toString());
    
    acs.setIsDefault((Boolean) null);
    assertEquals("Unexpected default value for boolean attribute found", Boolean.FALSE, acs.isDefault());
    assertNull("XSBooleanValue was not null", acs.isDefaultXSBoolean());
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:27,代码来源:AssertionConsumerServiceTest.java

示例2: createAssertionConsumerService

import org.opensaml.saml2.metadata.AssertionConsumerService; //导入方法依赖的package包/类
/**
 * Create a SAML assertion consumer service.
 */
public static AssertionConsumerService createAssertionConsumerService(String location, String binding, int index, boolean isDefault) {
	AssertionConsumerService acs = buildXMLObject(AssertionConsumerService.class);
	acs.setBinding(binding);
	acs.setIndex(index);
	acs.setLocation(location);
	acs.setIsDefault(isDefault);
	return acs;
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:12,代码来源:SAMLUtil.java

示例3: testSingleElementOptionalAttributesMarshall

import org.opensaml.saml2.metadata.AssertionConsumerService; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesMarshall() {
    QName qname = new QName(SAMLConstants.SAML20MD_NS, AssertionConsumerService.DEFAULT_ELEMENT_LOCAL_NAME);
    AssertionConsumerService service = (AssertionConsumerService) buildXMLObject(qname);
    
    service.setBinding(expectedBinding);
    service.setLocation(expectedLocation);
    service.setIndex(expectedIndex);
    service.setResponseLocation(expectedResponseLocation);
    service.setIsDefault(expectedIsDefault);

    assertEquals(expectedOptionalAttributesDOM, service);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:14,代码来源:AssertionConsumerServiceTest.java


注:本文中的org.opensaml.saml2.metadata.AssertionConsumerService.setIsDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。