public void FactoryMustReturnIUnitOfWorkIstance()
        {
            var factory = new UnitOfWorkFactory();

            var uow = factory.Create();

            Assert.IsType(typeof(UnitOfWork), uow);
        }
        public void FactoryDefaultCtorCreateUowWithCustomDataContext()
        {
            IUnitOfWorkFactory unitOfWorkFactory = new UnitOfWorkFactory();

            var unitOfWork = unitOfWorkFactory.Create();

            Assert.IsType<CustomDataContext>(unitOfWork.DataContext);
        }
        public void FactoryMustCreateUowWithDataContext()
        {
            IDataContext dataContext = new CustomDataContext();
            IUnitOfWorkFactory factory = new UnitOfWorkFactory();

            var uow = factory.Create(dataContext);

            Assert.Equal(dataContext, uow.DataContext);
        }
 private void PrepareRepository()
 {
     var unitOfWorkFactory = new UnitOfWorkFactory();
     _unitOfWork = unitOfWorkFactory.Create();
     _repository = new ItemsRepository(_unitOfWork);
 }