public void has_view_is_positive_with_always()
        {
            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<ITemplateFile>();
            node.AddView(viewToken, null);

            node.HasView(Always.Flyweight).ShouldBeTrue();
        }
        public void has_view_is_positive_with_always()
        {
            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<IViewToken>();
            node.AddView(viewToken);

            node.HasView(typeof(Always)).ShouldBeTrue();
        }
Пример #3
0
        public void has_view_is_positive_with_always()
        {
            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <IViewToken>();

            node.AddView(viewToken);

            node.HasView(typeof(Always)).ShouldBeTrue();
        }
Пример #4
0
        public void has_view_is_positive_with_always()
        {
            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <ITemplateFile>();

            node.AddView(viewToken, null);

            node.HasView(Always.Flyweight).ShouldBeTrue();
        }
        public void has_view_negative_when_there_is_a_view_but_it_has_different_conditions()
        {
            Type conditionType = typeof(FakeConditional);

            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<IViewToken>();
            node.AddView(viewToken, conditionType);

            node.HasView(typeof(Always)).ShouldBeFalse();
        }
        public void has_view_positive_with_different_conditional()
        {
            var condition = new FakeConditional();

            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<ITemplateFile>();
            node.AddView(viewToken);

            node.HasView().ShouldBeTrue();
        }
        public void has_view_negative_when_there_is_a_view_but_it_has_different_conditions()
        {
            var condition = new FakeConditional();

            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<ITemplateFile>();
            node.AddView(viewToken, condition);

            node.HasView(Always.Flyweight).ShouldBeFalse();
        }
Пример #8
0
        public void has_view_negative_when_there_is_a_view_but_it_has_different_conditions()
        {
            var conditionType = typeof(FakeConditional);

            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <IViewToken>();

            node.AddView(viewToken, conditionType);

            node.HasView(typeof(Always)).ShouldBeFalse();
        }
Пример #9
0
        public void has_view_positive_with_different_conditional()
        {
            var conditionType = typeof(FakeConditional);

            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <IViewToken>();

            node.AddView(viewToken, conditionType);

            node.HasView(conditionType).ShouldBeTrue();
        }
        public void has_view_positive_with_different_conditional()
        {
            var condition = new FakeConditional();

            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <ITemplateFile>();

            node.AddView(viewToken);

            node.HasView().ShouldBeTrue();
        }
Пример #11
0
        public void has_view_negative_when_there_is_a_view_but_it_has_different_conditions()
        {
            var condition = new FakeConditional();

            var node      = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock <ITemplateFile>();

            node.AddView(viewToken, condition);

            node.HasView(Always.Flyweight).ShouldBeFalse();
        }
Пример #12
0
        public void has_view_is_false_when_it_is_empty()
        {
            var node = new OutputNode(typeof(Address));

            node.HasView(typeof(Always)).ShouldBeFalse();
        }
Пример #13
0
        public void has_view_positive_with_different_conditional()
        {
            var conditionType = typeof (FakeConditional);

            var node = new OutputNode(typeof(Address));
            var viewToken = MockRepository.GenerateMock<IViewToken>();
            node.AddView(viewToken, conditionType);

            node.HasView(conditionType).ShouldBeTrue();
        }
Пример #14
0
 public void has_view_is_false_when_it_is_empty()
 {
     var node = new OutputNode(typeof(Address));
     node.HasView(typeof (Always)).ShouldBeFalse();
 }