public void writing_large_object() { var data = GenerateJsonTestData(60000); ClassUnderTest.Write(theFubuRequestContext, data, "application/json"); theOutputWriter.ToString().ShouldNotBeEmpty(); }
public void should_write_only_json_output_when_jsonp_request_parameter_is_not_present() { ClassUnderTest.Write(output); var json = JsonUtil.ToJson(output); theOutputWriter.ToString().TrimEnd().ShouldEqual(json); }
public void should_write_json_serialized_string_to_the_output_writer() { string json = JsonUtil.ToJson(output); theOutputWriter.ContentType.ShouldEqual(MimeType.Json.ToString()); theOutputWriter.ToString().TrimEnd().ShouldEqual(json); }
public void should_write_json_serialized_string_to_the_output_writer_regardless_of_request_headers() { var json = JsonUtil.ToJson(output); theOutputWriter.ContentType.ShouldEqual(MimeType.Json.ToString()); theOutputWriter.ToString().TrimEnd().ShouldEqual(json); }
public void the_resulting_feed_does_manage_to_write_some_xml() { var outputWriter = new InMemoryOutputWriter(); theWriter.Write(outputWriter); outputWriter.ContentType.ShouldEqual(new FeedWithExtension().ContentType); outputWriter.ToString().ShouldContain("<Item xmlns=\"\"><City>Dallas</City><Name>The second item</Name></Item>"); }
public void writes_the_json_from_the_json_serializer() { theOutputWriter.ToString().TrimEnd().ShouldEqual(theJson); }
public void writes_the_description() { theWriter.ToString().ShouldEqual("<div></div>{0}".ToFormat(Environment.NewLine)); theWriter.ContentType.ShouldEqual(MimeType.Html.Value); }
public void the_contents_of_the_writer_should_equal_the_xml() { theOutput.ToString().Trim().ShouldEqual(theDocument.Document.OuterXml.Trim()); }