public void methods_with_the_attribute_are_removed() { given_pipeline_selectedHandler <Handler>(); given_filter(); given_request_httpmethod("GET"); given_operations(); when_filtering_operations(); FilteredOperations.Count().ShouldBe(3); FilteredOperations.SingleOrDefault(x => x.Name == "GetForRouteName").ShouldBeNull(); FilteredOperations.SingleOrDefault(x => x.Name == "PostForRouteName").ShouldBeNull(); }
public void methods_matching_convention_are_included() { given_pipeline_selectedHandler <ConventionalHandler>(); given_uri_registration(new object(), "/", "RouteName"); given_request_httpmethod("GET"); given_operations(); given_first_resource_selected(); given_filter(); when_filtering_operations(); FilteredOperations.Count().ShouldBe(1); FilteredOperations.SingleOrDefault(x => x.Name == "GetRouteName").ShouldNotBeNull(); }
public void methods_with_the_attribute_are_included() { given_pipeline_selectedHandler <Handler>(); given_uri_registration(new object(), "/", "RouteName"); given_request_httpmethod("GET"); given_operations(); given_first_resource_selected(); given_filter(); when_filtering_operations(); FilteredOperations.Count().ShouldBe(2); FilteredOperations.SingleOrDefault(x => x.Name == "GetForRouteName").ShouldNotBeNull(); FilteredOperations.SingleOrDefault(x => x.Name == "PostForRouteName").ShouldNotBeNull(); }