public class JsonSerializationVisitorTest extends Object
JsonSerializationVisitor
. Most of the logic in the
JsonSerializationVisitor
class is testing via the toString() tests
for each Element type. This test suite handles the error cases and corner
cases only.Modifier and Type | Class and Description |
---|---|
static class |
JsonSerializationVisitorTest.ThrowingWriter
ThrowingWriter provides a writer that throws an exception on all writes.
|
Constructor and Description |
---|
JsonSerializationVisitorTest() |
public void testVisitArrayOnIOException()
JsonSerializationVisitor.visitArray(String, java.util.List)
.public void testVisitBinaryOnIOException()
JsonSerializationVisitor.visitBinary(String, byte, byte[])
.public void testVisitBooleanOnIOException()
JsonSerializationVisitor.visitBoolean(String, boolean)
.public void testVisitDBPointerOnIOException()
public void testVisitDocumentOnIOException()
JsonSerializationVisitor.visitDocument(String, java.util.List)
.public void testVisitDoubleOnIOException()
JsonSerializationVisitor.visitDouble(String, double)
.public void testVisitIntegerOnIOException()
JsonSerializationVisitor.visitInteger(String, int)
.public void testVisitJavaScriptStringStringDocumentOnIOException()
JsonSerializationVisitor.visitJavaScript(String, String, Document)
.public void testVisitJavaScriptStringStringOnIOException()
JsonSerializationVisitor.visitJavaScript(String, String)
.public void testVisitLongOnIOException()
JsonSerializationVisitor.visitLong(String, long)
.public void testVisitMaxKeyOnIOException()
JsonSerializationVisitor.visitMaxKey(String)
.public void testVisitMinKeyOnIOException()
JsonSerializationVisitor.visitMinKey(String)
.public void testVisitMongoTimestampOnIOException()
JsonSerializationVisitor.visitMongoTimestamp(String, long)
.public void testVisitNullOnIOException()
JsonSerializationVisitor.visitNull(String)
.public void testVisitObjectIdOnIOException()
JsonSerializationVisitor.visitObjectId(String, ObjectId)
.public void testVisitOnIOException()
JsonSerializationVisitor.visit(java.util.List)
.public void testVisitRegularExpressionOnIOException()
JsonSerializationVisitor.visitRegularExpression(String, String, String)
.public void testVisitStringOnIOException()
JsonSerializationVisitor.visitString(String, String)
.public void testVisitSymbolOnIOException()
JsonSerializationVisitor.visitSymbol(String, String)
.public void testVisitSymbolWithNonSymbol()
JsonSerializationVisitor.visitSymbol(String, String)
.public void testVisitTimestampOnIOException()
JsonSerializationVisitor.visitTimestamp(String, long)
.public void testWriteQuotedStringWithSingleQuote()
JsonSerializationVisitor.writeQuotedString(String)
.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.