public AlfaBankBotTest() { _client = new Mock <ITelegramBotClient>(); _users = new Mock <IUserRepository>(); _logs = new Mock <ILogRepository>(); _commands = new Mock <IGeneralCommandsFactory>(); _questions = new Mock <IQuestionCommandFactory>(); var logger = new Mock <ILogger <AlfaBankBot> >(); var results = new Mock <IQuizResultRepository>(); var telegramBotClient = _client.Object; var userRepository = _users.Object; var logRepository = _logs.Object; var generalCommandsFactory = _commands.Object; var questionCommandFactory = _questions.Object; var quizResultRepository = results.Object; _bot = new AlfaBankBot( telegramBotClient, userRepository, quizResultRepository, logRepository, generalCommandsFactory, questionCommandFactory, logger.Object); GenerateFakesInit(); }
/// <inheritdoc /> public BotController(IAlfaBankBot bot) { _bot = bot ?? throw new ArgumentNullException(nameof(bot)); }
/// <inheritdoc /> public MessageController(IAlfaBankBot bot, ILogger <MessageController> logger) { _bot = bot ?? throw new ArgumentNullException(nameof(bot)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }