public void ReadXmlBadContent()
        {
            SamlSerializer      ser    = new SamlSerializer();
            string              xml    = String.Format("<saml:Evidence xmlns:saml=\"{0}\"><saml:DoNotCacheCondition /></saml:Evidence>", SamlConstants.Namespace);
            XmlDictionaryReader reader = CreateReader(xml);

            reader.MoveToContent();

            SamlEvidence s = new SamlEvidence();

            s.ReadXml(reader, ser, null, null);
        }
Exemplo n.º 2
0
        public void ReadXml1()
        {
            SamlSerializer      ser    = new SamlSerializer();
            string              xml    = String.Format("<saml:Evidence xmlns:saml=\"{0}\"><saml:AssertionIDReference>myref</saml:AssertionIDReference></saml:Evidence>", SamlConstants.Namespace);
            XmlDictionaryReader reader = CreateReader(xml);

            reader.MoveToContent();

            SamlEvidence s = new SamlEvidence();

            s.ReadXml(reader, ser, null, null);
            Assert.AreEqual(1, s.AssertionIdReferences.Count, "#1");
            Assert.AreEqual("myref", s.AssertionIdReferences [0], "#2");
        }