Esempio n. 1
0
        public async Task Should_not_enrich_if_statistics_not_found()
        {
            var source = new RuleEntity {
                AppId = appId
            };

            var result = await sut.EnrichAsync(source, requestContext);

            Assert.Equal(0, result.NumFailed);
            Assert.Equal(0, result.NumSucceeded);
            Assert.Null(result.LastExecuted);
        }
Esempio n. 2
0
        public async Task Should_not_enrich_if_statistics_not_found()
        {
            var source = CreateRule();

            var result = await sut.EnrichAsync(source, requestContext);

            Assert.Equal(0, result.NumFailed);
            Assert.Equal(0, result.NumSucceeded);

            Assert.Null(result.LastExecuted);

            A.CallTo(() => requestCache.AddDependency(source.UniqueId, source.Version))
            .MustHaveHappened();

            A.CallTo(() => requestCache.AddDependency(null))
            .MustNotHaveHappened();
        }