Ejemplo n.º 1
0
        public void DeleteGetView()
        {
            var controller = new ItemController(new ItemBLL(new ItemServiceStub()));
            var actionResult = (ViewResult)controller.Delete(1);

            Assert.AreEqual(actionResult.ViewName, "");
            Assert.IsNotNull(actionResult.Model);
        }
Ejemplo n.º 2
0
        public void DeleteGetViewBadId()
        {
            var controller = new ItemController(new ItemBLL(new ItemServiceStub()));
            var result = (HttpStatusCodeResult)controller.Delete(null);

            Assert.AreEqual(result.StatusCode, 400);
        }