public void TestParseMessageFail14() { parser = new XmlMessageParser("message.parser.XmlMessageParser.Unidentified"); string messageText = File.ReadAllText("../../test_files/testMessageInvalid3.xml"); parser.ParseMessage(messageText); }
public void TestParseMessageFail12() { parser = new XmlMessageParser("message.parser.XmlMessageParser.Invalid7"); string messageText = File.ReadAllText("../../test_files/testMessage.xml"); parser.ParseMessage(messageText); }
public void TestParseMessage2() { parser = new XmlMessageParser("message.parser.XmlMessageParserValid2"); string messageText = File.ReadAllText("../../test_files/testMessage.xml"); Message message = parser.ParseMessage(messageText); Assert.AreEqual(message.DestinationQueue, null, "DestinationQueue is incorrect."); }
public void TestParseMessageFail11() { XmlMessageTypeDetector detector = new XmlMessageTypeDetector("type.detector.XmlMessageTypeDetectorWithValidator"); IList <IMessageTypeDetector> configParameters = new List <IMessageTypeDetector>(); configParameters.Add(detector); parser = new XmlMessageParser(configParameters); string messageText = File.ReadAllText("../../test_files/testMessage2.xml"); parser.ParseMessage(messageText); }
public void TestParseMessage() { string messageText = File.ReadAllText("../../test_files/accuracyTests/MessageParse.xml"); Message message = parser.ParseMessage(messageText); Assert.AreEqual(messageText, message.DisplayMessage, "DisplayMessage of returned message is incorrect"); Assert.AreEqual(DateTime.Now.Date, message.Received.Date, "Received of returned message is incorrect"); Assert.AreEqual("Source Queue", message.SourceQueue.Name, "SourceQueue of returned message is incorrect"); Assert.AreEqual("MyDescription", message.SourceQueue.Description, "SourceQueue of returned message is incorrect"); Assert.AreEqual("Mypath", message.SourceQueue.Path, "SourceQueue of returned message is incorrect"); Assert.IsNull(message.DestinationQueue, "DestinationQueue is incorrect."); Assert.AreEqual("SRequest", message.Type.Name, "DestinationQueue is incorrect."); }