コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: gutapuct/WebApiShops
        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);
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: gutapuct/WebApiShops
        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);
        }