コード例 #1
0
        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);
        }
コード例 #2
0
        protected override void beforeEach()
        {
            output = new JsonOutput
            {
                Name = "Max",
                Age  = 6
            };

            ClassUnderTest.Write(output);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }