Exemplo n.º 1
0
  public void testElementConstructor() throws Exception {
    final SamlCredential samlPrincipal = new SamlCredential(assertionElement);

    final InputSource actual =
        new InputSource(new StringReader(samlPrincipal.getAssertionAsString()));
    XMLAssert.assertXMLEqual(expectedAssertion, actual);
  }
Exemplo n.º 2
0
 public void testEqualsContract() throws Exception {
   final SamlCredential samlPrincipal1 = new SamlCredential(assertionElement);
   final SamlCredential samlPrincipal2 = new SamlCredential(assertionElement);
   assertEquals(samlPrincipal1, samlPrincipal2);
   assertEquals(samlPrincipal1.hashCode(), samlPrincipal2.hashCode());
 }