Exemplo n.º 1
0
        public void Should_Return_The_Deleted_Value_When_Delete_Is_Called_On_An_Existing_Key()
        {
            var headers = new HeaderHash(new Hash {
                { "foo", "bar" }
            });

            Assert.AreEqual("bar", headers.Delete("Foo"));
        }
Exemplo n.º 2
0
        public void Should_Return_Null_When_Delete_Is_Called_On_A_Non_Existent_Key()
        {
            var headers = new HeaderHash(new Hash {
                { "foo", "bar" }
            });

            Assert.Null(headers.Delete("Hello"));
        }
Exemplo n.º 3
0
        public void Should_Be_Able_To_Delete_The_Given_Key_Case_Sensitively()
        {
            var headers = new HeaderHash(new Hash {
                { "foo", "bar" }
            });

            headers.Delete("foo");

            Assert.IsFalse(headers.ContainsKey("foo"));
            Assert.IsFalse(headers.ContainsKey("FOO"));
        }