public void ShouldLogInfoWhenInputIsEmpty() { //Initialize the class under test using mocked dependency (console logger) var evenLib = new WorkshopRunner.EvenLib(_mockConsoleLogger.Object); var inputArray = new string[] {}; evenLib.GetEvenLength(inputArray); _mockConsoleLogger.Verify(mockConsole => mockConsole.Info(It.IsAny <string>()), Times.Once); }
public void ShouldThrowExceptionWhenInputIsNull() { var evenLib = new WorkshopRunner.EvenLib(_mockConsoleLogger.Object); Assert.ThrowsException <ArgumentNullException>(() => evenLib.GetEvenLength(null)); }