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 RedditTopCommentPlugin(unitTestContext.BotServicesMock.Object); plugin.BotName = unitTestContext.BotName; plugin.LoggingService = unitTestContext.LoggingServiceMock.Object; plugin.OnLoad(); }
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 RedditTopCommentPlugin( mtgStore, priceStoreMock.Object, commandParserMock.Object, httpClient, urlShortenerMock.Object); plugin.BotName = "TEST"; plugin.LoggingService = loggingServiceMock.Object; plugin.OnLoad(); }