public void TestGetHeadersValueSplitLine() { const string expectedName = "MessageID"; KeyValuePair <string, string> header = HeaderExtractor.SeparateHeaderNameAndValue(string.Format("{0}:", expectedName)); Assert.AreEqual(expectedName, header.Key, "Header Name"); Assert.AreEqual(string.Empty, header.Value, "Header Value"); }
public void TestGetHeadersValueSingleLine() { const string expectedName = "MessageID"; const string expectedValue = "<1234567890>"; KeyValuePair <string, string> header = HeaderExtractor.SeparateHeaderNameAndValue(string.Format("{0}: {1}", expectedName, expectedValue)); Assert.AreEqual(expectedName, header.Key, "Header Name"); Assert.AreEqual(expectedValue, header.Value, "Header Value"); }