public void building_a_ConfigurationGraph_with_no_modification_to_ViewAttacher_gets_you_the_default_view_attachment_filters() { var graph = new ConfigurationGraph(); var attacher = graph.AllConfigurationActions().OfType<ViewAttacher>().Single(); attacher.ActiveFilters.Select(x => x.GetType()) .ShouldHaveTheSameElementsAs(typeof(ActionWithSameNameAndFolderAsViewReturnsViewModelType), typeof(ActionInSameFolderAsViewReturnsViewModelType), typeof(ActionReturnsViewModelType)); }
public void use_explicit_ViewAttachmentFilters_if_that_is_what_is_used() { var graph = new ConfigurationGraph(); graph.Views.AddFilter(new ActionReturnsViewModelType()); var attacher = graph.AllConfigurationActions().OfType<ViewAttacher>().Single(); attacher.ActiveFilters.Select(x => x.GetType()) .ShouldHaveTheSameElementsAs(typeof(ActionReturnsViewModelType)); }