3131import static org .junit .Assert .assertEquals ;
3232
3333@ SuppressWarnings ("unchecked" )
34- public class JsonWriterTest {
34+ public class JSONWriterTest {
3535 private StringWriter stringWriter ;
36- private JsonWriter writer ;
36+ private JSONWriter writer ;
3737
3838 @ Before
3939 public void before () {
4040 stringWriter = new StringWriter ();
41- writer = new JsonWriter (stringWriter , new JsonWriterSettings ());
41+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ());
4242 }
4343
4444 private static class TestData <T > {
@@ -70,7 +70,7 @@ public void testSingleString() {
7070
7171 @ Test
7272 public void testIndentedEmptyDocument () {
73- writer = new JsonWriter (stringWriter , new JsonWriterSettings (true ));
73+ writer = new JSONWriter (stringWriter , new JSONWriterSettings (true ));
7474 writer .writeStartDocument ();
7575 writer .writeEndDocument ();
7676 final String expected = "{ }" ;
@@ -79,7 +79,7 @@ public void testIndentedEmptyDocument() {
7979
8080 @ Test
8181 public void testIndentedOneElement () {
82- writer = new JsonWriter (stringWriter , new JsonWriterSettings (true ));
82+ writer = new JSONWriter (stringWriter , new JSONWriterSettings (true ));
8383 writer .writeStartDocument ();
8484 writer .writeString ("name" , "value" );
8585 writer .writeEndDocument ();
@@ -89,7 +89,7 @@ public void testIndentedOneElement() {
8989
9090 @ Test
9191 public void testIndentedTwoElements () {
92- writer = new JsonWriter (stringWriter , new JsonWriterSettings (true ));
92+ writer = new JSONWriter (stringWriter , new JSONWriterSettings (true ));
9393 writer .writeStartDocument ();
9494 writer .writeString ("a" , "x" );
9595 writer .writeString ("b" , "y" );
@@ -126,7 +126,7 @@ public void testDouble() {
126126 new TestData <Double >(Double .POSITIVE_INFINITY , "Infinity" ));
127127 for (final TestData <Double > cur : tests ) {
128128 stringWriter = new StringWriter ();
129- writer = new JsonWriter (stringWriter , new JsonWriterSettings ());
129+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ());
130130 writer .writeStartDocument ();
131131 writer .writeDouble ("d" , cur .value );
132132 writer .writeEndDocument ();
@@ -151,7 +151,7 @@ public void testInt64Shell() {
151151 "NumberLong(\" 9223372036854775807\" )" ));
152152 for (final TestData <Long > cur : tests ) {
153153 stringWriter = new StringWriter ();
154- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
154+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
155155 writer .writeStartDocument ();
156156 writer .writeInt64 ("l" , cur .value );
157157 writer .writeEndDocument ();
@@ -171,7 +171,7 @@ public void testInt64Strict() {
171171
172172 for (final TestData <Long > cur : tests ) {
173173 stringWriter = new StringWriter ();
174- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Strict ));
174+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Strict ));
175175 writer .writeStartDocument ();
176176 writer .writeInt64 ("l" , cur .value );
177177 writer .writeEndDocument ();
@@ -195,7 +195,7 @@ public void testEmbeddedDocument() {
195195
196196 @ Test
197197 public void testIndentedEmbeddedDocument () {
198- writer = new JsonWriter (stringWriter , new JsonWriterSettings (true ));
198+ writer = new JSONWriter (stringWriter , new JSONWriterSettings (true ));
199199 writer .writeStartDocument ();
200200 writer .writeStartDocument ("doc" );
201201 writer .writeInt32 ("a" , 1 );
@@ -238,7 +238,7 @@ public void testBinaryStrict() {
238238 + "\" $type\" : \" a\" }" ));
239239 for (final TestData <Binary > cur : tests ) {
240240 stringWriter = new StringWriter ();
241- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Strict ));
241+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Strict ));
242242 writer .writeStartDocument ();
243243 writer .writeBinaryData ("binary" , cur .value );
244244 writer .writeEndDocument ();
@@ -261,7 +261,7 @@ public void testBinaryShell() {
261261 "new BinData(a, \" AQID\" )" ));
262262 for (final TestData <Binary > cur : tests ) {
263263 stringWriter = new StringWriter ();
264- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
264+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
265265 writer .writeStartDocument ();
266266 writer .writeBinaryData ("binary" , cur .value );
267267 writer .writeEndDocument ();
@@ -279,7 +279,7 @@ public void testDateTimeStrict() {
279279 "{ \" $date\" : -9223372036854775808 }" ));
280280 for (final TestData <Date > cur : tests ) {
281281 stringWriter = new StringWriter ();
282- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Strict ));
282+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Strict ));
283283 writer .writeStartDocument ();
284284 writer .writeDateTime ("date" , cur .value .getTime ());
285285 writer .writeEndDocument ();
@@ -302,7 +302,7 @@ public void testDateTimeShell() {
302302 "new Date(-9223372036854775808)" ));
303303 for (final TestData <Date > cur : tests ) {
304304 stringWriter = new StringWriter ();
305- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
305+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
306306 writer .writeStartDocument ();
307307 writer .writeDateTime ("date" , cur .value .getTime ());
308308 writer .writeEndDocument ();
@@ -321,7 +321,7 @@ public void testDateTimeTenGen() {
321321 "new Date(-9223372036854775808)" ));
322322 for (final TestData <Date > cur : tests ) {
323323 stringWriter = new StringWriter ();
324- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .TenGen ));
324+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .TenGen ));
325325 writer .writeStartDocument ();
326326 writer .writeDateTime ("date" , cur .value .getTime ());
327327 writer .writeEndDocument ();
@@ -381,7 +381,7 @@ public void testNull() {
381381
382382 @ Test
383383 public void testObjectIdShell () {
384- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
384+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
385385 final ObjectId objectId = new ObjectId ("4d0ce088e447ad08b4721a37" );
386386
387387 writer .writeStartDocument ();
@@ -418,7 +418,7 @@ public void testRegularExpressionShell() {
418418 new TestData <RegularExpression >(new RegularExpression ("a" , "imxs" ), "/a/imxs" ));
419419 for (final TestData <RegularExpression > cur : tests ) {
420420 stringWriter = new StringWriter ();
421- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
421+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
422422 writer .writeStartDocument ();
423423 writer .writeRegularExpression ("regex" , cur .value );
424424 writer .writeEndDocument ();
@@ -460,7 +460,7 @@ public void testRegularExpressionStrict() {
460460 "{ \" $regex\" : \" a\" ," + " \" $options\" : \" imxs\" }" ));
461461 for (final TestData <RegularExpression > cur : tests ) {
462462 stringWriter = new StringWriter ();
463- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Strict ));
463+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Strict ));
464464 writer .writeStartDocument ();
465465 writer .writeRegularExpression ("regex" , cur .value );
466466 writer .writeEndDocument ();
@@ -485,7 +485,7 @@ public void testString() {
485485 new TestData <String >("\u0080 \u0081 \u0082 " , "\" \\ u0080\\ u0081\\ u0082\" " ));
486486 for (final TestData <String > cur : tests ) {
487487 stringWriter = new StringWriter ();
488- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Strict ));
488+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Strict ));
489489 writer .writeStartDocument ();
490490 writer .writeString ("str" , cur .value );
491491 writer .writeEndDocument ();
@@ -515,7 +515,7 @@ public void testTimestampStrict() {
515515
516516 @ Test
517517 public void testTimestampShell () {
518- writer = new JsonWriter (stringWriter , new JsonWriterSettings ( JsonOutputMode .Shell ));
518+ writer = new JSONWriter (stringWriter , new JSONWriterSettings ( JSONOutputMode .Shell ));
519519 writer .writeStartDocument ();
520520 writer .writeTimestamp ("timestamp" , new BSONTimestamp (1000 , 1 ));
521521 writer .writeEndDocument ();
0 commit comments