Ejemplo n.º 1
0
        public void delete_all()
        {
            var persistor = new InMemoryPersistor();

            persistor.Persist(new User());
            persistor.Persist(new User());
            persistor.Persist(new User());
            persistor.Persist(new OtherEntity());
            persistor.Persist(new OtherEntity());
            persistor.Persist(new ThirdEntity());

            persistor.DeleteAll <ThirdEntity>();

            persistor.LoadAll <User>().Count().ShouldBe(3);
            persistor.LoadAll <OtherEntity>().Count().ShouldBe(2);
            persistor.LoadAll <ThirdEntity>().Count().ShouldBe(0);
        }
Ejemplo n.º 2
0
        public void delete_all()
        {
            var persistor = new InMemoryPersistor();

            persistor.Persist(new User());
            persistor.Persist(new User());
            persistor.Persist(new User());
            persistor.Persist(new OtherEntity());
            persistor.Persist(new OtherEntity());
            persistor.Persist(new ThirdEntity());

            persistor.DeleteAll<ThirdEntity>();

            persistor.LoadAll<User>().Count().ShouldEqual(3);
            persistor.LoadAll<OtherEntity>().Count().ShouldEqual(2);
            persistor.LoadAll<ThirdEntity>().Count().ShouldEqual(0);
        }