Esempio n. 1
0
        public void Given_A_Thumbnail_Url_And_A_Archetype_Web_Page_Url_If_Thumbnail_Url_Is_NullOrEmpty_Should_Invoke_ArchetypeThumbnailFromWebPage_Method_Once()
        {
            // Arrange
            const string articleUrl = "https://yugioh.fandom.com/wiki/Tentacluster";

            // Act
            _sut.ArchetypeThumbnail(string.Empty, articleUrl);

            // Assert
            _archetypeThumbnail.Received(1).FromWebPage(Arg.Is(articleUrl));
        }
Esempio n. 2
0
        public async Task Given_An_ArticleId_With_A_Thumbnail_Should_Not_Execute_FromWebPage()
        {
            // Arrange
            const int articleId = 3242;

            _archetypeThumbnail.FromArticleId(articleId).Returns("https://vignette.wikia.nocookie.net/yugioh/images/6/65/EvolzarLaggia-TF06-JP-VG.png/revision/latest/window-crop/width/200/x-offset/0/y-offset/0/window-width/545/window-height/544?cb=20110928032728");

            // Act
            await _sut.ArchetypeThumbnail(articleId, Arg.Any <string>());

            // Assert
            _archetypeThumbnail.DidNotReceive().FromWebPage(Arg.Any <string>());
        }