public void RetrievesFakesInstances()
        {
            var cust = new Customer {
                Id = 4
            };

            using (Fake.Data(cust)) {
                Customer.FindById(4).ShouldBeTheSameAs(cust);
            }
        }
        public void ResetsDataAccess()
        {
            var cust = new Customer {
                Id = 4
            };

            using (Fake.Data(cust)) { }

            Customer.dataAccess.ShouldBe <DefaultDataAccess>();
        }
        public void DeletesInstance()
        {
            var cust = new Customer {
                Id = 4
            };

            using (Fake.Data(cust)) {
                cust.Delete();
                Customer.FindAll().Count().ShouldEqual(0);
            }
        }
        public void StoresFakeInstance()
        {
            using (Fake.Data()) {
                var customer = new Customer {
                    Name = "Jeremy", Id = 4
                };
                customer.Save();

                var customer2 = Customer.FindById(4);
                customer2.ShouldBeTheSameAs(customer);
            }
        }
        public void RetrievesAllFakeInstances()
        {
            var custs = new[] {
                new Customer {
                    Id = 1
                },
                new Customer {
                    Id = 2
                }
            };

            using (Fake.Data(custs)) {
                var all = Customer.FindAll();
                all.Count().ShouldEqual(2);
            }
        }