/// <summary> /// Test the response /// </summary> /// <param name="response">The response.</param> /// <param name="expectedType">The expected type.</param> /// <param name="lineCount">The line count.</param> /// <param name="expectedDisplay">The expected display.</param> /// <param name="lines">The response lines.</param> /// <param name="fileContents">The file contents.</param> private void ResponseTest(IResponse response, ResponseType expectedType, int lineCount, string expectedDisplay, IList<string> lines, string fileContents) { Assert.AreEqual(lineCount, response.LineCount); Assert.AreEqual(expectedType, response.Type); response.Initialize(lines); Assert.IsFalse(response.Processed); response.Process(); Assert.IsTrue(response.Processed); if (response is IFileResponse) ((IFileResponse)response).Contents = fileContents.Encode(); string display = response.Display(); Console.WriteLine(display); Assert.AreEqual(expectedDisplay, display); XElement el = response.GetXElement(); bool result = TestHelper.ValidateResponseXML(el); Assert.IsTrue(result); Console.WriteLine(el.ToString()); Console.WriteLine("Lines:"); foreach (string s in response.Lines) { Console.WriteLine(s); } }