예제 #1
0
        public async Task Get_Archetypes_WhenCalled_With_A_ArchetypeId_Should_Return_FileContentResult()
        {
            // Arrange
            const int archetypeId = 322;

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

            // Act
            var result = await _sut.Archetypes(archetypeId);

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