Esempio n. 1
0
        public void Initialize()
        {
            _mockDbContext = new Mock<IDbContext>();
            _fakeDbSet = FakeDbSetBuilder.New<FakeObject>().Build(t => t.Id);
            _mockDbContext.Setup(t => t.FindAll<FakeObject>()).Returns(_fakeDbSet);

            _unitOfWork = new EFUnitOfWork(_mockDbContext.Object);

            _repository = new FakeRepository(_mockDbContext.Object, _unitOfWork);
        }
 public PeopleDataContext()
 {
     People = new GenericFakeDbSet<Person, int>(r => r.Id);
 }