コード例 #1
0
        public void ControllerActionResult()
        {
            // Arrange
            ImageUploadController controller = new ImageUploadController();

            // Act
            //ActionResult result = controller.FileUpload(null);

            // Assert
            //Assert.IsNotNull(result);
            //Assert.AreEqual("System.Web.Mvc.ViewResult", result.ToString());
        }
コード例 #2
0
        public void ControllerIndex()
        {
            // Arrange
            ImageUploadController controller = new ImageUploadController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Upload Page", result.ViewBag.Title);
        }