Example #1
0
        public void Defaults()
        {
            ConcreteWebResponse wr = new ConcreteWebResponse();

            Assert.Throws <NotImplementedException> (delegate {
                Assert.IsNull(wr.ContentLength);
            }, "ContentLength-get");

            Assert.Throws <NotImplementedException> (delegate {
                Assert.IsNull(wr.ContentType);
            }, "ContentType-get");

            Assert.Throws <NotImplementedException> (delegate {
                Assert.IsNull(wr.ResponseUri);
            }, "ResponseUri-get");

            Assert.Throws <NotImplementedException> (delegate {
                wr.Close();
            }, "Close");

            Assert.Throws <NotImplementedException> (delegate {
                wr.GetResponseStream();
            }, "GetResponseStream");

            Assert.Throws <NotImplementedException> (delegate {
                Assert.IsNotNull(wr.Headers);
            }, "Headers");
            Assert.IsFalse(wr.SupportsHeaders, "SupportsHeaders");
        }
Example #2
0
		public void Defaults ()
		{
			ConcreteWebResponse wr = new ConcreteWebResponse ();

			Assert.Throws<NotImplementedException> (delegate {
				Assert.IsNull (wr.ContentLength);
			}, "ContentLength-get");

			Assert.Throws<NotImplementedException> (delegate {
				Assert.IsNull (wr.ContentType);
			}, "ContentType-get");

			Assert.Throws<NotImplementedException> (delegate {
				Assert.IsNull (wr.ResponseUri);
			}, "ResponseUri-get");

			Assert.Throws<NotImplementedException> (delegate {
				wr.Close ();
			}, "Close");

			Assert.Throws<NotImplementedException> (delegate {
				wr.GetResponseStream ();
			}, "GetResponseStream");

			Assert.Throws<NotImplementedException> (delegate {
				Assert.IsNotNull (wr.Headers);
			}, "Headers");
			Assert.IsFalse (wr.SupportsHeaders, "SupportsHeaders");
		}