Пример #1
0
 public void testMissingID() {
   Assertion assertion = (Assertion) target;
   assertion.setID("");
   assertValidationFail("ID was empty, should raise a Validation Exception");
   assertion.setID(null);
   assertValidationFail("ID was null, should raise a Validation Exception");
   assertion.setID("  ");
   assertValidationFail("ID was whitespace, should raise a Validation Exception");
 }
Пример #2
0
  /** Common setup method (populateRequiredData & the first test */
  private void setupRequiredData() {

    Assertion assertion = (Assertion) target;
    assertion.setIssuer("Issuer");
    assertion.setID("ident");
    assertion.setIssueInstant(new DateTime());
    QName name =
        new QName(
            SAMLConstants.SAML1_NS,
            AttributeStatement.DEFAULT_ELEMENT_LOCAL_NAME,
            SAMLConstants.SAML1_PREFIX);
    assertion.getStatements().add((AttributeStatement) buildXMLObject(name));
  }