protected override void beforeEach() { logs = RecordLogging(); registered = new BinderTarget(); request = ClassUnderTest; }
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); }
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); }
protected override void beforeEach() { registered = new BinderTarget(); request = ClassUnderTest; }
protected override void beforeEach() { _binderTarget = new BinderTarget(); ClassUnderTest.Set(_binderTarget); }