public void SubjectConfirmationWrongMethod()
 {
     SubjectConfirmation sct = new SubjectConfirmation();
     sct.Method = "malformed uri";
     Saml20SubjectConfirmationValidator validator = new Saml20SubjectConfirmationValidator();
     validator.ValidateSubjectConfirmation(sct);
 }
        public void SubjectConfirmationData_Method_HolderOfKey_Valid()
        {
            SubjectConfirmation subjectConfirmation = new SubjectConfirmation();
            subjectConfirmation.Method = Saml20Constants.SubjectConfirmationMethods.HolderOfKey;
            subjectConfirmation.SubjectConfirmationData = new SubjectConfirmationData();
            XmlDocument doc = new XmlDocument();
            XmlElement elem = doc.CreateElement("ds", "KeyInfo", Saml20Constants.XMLDSIG);
            elem.AppendChild((doc.CreateElement("lalala")));

            subjectConfirmation.SubjectConfirmationData.AnyElements = new XmlElement[] { elem };

            Saml20SubjectConfirmationValidator validator = new Saml20SubjectConfirmationValidator();
            validator.ValidateSubjectConfirmation(subjectConfirmation);
        }
 public void SubjectConfirmationEmptyMethod()
 {
     SubjectConfirmation sct = new SubjectConfirmation();
     sct.Method = " ";
     Saml20SubjectConfirmationValidator validator = new Saml20SubjectConfirmationValidator();
     validator.ValidateSubjectConfirmation(sct);
 }
        public void SubjectConfirmationData_Method_HolderOfKey_Invalid_NoKeyInfo()
        {
            SubjectConfirmation subjectConfirmation = new SubjectConfirmation();
            subjectConfirmation.Method = Saml20Constants.SubjectConfirmationMethods.HolderOfKey;
            subjectConfirmation.SubjectConfirmationData = new SubjectConfirmationData();

            Saml20SubjectConfirmationValidator validator = new Saml20SubjectConfirmationValidator();
            validator.ValidateSubjectConfirmation(subjectConfirmation);
        }