static void Main(string[] args) { ConsoleWrapper wrapper = new ConsoleWrapper(); ConsoleProcessor consoleProcessor = new ConsoleProcessor(wrapper); consoleProcessor.PopulateData(); consoleProcessor.CheckPoints(); }
public void CheckPointsTest() { //arrange var queueString = new Queue <string>(); queueString.Enqueue("Vasya"); queueString.Enqueue("Petya"); _consoleWrapper.Setup(x => x.Write(It.IsAny <string>())).Verifiable(); _consoleWrapper.Setup(x => x.Read()).Returns(queueString.Dequeue); _consoleWrapper.Setup(x => x.ReadInt()).Returns(2); //act consoleProcessor.PopulateData(); consoleProcessor.CheckPoints(); //assert _consoleWrapper.Verify(x => x.Write(It.IsAny <string>()), Times.Exactly(8)); }