Ejemplo n.º 1
0
        public void EditTest()
        {
            long?num    = null;
            var  result = _controller.Edit(num) as HttpStatusCodeResult;

            Assert.AreEqual((int)HttpStatusCode.BadRequest, result.StatusCode);

            result = _controller.Edit(long.MaxValue) as HttpNotFoundResult;
            Assert.AreEqual((int)HttpStatusCode.NotFound, result.StatusCode);

            ViewResult vr = _controller.Edit(1) as ViewResult;

            if (vr != null)
            {
                Assert.IsTrue(true);
            }
        }