public void Saml2SubjectExtensions_ToXElement_SubjectConfirmation() { var saml2SubjectConfirmation = new Saml2SubjectConfirmation(new Uri("urn:oasis:names:tc:SAML:2.0:cm:bearer")); var confirmation = saml2SubjectConfirmation.ToXElement(); confirmation.Attribute("Method").Value.Should().Be("urn:oasis:names:tc:SAML:2.0:cm:bearer"); }
public void Saml2SubjectExtensions_ToXElement_SubjectConfirmation_CheckNull() { Saml2SubjectConfirmation saml2SubjectConfirmation = null; Action a = () => saml2SubjectConfirmation.ToXElement(); a.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("subjectConfirmation"); }