public abstract class

BaseTest

extends TestCase
java.lang.Object
   ↳ TestCase
     ↳ com.fasterxml.jackson.test.BaseTest
Known Direct Subclasses

Summary

Nested Classes
class BaseTest.FiveMinuteUser Sample class from Jackson tutorial ("JacksonInFiveMinutes")  
Constants
String FIELD_BASENAME
String SAMPLE_DOC_JSON_SPEC
int SAMPLE_SPEC_VALUE_HEIGHT
String SAMPLE_SPEC_VALUE_TITLE
int SAMPLE_SPEC_VALUE_TN_HEIGHT
int SAMPLE_SPEC_VALUE_TN_ID1
int SAMPLE_SPEC_VALUE_TN_ID2
int SAMPLE_SPEC_VALUE_TN_ID3
int SAMPLE_SPEC_VALUE_TN_ID4
String SAMPLE_SPEC_VALUE_TN_URL
String SAMPLE_SPEC_VALUE_TN_WIDTH
int SAMPLE_SPEC_VALUE_WIDTH
Public Constructors
BaseTest()
Public Methods
String quote(String str)
Protected Methods
void assertToken(JsonToken expToken, JsonParser jp)
void assertToken(JsonToken expToken, JsonToken actToken)
void assertType(Object ob, Class<?> expType)
JsonParser createParserUsingReader(String input)
JsonParser createParserUsingReader(JsonFactory f, String input)
JsonParser createParserUsingStream(JsonFactory f, String input, String encoding)
JsonParser createParserUsingStream(String input, String encoding)
byte[] encodeInUTF32BE(String input)
String fieldNameFor(int index)
void fieldNameFor(StringBuilder sb, int index)
String getAndVerifyText(JsonParser jp)
Method that gets textual contents of the current token using available methods, and ensures results are consistent, before returning them
void verifyException(Throwable e, String... matches)
void verifyFieldName(JsonParser jp, String expName)
void verifyIntValue(JsonParser jp, long expValue)
void verifyJsonSpecSampleDoc(JsonParser jp, boolean verifyContents)
void verifyJsonSpecSampleDoc(JsonParser jp, boolean verifyContents, boolean requireNumbers)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

protected static final String FIELD_BASENAME

Constant Value: "f"

protected static final String SAMPLE_DOC_JSON_SPEC

Constant Value: "{ "Image" : { "Width" : 800, "Height" : 600,"Title" : "View from 15th Floor", "Thumbnail" : { "Url" : "http://www.example.com/image/481989943", "Height" : 125, "Width" : "100" }, "IDs" : [116,943,234,38793] }}"

protected static final int SAMPLE_SPEC_VALUE_HEIGHT

Constant Value: 600 (0x00000258)

protected static final String SAMPLE_SPEC_VALUE_TITLE

Constant Value: "View from 15th Floor"

protected static final int SAMPLE_SPEC_VALUE_TN_HEIGHT

Constant Value: 125 (0x0000007d)

protected static final int SAMPLE_SPEC_VALUE_TN_ID1

Constant Value: 116 (0x00000074)

protected static final int SAMPLE_SPEC_VALUE_TN_ID2

Constant Value: 943 (0x000003af)

protected static final int SAMPLE_SPEC_VALUE_TN_ID3

Constant Value: 234 (0x000000ea)

protected static final int SAMPLE_SPEC_VALUE_TN_ID4

Constant Value: 38793 (0x00009789)

protected static final String SAMPLE_SPEC_VALUE_TN_URL

Constant Value: "http://www.example.com/image/481989943"

protected static final String SAMPLE_SPEC_VALUE_TN_WIDTH

Constant Value: "100"

protected static final int SAMPLE_SPEC_VALUE_WIDTH

Constant Value: 800 (0x00000320)

Public Constructors

public BaseTest ()

Public Methods

public String quote (String str)

Protected Methods

protected void assertToken (JsonToken expToken, JsonParser jp)

protected void assertToken (JsonToken expToken, JsonToken actToken)

protected void assertType (Object ob, Class<?> expType)

protected JsonParser createParserUsingReader (String input)

protected JsonParser createParserUsingReader (JsonFactory f, String input)

protected JsonParser createParserUsingStream (JsonFactory f, String input, String encoding)

protected JsonParser createParserUsingStream (String input, String encoding)

protected byte[] encodeInUTF32BE (String input)

protected String fieldNameFor (int index)

protected void fieldNameFor (StringBuilder sb, int index)

protected String getAndVerifyText (JsonParser jp)

Method that gets textual contents of the current token using available methods, and ensures results are consistent, before returning them

protected void verifyException (Throwable e, String... matches)

protected void verifyFieldName (JsonParser jp, String expName)

Throws
IOException

protected void verifyIntValue (JsonParser jp, long expValue)

Throws
IOException

protected void verifyJsonSpecSampleDoc (JsonParser jp, boolean verifyContents)

Throws
IOException

protected void verifyJsonSpecSampleDoc (JsonParser jp, boolean verifyContents, boolean requireNumbers)

Throws
IOException