protected override void Setup() { context = new LightSpeedContext<NorthwindUnitOfWork>("LSNorthwind"); db = context.CreateUnitOfWork(); Customers = db.Customers.ToList(); Employees = db.Employees.ToList(); Orders = db.Orders.ToList(); Products = db.Products.ToList(); }
public void ProductListLengthGreaterThan0() { // instanciar el unitofwork var unitOfWork = new NorthwindUnitOfWork(_connectionString); // obtener la lista de productos var listaProductos = unitOfWork.Products.GetList(); // hacer la comprobación Assert.AreNotEqual(0, listaProductos.Count()); }
public void ProductListNotNull() { // instanciar el unitofwork var unitOfWork = new NorthwindUnitOfWork(_connectionString); // obtener la lista de productos var listaProductos = unitOfWork.Products.GetList(); // hacer la comprobación Assert.IsNotNull(listaProductos); }
public void GetAll_Returns_Entities() { //given there are product entities //when GetAll is called on product repository var products = new NorthwindUnitOfWork().GetRepository<Product>().GetAll(); //then product entities should be returned Assert.IsTrue(products.Any()); }
public CustomerRepositoryTest() { _context = new NorthwindDBContext(); unit = new NorthwindUnitOfWork(_context); }
public FindUsersBySearchTextQueryHandler(NorthwindUnitOfWork db) { this.db = db; }
public CustomerRepositoryTest() { unit = new NorthwindUnitOfWork("Server=.;Database=Northwind_Lite; Trusted_Connection=True;MultipleActiveResultSets=True"); }