public void AboutTest()
 {
     HomeController target = new HomeController(); // TODO: Initialize to an appropriate value
     ActionResult expected = null; // TODO: Initialize to an appropriate value
     ActionResult actual;
     actual = target.About();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void AboutTest()
 {
     var calcService = new CalcService();
     var controller = new HomeController();
     var result = controller.About() as ViewResult;
     var message = result.ViewData["Message"].ToString();
     Assert.IsNotNull(result);
     Assert.AreEqual("How to use this calculator.", message);
 }
Example #3
0
        public void About() {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
        public void About()
        {
            // Disponer
            HomeController controller = new HomeController();

            // Actuar
            ViewResult result = controller.About() as ViewResult;

            // Declarar
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.IsNotNull(result);
        }
Example #7
0
        public void HomeController_AboutViewName()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            var result = controller.About() as ViewResult;

            // Assert
            Assert.AreEqual("About", result.ViewName);
        }
Example #8
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("About Us", result.ViewBag.Message);
        }
        public void About()
        {
            // Упорядочение
            HomeController controller = new HomeController();

            // Действие
            ViewResult result = controller.About() as ViewResult;

            // Утверждение
            Assert.IsNotNull(result);
        }
Example #10
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController(null);

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

            // Assert
            result.ShouldNotBeNull();
        }
Example #11
0
        public void AboutReturnView()
        {
            //Arrange
            HomeController controller = new HomeController();

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

            //Assert
            Assert.AreEqual("About", result.ViewName);
        }
        public void About()
        {
            // 排列
            HomeController controller = new HomeController();

            // 作用
            ViewResult result = controller.About() as ViewResult;

            // 判斷提示
            Assert.IsNotNull(result);
        }
Example #13
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("My Bank application alfa version", result.ViewBag.Message);
        }
        public void About()
        {
            // 排列
            HomeController controller = new HomeController();

            // 操作
            ViewResult result = controller.About() as ViewResult;

            // 断言
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            var controller = new HomeController();

            // Act
            var result = controller.About() as ViewResult;

            // Assert
            Assert.NotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("The Blog Core", result.ViewBag.Message);
        }
Example #17
0
        public void About()
        {
            // 準備
            HomeController controller = new HomeController();

            // 実行
            ViewResult result = controller.About() as ViewResult;

            // アサート
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Setup
            HomeController controller = new HomeController();

            // Execute
            ViewResult result = controller.About() as ViewResult;

            // Verify
            ViewDataDictionary viewData = result.ViewData;
        }
Example #19
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController(null);

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

            // Assert
            Assert.IsNotNull(result);
        }
Example #20
0
        public void Get_Request_To_About_Page_Should_Return_Correct_View()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("P.C.A. the ultimate pro-calc application.", result?.ViewBag.Message);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.That(result, Is.Not.Null);
        }
Example #22
0
        public void About()
        {
            // Упорядочение
            HomeController controller = new HomeController();

            // Действие
            ViewResult result = controller.About() as ViewResult;

            // Утверждение
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController(new StatusReportRepository(ConfigurationManager.ConnectionStrings["StatusAgain"].ConnectionString));

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

            // Assert
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController(new DebugLogger());

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

            // Assert
            Assert.AreEqual("Technologies that have been used to make this page:", result.ViewBag.Message);
        }
        public void About_returns_the_About_view()
        {
            var repository = Mock.Of<IPostRepository>();
            var validator = Mock.Of<ICodeValidator>();

            var controller = new HomeController(repository, validator);

            var result = controller.About() as ViewResult;

            Assert.NotNull(result);
        }
Example #26
0
        public void About()
        {
            // Arrange
            var            userRepositoryMock = new Mock <IUserRepository>();
            HomeController controller         = new HomeController(userRepositoryMock.Object);

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result  = controller.About() as ViewResult;
            string     message = result?.ViewBag.Message as string;

            // Assert
            message.Should().Be("Your application description page.");
        }
Example #28
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.IsNotNull(result);
            //Assert.AreEqual("Bundisoft is a software company founded by Daniel Holm in 2017. We create games and software for mobile platforms.", result.ViewBag.Message);
        }
