Ejemplo n.º 1
0
        public async Task Should_remove_app_id_from_index()
        {
            await sut.AddAppAsync(appId1);

            await sut.AddAppAsync(appId2);

            await sut.RemoveAppAsync(appId1);

            var result = await sut.GetAppIdsAsync();

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

            A.CallTo(() => persistence.WriteSnapshotAsync(A <AppsByUserIndexGrain.State> .Ignored))
            .MustHaveHappenedTwiceOrMore();
        }
Ejemplo n.º 2
0
        public async Task Should_remove_app_id_from_index()
        {
            await sut.AddAppAsync(appId1);

            await sut.AddAppAsync(appId2);

            await sut.RemoveAppAsync(appId1);

            var result = await sut.GetAppIdsAsync();

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

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