public IService GetAvtoCarDriveService(string token) { var telegramBotClient = new TelegramBotClient(token); var adminIdsService = new AdminIdsService(); var carService = new CarService(); var messageProcessorFactory = new MessageProcessorFactory(_logger, telegramBotClient, adminIdsService, carService); var messageTypeIdentifier = new MessageTypeIdentifier(); return(new AvtoCarDriveService(new TelegramBotClient(token), new MessageProcessor(_logger, telegramBotClient, messageProcessorFactory, adminIdsService, messageTypeIdentifier))); }
public void GetAdminIds_TheExpectedIdsWasGot() { // Arrange _target.SetAdminId(111111); _target.SetAdminId(222222); _target.SetAdminId(333333); _target.SetAdminId(444444); var expectedListOfAdmins = new List <long> { 111111, 222222, 333333, 444444 }; // Act _target = new AdminIdsService(Environment.CurrentDirectory + "/TestData"); var actualListOfAdmin = _target.AdminIds; // Assert CollectionAssert.AreEqual(expectedListOfAdmins, actualListOfAdmin); }
public void InitializeTest() { RemoveDataFile(); _target = new AdminIdsService(Environment.CurrentDirectory + "/TestData"); }