Example #29
0
        public void AboutAction_ReturnsMessageInViewBag()
        {
            //Arrange
            string expected       = "Your app description page.";
            var    homeController = new HomeController();

            //Act
            var result = homeController.About() as ViewResult;

            //Assert
            Assert.AreEqual(expected, result.ViewBag.Message, "ViewBag message incorrect");
        }
        public void About_should_return_default_view()
        {
            //Arrange
            var controller = new HomeController();

            //Act
            var result = controller.About() as ViewResult;

            //Assert
            Assert.NotNull(result);
            Assert.True(string.IsNullOrEmpty(result.ViewName) || result.ViewName == "About");
        }
Example #31
0
        public void About_ReurnsViewResultWithViewDataMessage()
        {
            // Arrange

            // Act
            var result = _controller.About();

            // Assert
            var ressult = Assert.IsType <ViewResult>(result);

            Assert.Equal(ressult.ViewData["Message"], "Your application description page.");
        }
Example #32
0
        public void About()
        {
            // Arrange
            var controller = new HomeController();

            // Act
            var result = controller.About();

            // Assert
            Assert.IsInstanceOf <ViewResult>(result);
            Assert.AreEqual("Your application description page.", (result as ViewResult).ViewBag.Message);
        }
        public void About()
        {
            // Arrange
            ILogRepository _fakeLogRepository = new FakeLogRepository();
            HomeController controller         = new HomeController(_fakeLogRepository);

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
Example #34
0
        public void AboutReturnsViewResultWithDefaultViewName(HomeController controller)
        {
            // Arrange

            // Act
            var result = controller.About();

            // Assert
            var viewResult = Assert.IsType <ViewResult>(result);

            Assert.Empty(viewResult.ViewName);
        }
Example #35
0
        public void About()
        {
            // Arrange
            Mock<IContact> mockRepository = new Mock<IContact>();
            HomeController controller = new HomeController(mockRepository.Object);

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

            // Assert
            Assert.AreEqual("Contact description page.", result.ViewBag.Message);
        }
Example #36
0
        public void About()
        {
            ITeenbookRepository tbMockRepo = new TeenbookMockRepository();
            // Arrange
            HomeController controller = new HomeController(tbMockRepo);

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
Example #37
0
        public void HomeControllerAboutViewTest()
        {
            var controller = new HomeController();

            var result = controller.About();

            var viewResult = Assert.IsType <ViewResult>(result);

            ViewDataDictionary viewData = viewResult.ViewData;

            Assert.Equal("Your application description page.", viewData["Message"]);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("This is the employee monthly payslip calculator.", result.ViewBag.Message);
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            var controller = new HomeController(new FakeRepository());

            // Act
            var result = controller.About() as ViewResult;
            var titles = result.ViewData.Model as IEnumerable <CustomersTitle>;

            // Assert
            Assert.AreEqual(1, titles.Count());
        }
Example #40
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("OdoToFood Application", result.ViewBag.Message);
            Assert.IsNotNull(result.Model);
        }
        public void About_should_go_to_about_view()
        {
            var userGroup = new UserGroup();

            var home = new HomeController();

            ViewResult result = home.About(userGroup);

            result.ViewName.ShouldEqual("");
            result.ViewData.Model.ShouldEqual(userGroup);
            ((AutoMappedViewResult)result).ViewModelType.ShouldBe(typeof(UserGroupInput));
        }
        public void AboutTest()
        {
            AboutEntity entity = homeController.About();

            Assert.IsNotNull(entity);
            Assert.IsNotNull(entity.Id);
            Assert.IsNotNull(entity.Name);
            Assert.IsNotNull(entity.DisplayDataList);
            Assert.Equals(entity.Id, "about");
            Assert.Equals(entity.Name, "About");
            Assert.Equals(entity.DisplayDataList.Count, 2);
        }
Example #43
0
        public void About()
        {//REALIZADO POR: JORGE KLAUZ VALDIVIA DAVALOS
            //PRUEBA TRATA: Prueba el método ABOUT, su funcionamiento
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
        }
        public void About()
        {
            // Setup
            HomeController controller = new HomeController();

            // Execute
            ViewResult result = controller.About() as ViewResult;

            // Verify
            ViewDataDictionary viewData = result.ViewData as ViewDataDictionary;

            Assert.AreEqual("About Page", viewData["Title"]);
        }