public void Parse_StatusMessage_XMLString() { string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"xml_samples\Status.xml"); ulong id = 12; StatusThread statusThread1 = new StatusThread(StatusThreadState.Idle); StatusThread statusThread2 = new StatusThread(StatusThreadState.Idle); ulong howLong = 1000; ulong problemInstanceId = 2; ulong taskId = 1; string problemType = "TCP"; StatusThread statusThread3 = new StatusThread(StatusThreadState.Busy, howLong, problemInstanceId, taskId, problemType); StatusThread[] statusThreads = { statusThread1, statusThread2, statusThread3 }; StatusMessage message = new StatusMessage(id, statusThreads); string actualXmlStr = message.ToXmlString(); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); string expectedXmlStr = xmlDoc.OuterXml; Assert.AreEqual(expectedXmlStr, actualXmlStr); }