예제 #1
0
        public IQueryable <SUPPLIER> GetSUPPLIERs([PexAssumeUnderTest] SUPPLIERsController target)
        {
            IQueryable <SUPPLIER> result = target.GetSUPPLIERs();

            return(result);
            // TODO: add assertions to method SUPPLIERsControllerTest.GetSUPPLIERs(SUPPLIERsController)
        }
예제 #2
0
        public void Test_AllSuppliers()
        {
            var suplierList = GetSUPPLIERs();
            var SC          = new SUPPLIERsController();
            var result      = SC.GetSUPPLIERs() as List <SUPPLIER>;

            Assert.AreEqual(suplierList.Count, result.Count);
        }
        public void GetAllSuppliers_ShouldReturnAllSuppliers()
        {
            var testSuppliers = GetTestSuppliers();

            mockSupplierRepository.Setup(s => s.GetAllSuppliers()).Returns(Task.FromResult(testSuppliers).Result);
            var result = controller.GetSUPPLIERs() as List <SupplierModel>;

            Assert.AreEqual(testSuppliers.Count, result.Count);
        }