Esempio n. 1
0
        public void WriteXmlNoAssertionsOrIDs()
        {
            SamlEvidence a = new SamlEvidence();

            StringWriter sw = new StringWriter();

            using (XmlDictionaryWriter dw = CreateWriter(sw)) {
                a.WriteXml(dw, new SamlSerializer(), null);
            }
        }
Esempio n. 2
0
        public void WriteXml1()
        {
            SamlEvidence a = new SamlEvidence();

            a.AssertionIdReferences.Add("myref");

            StringWriter sw = new StringWriter();

            using (XmlDictionaryWriter dw = CreateWriter(sw)) {
                a.WriteXml(dw, new SamlSerializer(), null);
            }
            Assert.AreEqual(String.Format("<?xml version=\"1.0\" encoding=\"utf-16\"?><saml:Evidence xmlns:saml=\"{0}\"><saml:AssertionIDReference>myref</saml:AssertionIDReference></saml:Evidence>", SamlConstants.Namespace), sw.ToString());
        }