예제 #1
0
        public void GetShop_ShouldReturnCorrectShop()
        {
            var controller = new WebApiShops.Controllers.ShopsController(new WebApiShops.ShopsRepository());

            var result = controller.GetById(2);

            Assert.IsNotNull(result);
        }
예제 #2
0
        public void GetAllShops_ShouldReturnAllShops()
        {
            var repository = new WebApiShops.ShopsRepository();
            var controller = new WebApiShops.Controllers.ShopsController(repository);

            var result = controller.GetAll(Int32.MaxValue);

            Assert.AreEqual(repository.GetAll(Int32.MaxValue, 0).Count, result.Count);
        }
예제 #3
0
        public void GetShopNuber_ShouldReturnCorrectShopNumber()
        {
            var repository = new WebApiShops.ShopsRepository();
            var controller = new WebApiShops.Controllers.ShopsController(repository);

            var shops  = controller.GetAll();
            var result = controller.GetById(3);

            Assert.IsInstanceOfType(System.Web.Http.act);
            //Assert.AreEqual(shops[2], result);
        }