public void Setup() { _container = TestControllerBuilder.GetWindsorContainer(); var pipelineFactory = new PipelineFactory( _container, null, null, null, new SingleStepPipelineProviderForTest(typeof(PersistExistingModel <, , ,>)), null); var controller = TestControllerBuilder.GetController <StudentsController>(pipelineFactory, _id.ToString("N")); _id = Guid.NewGuid(); _responseMessage = controller.Post( new StudentPost { ETag = _id.ToString("n") }) .GetResultSafely() .ExecuteAsync(new CancellationToken()) .GetResultSafely(); }
public void Setup() { _id = Guid.NewGuid(); var container = TestControllerBuilder.GetWindsorContainer(); var pipelineFactory = new PipelineFactory( container, null, null, null, new SingleStepPipelineProviderForTest(typeof(ConcurrencyExceptionStep <, , ,>)), null); var controller = TestControllerBuilder.GetController <StudentsController>(pipelineFactory, _id.ToString("N")); controller.Request.Headers.IfMatch.Add( new EntityTagHeaderValue( _id.ToString("N") .Quoted())); _responseMessage = controller.Put(new StudentPut(), _id) .GetResultSafely() .ExecuteAsync(new CancellationToken()) .GetResultSafely(); }