protected override void beforeEach() { output = new JsonOutput { Name = "Max", Age = 6 }; requestData = new InMemoryRequestData(); Services.Inject <IRequestData>(requestData); mimeType = null; rawOutput = null; MockFor <IOutputWriter>().Stub(x => x.Write(null, null)).IgnoreArguments().Do( new Action <string, string>((t, o) => { mimeType = t; rawOutput = o; })); requestData["X-Requested-With"] = "XMLHttpRequest"; ClassUnderTest.Write(output); }
protected override void beforeEach() { output = new JsonOutput { Name = "Max", Age = 6 }; ClassUnderTest.Write(output); }
protected override void beforeEach() { output = new JsonOutput { Name = "Max", Age = 6 }; requestData = new InMemoryRequestData(); Services.Inject <IRequestData>(requestData); theOutputWriter = new InMemoryOutputWriter(); Services.Inject <IOutputWriter>(theOutputWriter); }
protected override void beforeEach() { output = new JsonOutput { Name = "Max", Age = 6 }; requestData = new InMemoryRequestData(); Services.Inject <IRequestData>(requestData); theOutputWriter = new InMemoryOutputWriter(); Services.Inject <IOutputWriter>(theOutputWriter); requestData["X-Requested-With"] = "XMLHttpRequest"; ClassUnderTest.Write(output); }