Beispiel #1
0
        public void remove()
        {
            var persistor = new InMemoryPersistor();

            persistor.Persist(new User());
            var user1 = new User();

            persistor.Persist(user1);
            persistor.Persist(new User());

            persistor.Remove(user1);

            persistor.LoadAll <User>().Count().ShouldBe(2);
            persistor.LoadAll <User>().ShouldNotContain(user1);
        }
        public void remove()
        {
            var persistor = new InMemoryPersistor();

            persistor.Persist(new User());
            var user1 = new User();
            persistor.Persist(user1);
            persistor.Persist(new User());

            persistor.Remove(user1);

            persistor.LoadAll<User>().Count().ShouldEqual(2);
            persistor.LoadAll<User>().ShouldNotContain(user1);
        }