private static void Main(string[] args) { IConsole console = new ConsoleAdapter(); IPdfToTextConverter pdfToText = new PdfToTextConverter(new ConsoleAdapter()); IEmailService email = new EmailService(new ConsoleAdapter()); pdfToText.Completed += email.Send; pdfToText.Convert("TDDEvent.pdf"); console.ReadLine(); }
public void ReadLine_ReadLineFromInputStream_ReturnsString() { using (StringReader sr = new StringReader("Test Input")) { //Arrange IConsoleAdapter aConsoleAdapter = new ConsoleAdapter(); //Act Console.SetIn(sr); var result = aConsoleAdapter.ReadLine(); var expected = "Test Input"; //Assert Assert.IsNotNull(result); Assert.AreEqual <string>(result, expected); } }