public async Task Should_CallFileServiceGetBlob_When_GetAsyncWithContentTypeUrlForPicture()
        {
            var fixture = new Fixture();

            var content = fixture.Build <BurnRuleContentModel>()
                          .With(c => c.Id, Guid.Parse("26a88452-48ab-48eb-b9df-a22b281d1584"))
                          .With(c => c.RuleContentType, RuleContentType.UrlForPicture)
                          .Create();

            var content1 = fixture.Build <BurnRuleContentModel>()
                           .With(c => c.Id, Guid.Parse("26a88452-48ab-48eb-b9df-a22b281d1589"))
                           .With(c => c.RuleContentType, RuleContentType.Description)
                           .Create();

            var burnModel = fixture.Build <BurnRuleModel>()
                            .With(c => c.BurnRuleContents,
                                  new List <BurnRuleContentModel>()
            {
                content,
                content1
            })
                            .Create();

            _burnRuleRepositoryMock.Setup(b => b.GetAsync(It.IsAny <Guid>(), It.IsAny <bool>()))
            .ReturnsAsync(burnModel);

            _fileServiceMock.Setup(c => c.GetAsync(It.IsAny <Guid>()))
            .ReturnsAsync(new FileResponseModel());

            var service = new BurnRuleService(
                AssetName,
                _burnRuleRepositoryMock.Object,
                _burnRuleContentRepositoryMock.Object,
                _spendRuleChangeEventPublisher.Object,
                EmptyLogFactory.Instance,
                _fileServiceMock.Object,
                _burnRuleContentValidationMock.Object,
                _burnRulePartnerRepositoryMock.Object);

            var exception = await Record.ExceptionAsync(() => service.GetAsync(burnModel.Id));

            Assert.Null(exception);

            _burnRuleRepositoryMock.
            Verify(r => r.GetAsync(It.IsAny <Guid>(), It.IsAny <bool>()), Times.Once);

            _fileServiceMock
            .Verify(c => c.GetAsync(Guid.Parse("26a88452-48ab-48eb-b9df-a22b281d1584")), Times.Once);
        }
        public async Task Should_ThrowEntityNotFoundException_When_GetAsyncWithContentTypeUrlForPicture()
        {
            _burnRuleRepositoryMock.Setup(b => b.GetAsync(It.IsAny <Guid>(), It.IsAny <bool>()))
            .ReturnsAsync(() => null);

            var service = new BurnRuleService(
                AssetName,
                _burnRuleRepositoryMock.Object,
                _burnRuleContentRepositoryMock.Object,
                _spendRuleChangeEventPublisher.Object,
                EmptyLogFactory.Instance,
                _fileServiceMock.Object,
                _burnRuleContentValidationMock.Object,
                _burnRulePartnerRepositoryMock.Object);

            var exception = await Record.ExceptionAsync(() => service.GetAsync(Guid.Parse("26a88452-48ab-48eb-b9df-a22b281d1584")));

            Assert.NotNull(exception);
            Assert.IsType <EntityNotFoundException>(exception);
            Assert.Equal("Burn rule with id 26a88452-48ab-48eb-b9df-a22b281d1584 does not exist.", exception.Message);
        }