Package com.google.api.client.test.json
Class AbstractJsonFactoryTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.google.api.client.test.json.AbstractJsonFactoryTest
-
- All Implemented Interfaces:
junit.framework.Test
public abstract class AbstractJsonFactoryTest extends junit.framework.TestCase
Abstract test case for testing aJsonFactory
.- Author:
- Yaniv Inbar
-
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static String
ANIMAL_WITHOUT_TYPE
static String
BOOLEAN_TYPE_EMPTY
static String
BOOLEAN_TYPE_EMPTY_OUTPUT
static String
BOOLEAN_TYPE_FALSE
static String
BOOLEAN_TYPE_NULL
static String
BOOLEAN_TYPE_NULL_OUTPUT
static String
BOOLEAN_TYPE_TRUE
static String
BOOLEAN_TYPE_WRONG
static String
CENTIPEDE
static String
CENTIPEDE_EXTRA_INFO
static String
CENTIPEDE_OPTIMIZED
static String
DOG
static String
DOG_EXTRA_INFO
static String
DOG_EXTRA_INFO_ORDERED
static String
DOG_OPTIMIZED
static String
DOG_WITH_FAMILY
static String
DOG_WITH_NO_FAMILY
static String
DOG_WITH_NO_FAMILY_PARSED
static String
HUMAN
static String
HUMAN_WITH_PETS
static String
HUMAN_WITH_PETS_PARSED
static String
MULTIPLE_ANNOTATIONS_JSON
static String
POLYMORPHIC_NUMERIC_TYPE_1
static String
POLYMORPHIC_NUMERIC_TYPE_2
static String
POLYMORPHIC_NUMERIC_UNSPECIFIED_TYPE
static String
POLYMORPHIC_SELF_REFERENCING
static String
POLYMORPHIC_WITH_UNKNOWN_KEY
-
Constructor Summary
Constructors Constructor Description AbstractJsonFactoryTest(String name)
-
Method Summary
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
-
-
-
-
Field Detail
-
BOOLEAN_TYPE_EMPTY
public static final String BOOLEAN_TYPE_EMPTY
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_EMPTY_OUTPUT
public static final String BOOLEAN_TYPE_EMPTY_OUTPUT
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_TRUE
public static final String BOOLEAN_TYPE_TRUE
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_FALSE
public static final String BOOLEAN_TYPE_FALSE
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_NULL
public static final String BOOLEAN_TYPE_NULL
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_NULL_OUTPUT
public static final String BOOLEAN_TYPE_NULL_OUTPUT
- See Also:
- Constant Field Values
-
BOOLEAN_TYPE_WRONG
public static final String BOOLEAN_TYPE_WRONG
- See Also:
- Constant Field Values
-
DOG
public static final String DOG
- See Also:
- Constant Field Values
-
CENTIPEDE
public static final String CENTIPEDE
- See Also:
- Constant Field Values
-
DOG_OPTIMIZED
public static final String DOG_OPTIMIZED
- See Also:
- Constant Field Values
-
CENTIPEDE_OPTIMIZED
public static final String CENTIPEDE_OPTIMIZED
- See Also:
- Constant Field Values
-
DOG_EXTRA_INFO
public static final String DOG_EXTRA_INFO
- See Also:
- Constant Field Values
-
CENTIPEDE_EXTRA_INFO
public static final String CENTIPEDE_EXTRA_INFO
- See Also:
- Constant Field Values
-
ANIMAL_WITHOUT_TYPE
public static final String ANIMAL_WITHOUT_TYPE
- See Also:
- Constant Field Values
-
HUMAN
public static final String HUMAN
- See Also:
- Constant Field Values
-
DOG_EXTRA_INFO_ORDERED
public static final String DOG_EXTRA_INFO_ORDERED
- See Also:
- Constant Field Values
-
DOG_WITH_FAMILY
public static final String DOG_WITH_FAMILY
- See Also:
- Constant Field Values
-
DOG_WITH_NO_FAMILY
public static final String DOG_WITH_NO_FAMILY
- See Also:
- Constant Field Values
-
DOG_WITH_NO_FAMILY_PARSED
public static final String DOG_WITH_NO_FAMILY_PARSED
- See Also:
- Constant Field Values
-
MULTIPLE_ANNOTATIONS_JSON
public static final String MULTIPLE_ANNOTATIONS_JSON
- See Also:
- Constant Field Values
-
POLYMORPHIC_NUMERIC_TYPE_1
public static final String POLYMORPHIC_NUMERIC_TYPE_1
- See Also:
- Constant Field Values
-
POLYMORPHIC_NUMERIC_TYPE_2
public static final String POLYMORPHIC_NUMERIC_TYPE_2
- See Also:
- Constant Field Values
-
POLYMORPHIC_NUMERIC_UNSPECIFIED_TYPE
public static final String POLYMORPHIC_NUMERIC_UNSPECIFIED_TYPE
- See Also:
- Constant Field Values
-
POLYMORPHIC_WITH_UNKNOWN_KEY
public static final String POLYMORPHIC_WITH_UNKNOWN_KEY
- See Also:
- Constant Field Values
-
POLYMORPHIC_SELF_REFERENCING
public static final String POLYMORPHIC_SELF_REFERENCING
- See Also:
- Constant Field Values
-
HUMAN_WITH_PETS
public static final String HUMAN_WITH_PETS
- See Also:
- Constant Field Values
-
HUMAN_WITH_PETS_PARSED
public static final String HUMAN_WITH_PETS_PARSED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractJsonFactoryTest
public AbstractJsonFactoryTest(String name)
-
-
Method Detail
-
newFactory
protected abstract JsonFactory newFactory()
-
testParse_emptyGenericJson
public void testParse_emptyGenericJson() throws Exception
- Throws:
Exception
-
testSkipToKey_missingEmpty
public void testSkipToKey_missingEmpty() throws Exception
- Throws:
Exception
-
testSkipToKey_startWithFieldName
public void testSkipToKey_startWithFieldName() throws Exception
- Throws:
Exception
-
testParser_collectionType
public void testParser_collectionType() throws Exception
- Throws:
Exception
-
testParser_hashmapForMapType
public void testParser_hashmapForMapType() throws Exception
- Throws:
Exception
-
testParser_integerTypeVariableType
public void testParser_integerTypeVariableType() throws Exception
- Throws:
Exception
-
testParser_intArrayTypeVariableType
public void testParser_intArrayTypeVariableType() throws Exception
- Throws:
Exception
-
testParser_doubleListTypeVariableType
public void testParser_doubleListTypeVariableType() throws Exception
- Throws:
Exception
-
testParser_floatMapTypeVariableType
public void testParser_floatMapTypeVariableType() throws Exception
- Throws:
Exception
-
testParser_treemapForTypeVariableType
public void testParser_treemapForTypeVariableType() throws Exception
- Throws:
Exception
-
testParser_typeVariablesPassAround
public void testParser_typeVariablesPassAround() throws Exception
- Throws:
Exception
-
testParser_partialEmptyArray
public void testParser_partialEmptyArray() throws Exception
- Throws:
Exception
-
testToPrettyString_entryApproximate
public final void testToPrettyString_entryApproximate() throws Exception
- Throws:
Exception
-
testToPrettyString_FeedApproximate
public final void testToPrettyString_FeedApproximate() throws Exception
- Throws:
Exception
-
testParser_nullInputStream
public void testParser_nullInputStream() throws Exception
- Throws:
Exception
-
testObjectParserParse_entry
public void testObjectParserParse_entry() throws Exception
- Throws:
Exception
-
testObjectParserParse_stringList
public void testObjectParserParse_stringList() throws Exception
- Throws:
Exception
-
testToString_withFactory
public void testToString_withFactory()
-
testFactory
public void testFactory()
-
testSkipToKey_multipleKeys
public void testSkipToKey_multipleKeys() throws Exception
- Throws:
Exception
-
testCreateJsonParser_nullCharset
public final void testCreateJsonParser_nullCharset() throws Exception
- Throws:
Exception
-
testGenerate_infinityOrNanError
public final void testGenerate_infinityOrNanError() throws Exception
- Throws:
Exception
-
testParser_extendsGenericJson
public void testParser_extendsGenericJson() throws Exception
- Throws:
Exception
-
testJsonObjectParser_reader
public void testJsonObjectParser_reader() throws Exception
- Throws:
Exception
-
testJsonObjectParser_inputStream
public void testJsonObjectParser_inputStream() throws Exception
- Throws:
Exception
-
testJsonObjectParser_readerWrapped
public void testJsonObjectParser_readerWrapped() throws Exception
- Throws:
Exception
-
testJsonObjectParser_inputStreamWrapped
public void testJsonObjectParser_inputStreamWrapped() throws Exception
- Throws:
Exception
-
testJsonHttpContent_simple
public void testJsonHttpContent_simple() throws Exception
- Throws:
Exception
-
testJsonHttpContent_wrapped
public void testJsonHttpContent_wrapped() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchemata
public void testParser_heterogeneousSchemata() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_missingType
public void testParser_heterogeneousSchema_missingType() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_withObject
public void testParser_heterogeneousSchema_withObject() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_genericJson
public void testParser_heterogeneousSchema_genericJson() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_withArrays
public void testParser_heterogeneousSchema_withArrays() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_withNullArrays
public void testParser_heterogeneousSchema_withNullArrays() throws Exception
- Throws:
Exception
-
testParser_polymorphicClass_tooManyAnnotations
public void testParser_polymorphicClass_tooManyAnnotations() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_numericType
public void testParser_heterogeneousSchema_numericType() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_numericValueType
public void testParser_heterogeneousSchema_numericValueType() throws Exception
- Throws:
Exception
-
testParser_heterogeneousSchema_illegalValueType
public void testParser_heterogeneousSchema_illegalValueType() throws Exception
- Throws:
Exception
-
testParser_polymorphicClass_duplicateTypeKeys
public void testParser_polymorphicClass_duplicateTypeKeys() throws Exception
- Throws:
Exception
-
testParser_polymorphicClass_noMatchingTypeKey
public void testParser_polymorphicClass_noMatchingTypeKey() throws Exception
- Throws:
Exception
-
testParser_polymorphicClass_selfReferencing
public void testParser_polymorphicClass_selfReferencing() throws Exception
- Throws:
Exception
-
-