public void TestRemoveHeaderEvenIfNull() { IMessage <string> message = new GenericMessage <string>("payload", SingletonMap("foo", null)); var accessor = new MessageHeaderAccessor(message); accessor.RemoveHeader("foo"); var headers = accessor.ToDictionary(); Assert.False(headers.ContainsKey("foo")); }
public void TestRemoveHeader() { IMessage message = Message.Create <string>("payload", SingletonMap("foo", "bar")); var accessor = new MessageHeaderAccessor(message); accessor.RemoveHeader("foo"); var headers = accessor.ToDictionary(); Assert.False(headers.ContainsKey("foo")); }