コード例 #1
0
  /** {@inheritDoc} */
  @Test
  public void testSingleElementOptionalAttributesUnmarshall() {
    AuthnRequest req = (AuthnRequest) unmarshallElement(singleElementOptionalAttributesFile);

    Assert.assertEquals(
        req.isForceAuthnXSBoolean(),
        expectedForceAuthn,
        "Unmarshalled ForceAuthn was not the expected value");
    Assert.assertEquals(
        req.isPassiveXSBoolean(),
        expectedIsPassive,
        "Unmarshalled IsPassive was not the expected value");
    Assert.assertEquals(
        req.getProtocolBinding(),
        expectedProtocolBinding,
        "Unmarshalled ProtocolBinding was not the expected value");
    Assert.assertEquals(
        req.getAssertionConsumerServiceIndex(),
        expectedAssertionConsumerServiceIndex,
        "Unmarshalled AssertionConsumerServiceIndex was not the expected value");
    Assert.assertEquals(
        req.getAssertionConsumerServiceURL(),
        expectedAssertionConsumerServiceURL,
        "Unmarshalled AssertionConsumerServiceURL was not the expected value");
    Assert.assertEquals(
        req.getAttributeConsumingServiceIndex(),
        expectedAttributeConsumingServiceIndex,
        "Unmarshalled AttributeConsumingServiceIndex was not the expected value");
    Assert.assertEquals(
        req.getProviderName(),
        expectedProviderName,
        "Unmarshalled ProviderName was not the expected value");

    super.helperTestSingleElementOptionalAttributesUnmarshall(req);
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Test
  public void testSingleElementUnmarshall() {
    AuthnRequest req = (AuthnRequest) unmarshallElement(singleElementFile);

    Assert.assertNotNull(req, "AuthnRequest was null");
    Assert.assertEquals(
        req.isForceAuthn(), Boolean.FALSE, "ForceAuthn (empty) was not default value");
    Assert.assertEquals(req.isPassive(), Boolean.FALSE, "IsPassive (empty) was not default value");
    Assert.assertNull(req.getProtocolBinding(), "ProtocolBinding was not null");
    Assert.assertNull(
        req.getAssertionConsumerServiceIndex(), "AssertionConsumerServiceIndex was not null");
    Assert.assertNull(
        req.getAssertionConsumerServiceURL(), "AssertionConsumerServiceURL was not null");
    Assert.assertNull(
        req.getAttributeConsumingServiceIndex(), "AttributeConsumingServiceIndex was not null");
    Assert.assertNull(req.getProviderName(), "ProviderName was not null");

    super.helperTestSingleElementUnmarshall(req);
  }