Example #1
0
 public void Setup()
 {
     this.webHandler = new Mocks.TestWebRequestHandler();
     this.channel    = new OpenIdChannel(new AssociationMemoryStore <Uri>(), new NonceMemoryStore(maximumMessageAge), new RelyingPartySecuritySettings());
     this.accessor   = OpenIdChannel_Accessor.AttachShadow(this.channel);
     this.channel.WebRequestHandler = this.webHandler;
 }
Example #2
0
        private void VerifyFullPost(List <MultipartPostPart> parts)
        {
            var  request = (HttpWebRequest)WebRequest.Create("http://localhost");
            var  handler = new Mocks.TestWebRequestHandler();
            bool posted  = false;

            handler.Callback = req => {
                foreach (string header in req.Headers)
                {
                    TestUtilities.TestLogger.InfoFormat("{0}: {1}", header, req.Headers[header]);
                }
                TestUtilities.TestLogger.InfoFormat(handler.RequestEntityAsString);
                Assert.AreEqual(req.ContentLength, handler.RequestEntityStream.Length);
                posted = true;
                return(null);
            };
            request.PostMultipart(handler, parts);
            Assert.IsTrue(posted, "HTTP POST never sent.");
        }
		public void Setup() {
			this.webHandler = new Mocks.TestWebRequestHandler();
			this.channel = new OpenIdRelyingPartyChannel(new MemoryCryptoKeyStore(), new NonceMemoryStore(maximumMessageAge), new RelyingPartySecuritySettings());
			this.channel.WebRequestHandler = this.webHandler;
		}
		public void Setup() {
			this.webHandler = new Mocks.TestWebRequestHandler();
			this.channel = new OpenIdChannel(new AssociationMemoryStore<Uri>(), new NonceMemoryStore(maximumMessageAge), new RelyingPartySecuritySettings());
			this.accessor = OpenIdChannel_Accessor.AttachShadow(this.channel);
			this.channel.WebRequestHandler = this.webHandler;
		}
 private void VerifyFullPost(List<MultiPartPostPart> parts)
 {
     var request = (HttpWebRequest)WebRequest.Create("http://localhost");
     var handler = new Mocks.TestWebRequestHandler();
     bool posted = false;
     handler.Callback = req => {
         foreach (string header in req.Headers) {
             TestContext.WriteLine("{0}: {1}", header, req.Headers[header]);
         }
         TestContext.WriteLine(handler.RequestEntityAsString);
         Assert.AreEqual(req.ContentLength, handler.RequestEntityStream.Length);
         posted = true;
         return null;
     };
     request.PostMultipart(handler, parts);
     Assert.IsTrue(posted, "HTTP POST never sent.");
 }
Example #6
0
 public void Setup()
 {
     this.webHandler = new Mocks.TestWebRequestHandler();
     this.channel    = new OpenIdRelyingPartyChannel(new MemoryCryptoKeyStore(), new NonceMemoryStore(maximumMessageAge), new RelyingPartySecuritySettings());
     this.channel.WebRequestHandler = this.webHandler;
 }