Exemplo n.º 1
0
        protected override void beforeEach()
        {
            logs = RecordLogging();

            registered = new BinderTarget();
            request    = ClassUnderTest;
        }
Exemplo n.º 2
0
        public void inject_by_concrete_find_by_abstraction()
        {
            FubuRequest request = ClassUnderTest;

            var target = new BinderTarget();

            request.Set(target);

            request.Get <BinderTarget>().ShouldBeTheSameAs(target);


            request.Find <BinderTargetBase>().First().ShouldBeTheSameAs(target);
        }
Exemplo n.º 3
0
        protected override void setupContext()
        {
            binder1        = MockRepository.GenerateMock <IModelBinder>();
            binder2        = MockRepository.GenerateMock <IModelBinder>();
            matchingBinder = MockRepository.GenerateMock <IModelBinder>();

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

            expectedResult = new BinderTarget();

            binders.Add(binder1);
            binders.Add(binder2);
            binders.Add(matchingBinder);

            matchingBinder.Stub(x => x.Bind(typeof(BinderTarget), data)).Return(expectedResult);
        }
Exemplo n.º 4
0
 protected override void beforeEach()
 {
     registered = new BinderTarget();
     request    = ClassUnderTest;
 }
Exemplo n.º 5
0
 protected override void beforeEach()
 {
     _binderTarget = new BinderTarget();
     ClassUnderTest.Set(_binderTarget);
 }