public void SetUp() { unitTestContext.UrlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/22-01-15-deck-1/")) .Returns("http://deck1"); unitTestContext.UrlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/deck-2/")) .Returns("http://deck2"); unitTestContext.UrlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/21-01-15-deck-3-esper/")) .Returns("http://deck3"); plugin = new TappedOutDecksHubPlugin( unitTestContext.BotServicesMock.Object, unitTestContext.BotConfig); plugin.LoggingService = unitTestContext.LoggingServiceMock.Object; }
public void SetUp() { // Setup ICardPriceStore Mocks priceStoreMock = new Mock <ICardPriceStore>(); // Setup ICommandParser Mocks commandParserMock = new Mock <ICommandParser>(); // Setup IHttpClient Mocks httpClientMock = new Mock <IHttpClient>(); // Setup IUrlShortener Mocks urlShortenerMock = new Mock <IUrlShortener>(); urlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/22-01-15-deck-1/")) .Returns("http://deck1"); urlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/deck-2/")) .Returns("http://deck2"); urlShortenerMock.Setup(u => u.ShortenUrl("http://tappedout.net/mtg-decks/21-01-15-deck-3-esper/")) .Returns("http://deck3"); // Setup IMessenger Mocks messengerMock = new Mock <IMessenger>(); plugin = new TappedOutDecksHubPlugin( mtgStore, priceStoreMock.Object, commandParserMock.Object, httpClientMock.Object, urlShortenerMock.Object, new BotConfig()); plugin.LoggingService = loggingServiceMock.Object; }