CQRS.Tests.KeyValueStorage.DocumentDbTests.DeletingAllObjectsOfATypeLeavesNoSuchObjectsInTheDBButLeavesOtherObjectsInPlaceAndReturnsTheNumberOfDeletedObjects C# (CSharp) Метод

DeletingAllObjectsOfATypeLeavesNoSuchObjectsInTheDBButLeavesOtherObjectsInPlaceAndReturnsTheNumberOfDeletedObjects() приватный Метод

        public void DeletingAllObjectsOfATypeLeavesNoSuchObjectsInTheDBButLeavesOtherObjectsInPlaceAndReturnsTheNumberOfDeletedObjects()
        {
            var store = CreateStore();

            Dictionary<Type, Dictionary<string, string>> adict = new Dictionary<Type, Dictionary<string, string>>();

            1.Through(4).ForEach(num => 
            {
                var user = new User() { Id = Guid.NewGuid()};                
                store.Add(user.Id, user, adict);
            });

            1.Through(4).ForEach(num =>
            {
                var person = new Person() { Id = Guid.NewGuid() };
                store.Add(person.Id, person, adict);
            });

            store.GetAll<User>().Should().HaveCount(4);
            store.GetAll<Person>().Should().HaveCount(8); //User inherits person

            store.RemoveAll<User>().Should().Be(4);

            store.GetAll<User>().Should().HaveCount(0);

            store.GetAll<Person>().Should().HaveCount(4);

        }
DocumentDbTests