Exemplo n.º 1
0
        public void ForView_should_throw_if_view_names_do_not_match()
        {
            var result = new ViewResult {
                ViewName = "About"
            };

            result.ForView("Index");
        }
Exemplo n.º 2
0
        public void ForView_should_return_source_result()
        {
            var result = new ViewResult {
                ViewName = "Index"
            };
            var final = result.ForView("Index");

            Assert.That(final, Is.EqualTo(result));
        }
        public void The_index_should_retrieve_the_user_group_by_its_domain_name()
        {
            var userGroup = new UserGroup();

            userGroup.Key = "adnug";

            var home = new HomeController();

            ViewResult result = home.Index(userGroup);

            result.ForView("");
            result.WithViewData <UserGroup>().ShouldNotBeNull();
            ((AutoMappedViewResult)result).ViewModelType.ShouldBe(typeof(UserGroupInput));
        }