public void should_resolve_the_requested_model_with_the_first_binder_that_matches()
        {
            binder1 = MockRepository.GenerateMock <IModelBinder>();
            binder2 = MockRepository.GenerateMock <IModelBinder>();

            binder1.Stub(x => x.Matches(typeof(BinderTarget))).Return(false);
            binder2.Stub(x => x.Matches(typeof(BinderTarget))).Return(false);

            expectedResult = new BinderTarget();

            matchingBinder = new StubBinder(expectedResult);

            BindingScenario <BinderTarget> .Build(x =>
            {
                x.Registry.Add(binder1);
                x.Registry.Add(binder2);
                x.Registry.Add(matchingBinder);
            }).ShouldBeTheSameAs(expectedResult);
        }
 public StubBinder(BinderTarget target)
 {
     _target = target;
 }