Ejemplo n.º 1
0
        public void finds_methods_case_insensitively()
        {
            var actions = new EndpointActionSource().As <IActionSource>().FindActions(Assembly.GetExecutingAssembly());

            var matching = actions.Where(x => x.HandlerType == typeof(WeirdEndPoint)).Select(x => x.Description);

            matching
            .ShouldHaveTheSameElementsAs("WeirdEndPoint.get_something() : String");
        }
Ejemplo n.º 2
0
        public void only_finds_methods_that_follow_the_right_pattern_and_are_not_on_object()
        {
            var actions = new EndpointActionSource().As <IActionSource>().FindActions(Assembly.GetExecutingAssembly());

            var matching = actions.Where(x => x.HandlerType == typeof(HomeEndpoint)).Select(x => x.Description);

            matching
            .ShouldHaveTheSameElementsAs("HomeEndpoint.Index() : HtmlDocument");
        }