public void should_throw_if_more_than_one_call_has_the_same_input_type() { var firstMethod = ReflectionHelper.GetMethod<TestController>(c => c.SomeAction(null)); var otherMethod = ReflectionHelper.GetMethod<TestController>(c => c.AnotherAction(null)); var policy = new DefaultRouteInputTypeBasedUrlPolicy(typeof(TestInputModel)); var firstCall = new ActionCall(typeof (TestController), firstMethod); var otherCall = new ActionCall(typeof(TestController), otherMethod); policy.Matches(firstCall, _log); typeof(FubuException).ShouldBeThrownBy(() => policy.Matches(otherCall, _log)); }
public void SetUp() { _method = ReflectionHelper.GetMethod<TestController>(c => c.SomeAction(null)); _policy = new DefaultRouteInputTypeBasedUrlPolicy(typeof(TestInputModel)); _log = new RecordingConfigurationObserver(); }