Exemple #1
0
        public void IsIssuedSecurityTokenRequirement()
        {
            ServiceModelSecurityTokenRequirement r;
            MyManager mgr = new MyManager(new MyClientCredentials());

            r = new InitiatorServiceModelSecurityTokenRequirement();
            MySslSecurityTokenParameters ssl =
                new MySslSecurityTokenParameters();

            ssl.InitRequirement(r);
            Assert.IsFalse(mgr.IsIssued(r), "ssl");

            r = new InitiatorServiceModelSecurityTokenRequirement();
            MySspiSecurityTokenParameters sspi =
                new MySspiSecurityTokenParameters();

            sspi.InitRequirement(r);
            Assert.IsFalse(mgr.IsIssued(r), "sspi");

            r = new InitiatorServiceModelSecurityTokenRequirement();
            MyIssuedSecurityTokenParameters issued =
                new MyIssuedSecurityTokenParameters();

            issued.InitRequirement(r);
            Assert.IsTrue(mgr.IsIssued(r), "issued");

//			r = new InitiatorServiceModelSecurityTokenRequirement ();
//			MySecureConversationSecurityTokenParameters sc =
//				new MySecureConversationSecurityTokenParameters ();
//			sc.InitRequirement (r);
//			Assert.IsFalse (mgr.IsIssued (r), "sc");
        }
		public void IsIssuedSecurityTokenRequirement ()
		{
			ServiceModelSecurityTokenRequirement r;
			MyManager mgr = new MyManager (new MyClientCredentials ());

			r = new InitiatorServiceModelSecurityTokenRequirement ();
			MySslSecurityTokenParameters ssl =
				new MySslSecurityTokenParameters ();
			ssl.InitRequirement (r);
			Assert.IsFalse (mgr.IsIssued (r), "ssl");

			r = new InitiatorServiceModelSecurityTokenRequirement ();
			MySspiSecurityTokenParameters sspi =
				new MySspiSecurityTokenParameters ();
			sspi.InitRequirement (r);
			Assert.IsFalse (mgr.IsIssued (r), "sspi");

			r = new InitiatorServiceModelSecurityTokenRequirement ();
			MyIssuedSecurityTokenParameters issued =
				new MyIssuedSecurityTokenParameters ();
			issued.InitRequirement (r);
			Assert.IsTrue (mgr.IsIssued (r), "issued");

//			r = new InitiatorServiceModelSecurityTokenRequirement ();
//			MySecureConversationSecurityTokenParameters sc =
//				new MySecureConversationSecurityTokenParameters ();
//			sc.InitRequirement (r);
//			Assert.IsFalse (mgr.IsIssued (r), "sc");
		}