public void OutputDisplay_Null() { TestConsoleOutput output = new TestConsoleOutput(); TextBox textBox = new TextBox(); string expectedOutput = ""; output.DisplayLine(textBox, null); Assert.AreEqual(expectedOutput, textBox.Text); }
public void WriteLine_TestStringWritten_ShouldMatchOutoutAsExpected() { //Arrange var helloWriter = Factory_HelloWriter(); const string HELLO_PARAM = "Ashraf"; const string EXPECTED_OUTPUT = "Hello Ashraf\r\n"; //Act helloWriter.WriteLine(HELLO_PARAM); //Get output var actualOutput = TestConsoleOutput.ToString(); //Assert Assert.Equal(EXPECTED_OUTPUT, actualOutput); }