Example #1
0
        public void DbOperationsTest()
        {
            var dbContextProvider = TestContextCreator.Create();

            using (var dbContext = dbContextProvider.DbContext)
            {
                var workplace  = new EfWorkplace(dbContextProvider);
                var savedModel = _testDataGenerator.CreateRandomData(workplace);
                dbContext.SaveChanges();

                var loadedModel = LoadModel(workplace);

                AssertModelsAreEqual(savedModel, loadedModel);
            }
        }
 public void EstablishContext()
 {
     _validatorFactory = new Mock <IValidatorFactory>();
     _context          = TestContextCreator.Create(_validatorFactory.Object).PCExpertContext;
 }
Example #3
0
 public void EstablishContext()
 {
     _workplace = new EfWorkplace(TestContextCreator.Create());
 }
 public void EstablishContext()
 {
     _provider   = TestContextCreator.Create();
     _unitOfWork = new EntityFrameworkUnitOfWork(_provider);
 }