public static void Initialize(TestContext context) { //Configure the UowFactory to create a new database and seed sample data UowFactory.Configure(true, true); DeleteDbFile(); //create the unit of work to be tested Uow = (UnitOfWork)UowFactory.CreateUnitOfWork("DefaultConnection"); }
public static void Initialize(TestContext context) { //Configure the UowFactory to create a new database and seed sample data UowFactory.Configure(true, true); DeleteDbFile(); var configurator = new EndpointConfigurator(); var config = configurator.Configure(new HttpConfiguration()); Server = new HttpServer(config); Client = new HttpClient(Server); }
public static void Initialize(TestContext context) { //Configure the UowFactory to create a new database and seed sample data UowFactory.Configure(true, true); DeleteDbFile(); //create an instance to be used in test IUnitOfWork Uow = UowFactory.CreateUnitOfWork("DefaultConnection"); var repo = Uow.GetEntityRepository <Product>(); var item = new Product() { Name = "Pro one", Category = "Best Seller" }; var inserted = repo.InsertOrUpdate(item); Uow.Commit(); EntityId = inserted.Id; }
static UowController() { UowFactory.Configure(false, true); }