Example #1
0
		static XmlElement FindAndRemove (PolicyAssertionCollection collection, string name, string ns)
		{
			var element = collection.Find (name, ns);
			if (element != null)
				collection.Remove (element);
			return element;
		}
        public static void AssertPolicy(
            PolicyAssertionCollection assertions, QName qname, TestLabel label)
        {
            var assertion = assertions.Find(qname.Name, qname.Namespace);

            label.EnterScope(qname.Name);
            Assert.That(assertion, Is.Not.Null, label.ToString());
            assertions.Remove(assertion);
            label.LeaveScope();
        }
Example #3
0
        static XmlElement FindAndRemove(PolicyAssertionCollection collection, string name, string ns)
        {
            var element = collection.Find(name, ns);

            if (element != null)
            {
                collection.Remove(element);
            }
            return(element);
        }
Example #4
0
		public static void AssertPolicy (
			PolicyAssertionCollection assertions, QName qname, TestLabel label)
		{
			var assertion = assertions.Find (qname.Name, qname.Namespace);
			label.EnterScope (qname.Name);
			Assert.That (assertion, Is.Not.Null, label.ToString ());
			assertions.Remove (assertion);
			label.LeaveScope ();
		}