예제 #1
0
        public void TestEmptyDictionaryOfHeaders()
        {
            Dictionary <String, String> headers = new Dictionary <string, string>();

            DictionaryHeaderProvider provider = new DictionaryHeaderProvider(headers);

            Assert.AreEqual(0, provider.GetHeaders().Length);
        }
예제 #2
0
        public void TestHeaderValuesCorrespondToDictionaryValuesSingle()
        {
            Dictionary <String, String> headers = new Dictionary <string, string>();

            headers.Add("a", "b");
            DictionaryHeaderProvider provider = new DictionaryHeaderProvider(headers);

            Assert.AreEqual("b", provider.GetHeaders()[0].Value);
        }
예제 #3
0
        public void TestHeaderValuesCorrespondToDictionaryKeysDouble()
        {
            Dictionary <String, String> headers = new Dictionary <string, string>();

            headers.Add("a", "b");
            headers.Add("c", "d");
            DictionaryHeaderProvider provider = new DictionaryHeaderProvider(headers);

            Assert.AreEqual("c", provider.GetHeaders()[1].Name);
        }
예제 #4
0
        public void TestHeaderValuesCorrespondToObjectValuesDouble()
        {
            DictionaryHeaderProvider provider = new DictionaryHeaderProvider(new { a = "b", c = "d" });

            Assert.AreEqual("d", provider.GetHeaders()[1].Value);
        }
예제 #5
0
        public void TestHeaderValuesCorrespondToObjectKeysSingle()
        {
            DictionaryHeaderProvider provider = new DictionaryHeaderProvider(new { a = "b" });

            Assert.AreEqual("a", provider.GetHeaders()[0].Name);
        }