public void all_just_delegates() { IQueryable <User> queryable = new User[0].AsQueryable(); MockFor <IPersistor>().Stub(x => x.LoadAll <User>()).Return(queryable); ClassUnderTest.All().ShouldBeTheSameAs(queryable); }
public void soft_deleted_entities_are_not_available_from_All() { var c1 = new SoftDeletedEntity(); var c2 = new SoftDeletedEntity { Deleted = new Milestone(DateTime.Now) }; var c3 = new SoftDeletedEntity(); var c4 = new SoftDeletedEntity { Deleted = new Milestone(DateTime.Now) }; thePersistor.Persist(c1); thePersistor.Persist(c2); thePersistor.Persist(c3); thePersistor.Persist(c4); thePersistor.Persist(c2); thePersistor.Persist(c4); ClassUnderTest.All().ShouldHaveTheSameElementsAs(c1, c3); }