public void TestAction() { Message m = Message.CreateMessage(MessageVersion.Default, "test", 1); m.Headers.Add(MessageHeader.CreateHeader("FirstHeader", "ns", "first")); Assert.AreEqual("test", m.Headers.Action, "#1"); MessageHeaders headers = new MessageHeaders(MessageVersion.Default, 1); Assert.AreEqual(null, headers.Action, "#2"); headers.Add(MessageHeader.CreateHeader("Action", "http://www.w3.org/2005/08/addressing", "test")); MessageHeaderInfo info = headers [0]; Assert.AreEqual("Action", info.Name, "#2-1"); Assert.AreEqual("http://www.w3.org/2005/08/addressing", info.Namespace, "#2-2"); Assert.AreEqual(false, info.MustUnderstand, "#2-3"); Assert.AreEqual(String.Empty, info.Actor, "#2-4"); Assert.AreEqual("test", headers.Action, "#3"); headers.Clear(); Assert.AreEqual(null, headers.Action, "#4"); }
public void TestAction () { Message m = Message.CreateMessage (MessageVersion.Default, "test", 1); m.Headers.Add (MessageHeader.CreateHeader ("FirstHeader", "ns", "first")); Assert.AreEqual ("test", m.Headers.Action, "#1"); MessageHeaders headers = new MessageHeaders (MessageVersion.Default, 1); Assert.AreEqual (null, headers.Action, "#2"); headers.Add (MessageHeader.CreateHeader ("Action", "http://www.w3.org/2005/08/addressing", "test")); MessageHeaderInfo info = headers [0]; Assert.AreEqual ("Action", info.Name, "#2-1"); Assert.AreEqual ("http://www.w3.org/2005/08/addressing", info.Namespace, "#2-2"); Assert.AreEqual (false, info.MustUnderstand, "#2-3"); Assert.AreEqual (String.Empty, info.Actor, "#2-4"); Assert.AreEqual ("test", headers.Action, "#3"); headers.Clear (); Assert.AreEqual (null, headers.Action, "#4"); }
public void TestClearMethod() { MessageHeaders messageHeaders = new MessageHeaders(null); messageHeaders.Clear(); }