public void AddNativeHeaderLazyInit()
        {
            var headerAccessor = new NativeMessageHeaderAccessor();

            headerAccessor.AddNativeHeader("foo", "bar");

            Assert.Equal(new List <string>()
            {
                "bar"
            }, headerAccessor.GetNativeHeader("foo"));
        }
Example #2
0
        public void SetNativeHeaderNullValue()
        {
            var nativeHeaders = new Dictionary <string, List <string> >();

            nativeHeaders.Add("foo", new List <string>()
            {
                "bar"
            });

            var headers = new NativeMessageHeaderAccessor(nativeHeaders);

            headers.SetNativeHeader("foo", null);

            Assert.Null(headers.GetNativeHeader("foo"));
        }
Example #3
0
        public void AddNativeHeader()
        {
            var nativeHeaders = new Dictionary <string, List <string> >();

            nativeHeaders.Add("foo", new List <string>()
            {
                "bar"
            });

            var headers = new NativeMessageHeaderAccessor(nativeHeaders);

            headers.AddNativeHeader("foo", "baz");

            Assert.Equal(new List <string>()
            {
                "bar", "baz"
            }, headers.GetNativeHeader("foo"));
        }
        public void AddNativeHeaderNullValue()
        {
            var nativeHeaders = new Dictionary <string, List <string> >
            {
                { "foo", new List <string>()
                  {
                      "bar"
                  } }
            };

            var headers = new NativeMessageHeaderAccessor(nativeHeaders);

            headers.AddNativeHeader("foo", null);

            Assert.Equal(new List <string>()
            {
                "bar"
            }, headers.GetNativeHeader("foo"));
        }