Exemple #1
0
        public async Task Should_resolve_rules_by_id()
        {
            var rule = SetupRule(0);

            A.CallTo(() => cache.GetRuleIdsAsync())
            .Returns(new List <DomainId> {
                rule.Id
            });

            var actual = await sut.GetRulesAsync(appId.Id);

            Assert.Same(actual[0], rule);
        }
Exemple #2
0
        public async Task Should_resolve_rules_by_id()
        {
            var rule = SetupRule(0, false);

            A.CallTo(() => index.GetIdsAsync())
            .Returns(new List <Guid> {
                rule.Id
            });

            var actual = await sut.GetRulesAsync(appId.Id);

            Assert.Same(actual[0], rule);
        }