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(); }
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(); }