public void SetUp() { var theHttpRequest = MockRepository.GenerateMock<ICurrentChain>(); theHttpRequest.Stub(x => x.ResourceHash()).Return("something/else"); FubuApplication.SetupNamingStrategyForHttpHeaders(); theEtagRequest = BindingScenario<ETaggedRequest>.Build(x => { x.Service<ICurrentChain>(theHttpRequest); x.Data("If-None-Match", "12345"); }); }
public void SetUp() { var theHttpRequest = new CurrentChain(new BehaviorChain(), new Dictionary<string, object>()); theExpectedHash = ResourceHash.For(theHttpRequest); FubuApplication.SetupNamingStrategyForHttpHeaders(); theEtagRequest = BindingScenario<ETaggedRequest>.Build(x => { x.Service<ICurrentChain>(theHttpRequest); x.Data("If-None-Match", "12345"); }); }
public void SetUp() { var theHttpRequest = new CurrentChain(new BehaviorChain(), new Dictionary <string, object>()); theExpectedHash = ResourceHash.For(theHttpRequest); FubuApplication.SetupNamingStrategyForHttpHeaders(); theEtagRequest = BindingScenario <ETaggedRequest> .Build(x => { x.Service <ICurrentChain>(theHttpRequest); x.Data("If-None-Match", "12345"); }); }
protected override void beforeEach() { theETaggedRequest = new ETaggedRequest() { IfNoneMatch = Guid.NewGuid().ToString(), ResourceHash = "/something/here" }; theEtagTuple = new ETagTuple <ResourceOfSomeKind> { Request = theETaggedRequest, Target = new ResourceOfSomeKind() }; MockFor <IETagGenerator <ResourceOfSomeKind> >().Stub(x => x.Create(null)) .Return(theNewEtag) .IgnoreArguments(); }
public void SetUp() { var theHttpRequest = MockRepository.GenerateMock<ICurrentChain>(); theHttpRequest.Stub(x => x.ResourceHash()).Return("something/else"); var locator = new StructureMapServiceLocator(new Container(x => { x.For<ICurrentChain>().Use(theHttpRequest); })); FubuApplication.SetupNamingStrategyForHttpHeaders(); var data = new InMemoryRequestData(); data["If-None-Match"] = "12345"; var context = new BindingContext(data, locator, new NulloBindingLogger()); var binder = StandardModelBinder.Basic(); theEtagRequest = binder.Bind(typeof(ETaggedRequest), context).As<ETaggedRequest>(); }
public void SetUp() { var theHttpRequest = MockRepository.GenerateMock <ICurrentChain>(); theHttpRequest.Stub(x => x.ResourceHash()).Return("something/else"); var locator = new StructureMapServiceLocator(new Container(x => { x.For <ICurrentChain>().Use(theHttpRequest); })); FubuApplication.SetupNamingStrategyForHttpHeaders(); var data = new InMemoryRequestData(); data["If-None-Match"] = "12345"; var context = new BindingContext(data, locator, new NulloBindingLogger()); var binder = StandardModelBinder.Basic(); theEtagRequest = binder.Bind(typeof(ETaggedRequest), context).As <ETaggedRequest>(); }