public void SetUp()
        {
            var groupData = new List <SqlSupplierGroup> {
                SqlSupplierGroupTests.CreateSqlSupplierGroup()
            }.AsQueryable();

            groups = new FakeDbSet <SqlSupplierGroup>(groupData);

            context = new Mock <SuppliersContext>();
            context.Setup(m => m.Groups).Returns(groups.Object);

            supplierGroupDal = new SupplierGroupDal(context.Object);
        }
Exemple #2
0
        public void SetUp()
        {
            var supplierData = new List <SqlSupplier> {
                SqlSupplierTests.CreateSqlSupplier()
            }.AsQueryable();

            suppliers = new FakeDbSet <SqlSupplier>(supplierData);

            context = new Mock <SuppliersContext>();
            context.Setup(m => m.Suppliers).Returns(suppliers.Object);

            supplierDal = new SupplierDal(context.Object);
        }