public void TestEmptyDictionaryOfHeaders() { Dictionary <String, String> headers = new Dictionary <string, string>(); DictionaryHeaderProvider provider = new DictionaryHeaderProvider(headers); Assert.AreEqual(0, provider.GetHeaders().Length); }
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); }
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); }
public void TestHeaderValuesCorrespondToObjectValuesDouble() { DictionaryHeaderProvider provider = new DictionaryHeaderProvider(new { a = "b", c = "d" }); Assert.AreEqual("d", provider.GetHeaders()[1].Value); }
public void TestHeaderValuesCorrespondToObjectKeysSingle() { DictionaryHeaderProvider provider = new DictionaryHeaderProvider(new { a = "b" }); Assert.AreEqual("a", provider.GetHeaders()[0].Name); }
public void TestCatchesNullObject2() { DictionaryHeaderProvider provider = new DictionaryHeaderProvider((object)null); }
public void TestCatchesNullObject() { DictionaryHeaderProvider provider = new DictionaryHeaderProvider((IDictionary <string, string>)null); }
public TestReceiveContext(Uri sourceAddress) : base(sourceAddress, false, new ReceiveObservable(), null, null) { HeaderProvider = new DictionaryHeaderProvider(new Dictionary <string, object>()); }
public TestReceiveContext(ReceiveEndpointContext receiveEndpointContext) : base(false, receiveEndpointContext) { HeaderProvider = new DictionaryHeaderProvider(new Dictionary <string, object>()); }