Пример #1
0
        public async Task Get_Cards_WhenCalled_With_A_CardName_Should_Return_FileContentResult()
        {
            // Arrange
            const string cardName = "Blue-Eyes White Dragon";

            _mediator.Send(Arg.Any <IRequest <CardImageByNameResult> >()).Returns(new CardImageByNameResult {
                ContentType = "image/jpeg", Image = new byte[] { 1, 2, 3, 4, 5 }
            });

            // Act
            var result = await _sut.Cards(cardName);

            // Assert
            result.Should().BeOfType <FileContentResult>();
        }