Esempio n. 1
0
		public void WriteXmlNoLocation ()
		{
			SamlAuthorityBinding a = new SamlAuthorityBinding ();
			a.AuthorityKind = new XmlQualifiedName ("local", "urn:ns");
			a.Binding = "binding";

			StringWriter sw = new StringWriter ();
			using (XmlDictionaryWriter dw = CreateWriter (sw)) {
				a.WriteXml (dw, new SamlSerializer (), null);
			}
		}
Esempio n. 2
0
		public void WriteXml1 ()
		{
			SamlAuthorityBinding a = new SamlAuthorityBinding ();
			a.AuthorityKind = new XmlQualifiedName ("local", "urn:ns");
			a.Binding = "binding";
			a.Location = "location";

			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:AuthorityBinding xmlns=\"urn:ns\" AuthorityKind=\"local\" Location=\"location\" Binding=\"binding\" xmlns:saml=\"{0}\" />", SamlConstants.Namespace), sw.ToString ());
		}
Esempio n. 3
0
		public void WriteXmlNoAuthorityKind ()
		{
			SamlAuthorityBinding a = new SamlAuthorityBinding ();
			a.Binding = "binding";
			a.Location = "location";

			StringWriter sw = new StringWriter ();
			using (XmlDictionaryWriter dw = CreateWriter (sw)) {
				a.WriteXml (dw, new SamlSerializer (), null);
			}
		}