示例#1
0
        public async Task FavRemoveFailDataTest()
        {
            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();

            var persist = new FavRemove {
                Session = session, Key = "user", Value = UserData.SecondId, CurrentUser = AdminUser
            };
            await persist.Execute();

            persist.Confirm.Should().NotBeNull();
            persist.Confirm.Success.Should().BeFalse();
        }
示例#2
0
        public async Task FavRemoveExistingDataTest()
        {
            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();

            var persist = new FavRemove {
                Session = session, Key = "user", Value = UserData.FirstId, CurrentUser = StandardUser
            };
            await persist.Execute();

            persist.Confirm.Should().NotBeNull();
            persist.Confirm.Success.Should().BeTrue();
            persist.Model.EntityIds.Count.Should().Be(0);
        }