public void MultifunctionalDevice_NotDoubling_Recievers_On_Recievers_List() { var fax = new MultifunctionalDevice(); fax.PowerOn(); fax.Fax("Test1"); fax.Fax("Test1"); fax.Fax("Test1"); Assert.AreEqual(1, fax.RecieversList.Count); }
public void MultifunctionalDevice_Correct_FaxCounter() { var fax = new MultifunctionalDevice(); fax.PowerOn(); fax.Fax("test1"); fax.Fax("test1"); fax.Fax("test1"); fax.Fax("test1"); fax.Fax("test1"); Assert.AreEqual(5, fax.FaxCounter); }
public void MultifunctionalDevice_Trying_Not_To_Type_Reciever_Of_Fax(string reciever) { var fax = new MultifunctionalDevice(); fax.PowerOn(); fax.Fax(reciever); }
public void MultiFunctionalDevice_Fax_DeviceOn() { var fax = new MultifunctionalDevice(); fax.PowerOn(); var currentConsoleOut = Console.Out; currentConsoleOut.Flush(); using (var consoleOutput = new ConsoleRedirectionToStringWriter()) { fax.Fax("test"); Assert.IsTrue(consoleOutput.GetOutput().Contains("Scan")); Assert.IsTrue(consoleOutput.GetOutput().Contains("Sending")); } Assert.AreEqual(currentConsoleOut, Console.Out); }