Пример #1
0
        public void SetUp()
        {
            // Setup ICardPriceStore Mocks
            priceStoreMock = new Mock <ICardPriceStore>();

            // Setup ICommandParser Mocks
            commandParserMock = new Mock <ICommandParser>();

            httpClient = new SimpleHttpClient(loggingServiceMock.Object);

            // Setup IUrlShortener Mocks
            urlShortenerMock = new Mock <IUrlShortener>();

            // Setup IMessenger Mocks
            messengerMock = new Mock <IMessenger>();

            plugin = new WhatsInStandardPlugin(
                mtgStore,
                priceStoreMock.Object,
                commandParserMock.Object,
                httpClient,
                urlShortenerMock.Object,
                new BotConfig());

            plugin.LoggingService = loggingServiceMock.Object;
        }
        public void SetUp()
        {
            unitTestContext = new UnitTestContext();

            mtgStore = new MtgStore(
                testConfig.Url,
                testConfig.Database,
                unitTestContext.QueryStatisticsStoreMock.Object,
                unitTestContext.LoggingServiceMock.Object,
                unitTestContext.SearchUtilityMock.Object);

            unitTestContext.BotServicesMock.SetupGet(b => b.Store)
            .Returns(mtgStore);

            httpClient = new SimpleHttpClient(unitTestContext.LoggingServiceMock.Object);

            unitTestContext.BotServicesMock.SetupGet(b => b.HttpClient)
            .Returns(httpClient);

            plugin = new WhatsInStandardPlugin(
                unitTestContext.BotServicesMock.Object,
                unitTestContext.BotConfig);

            plugin.LoggingService = unitTestContext.LoggingServiceMock.Object;
        }