Exemple #1
0
 public void when_the_user_has_full_rights_return_null_so_that_the_construction_can_continue_to_the_next_in_the_chain()
 {
     theRightsAre = AccessRight.All;
     theResultingTag.ShouldBeNull();
 }
Exemple #2
0
        public void when_the_user_has_only_read_access_the_builder_should_return_the_display_for_element()
        {
            theRightsAre = AccessRight.ReadOnly;
            var displayTag = new HtmlTag("span");
            services.MockFor<ITagGenerator<TheModel>>().Stub(x => x.DisplayFor(theRequest)).Return(displayTag);

            theResultingTag.ShouldBeTheSameAs(displayTag);
        }
Exemple #3
0
 public void return_an_element_that_is_not_authorized_if_there_are_not_rights()
 {
     theRightsAre = AccessRight.None;
     theResultingTag.Authorized().ShouldBeFalse();
 }