Check() public method

public Check ( Evidence evidence ) : bool
evidence Evidence
return bool
		public void Check ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			Evidence e = null;
			Assert.IsTrue (all.Check (e), "Check (null)");
			e = new Evidence ();
			Assert.IsTrue (all.Check (e), "Check (empty)");
			e.AddHost (new Zone (SecurityZone.MyComputer));
			Assert.IsTrue (all.Check (e), "Check (zone)");
			Url u = new Url ("http://www.go-mono.com/");
			e.AddAssembly (u);
			Assert.IsTrue (all.Check (e), "Check (all-assembly)");
			Site s = new Site ("www.go-mono.com");
			e.AddHost (s);
			Assert.IsTrue (all.Check (e), "Check (all-host)");
		}
Esempio n. 2
0
 public static void AllMembershipConditionCallMethods()
 {
     AllMembershipCondition amc = new AllMembershipCondition();
     bool check = amc.Check(new Evidence());
     IMembershipCondition imc = amc.Copy();
     check = amc.Equals(new object());
     int hash = amc.GetHashCode();
     string str = amc.ToString();
     SecurityElement se = new SecurityElement("");
     PolicyLevel pl = (PolicyLevel)Activator.CreateInstance(typeof(PolicyLevel), true);
     amc.FromXml(se);
     amc.FromXml(se, pl);
     se = amc.ToXml();
     se = amc.ToXml(pl);
 }