コード例 #1
0
        public async Task Should_add_rule_id_to_index()
        {
            await sut.AddRuleAsync(ruleId1);

            await sut.AddRuleAsync(ruleId2);

            var result = await sut.GetRuleIdsAsync();

            Assert.Equal(new List <Guid> {
                ruleId1, ruleId2
            }, result);

            A.CallTo(() => persistence.WriteSnapshotAsync(A <RulesByAppIndexGrain.State> .Ignored))
            .MustHaveHappenedTwiceExactly();
        }
コード例 #2
0
        public async Task Should_add_rule_id_to_index()
        {
            await sut.AddRuleAsync(ruleId1);

            await sut.AddRuleAsync(ruleId2);

            var result = await sut.GetRuleIdsAsync();

            Assert.Equal(new List <Guid> {
                ruleId1, ruleId2
            }, result);

            A.CallTo(() => grainState.WriteAsync())
            .MustHaveHappenedTwiceExactly();
        }