示例#1
0
        private IViewsForActionFilter filterMatching(params int[] indices)
        {
            var filter = new StubViewsForActionFilter(views(indices));

            thePolicy.AddFilter(filter);

            return(filter);
        }
        public void use_explicit_ViewAttachmentFilters_if_that_is_what_is_used()
        {
            var attacher = new ViewAttachmentPolicy();
            attacher.AddFilter(new ActionReturnsViewModelType());

            attacher.ActiveFilters.Select(x => x.GetType())
                            .ShouldHaveTheSameElementsAs(typeof(ActionReturnsViewModelType));
        }
        public void use_explicit_ViewAttachmentFilters_if_that_is_what_is_used()
        {
            var attacher = new ViewAttachmentPolicy();

            attacher.AddFilter(new ActionReturnsViewModelType());

            attacher.ActiveFilters.Select(x => x.GetType())
            .ShouldHaveTheSameElementsAs(typeof(ActionReturnsViewModelType));
        }