public void NonExistingFileName() { const string fileName = "Some.file"; _handler.Handle(fileName); // Call to Upload. _logger.Received(1).LogExec(Arg.Any <Expression <Func <bool> > >()); // Error logging. _logger.Received(1).LogInfo(FileUploadHandler.FileCannotBeFoundErrMsg(fileName)); Assert.That(_handler.IsHandled, Is.False); }