public async Task Given_An_Article_Should_Invoke_GetYugiohCard_Once() { // Arrange var article = new Article { Id = 3242423 }; _yugiohCardQueue.Publish(Arg.Any <ArticleProcessed>()).Returns(new YugiohCardCompletion { Article = article, IsSuccessful = true }); // Act await _sut.ProcessDataFlow(article); // Assert _cardWebPage.Received(1).GetYugiohCard(Arg.Is(article)); }
public async Task Given_An_Article_Should_Invoke_Process_Once() { // Arrange var article = new Article { Id = 3242423, CorrelationId = Guid.NewGuid() }; _banlistProcessor.Process(Arg.Any <Article>()).Returns(new ArticleProcessed() { Article = article, IsSuccessful = true }); _banlistDataQueue.Publish(Arg.Any <ArticleProcessed>()).Returns(new YugiohBanlistCompletion { Article = article, IsSuccessful = true }); // Act await _sut.ProcessDataFlow(article); // Assert await _banlistProcessor.Received(1).Process(Arg.Any <Article>()); }