C# Class Google.Protobuf.JsonFormatterTest

Tests for the JSON formatter. Note that in these tests, double quotes are replaced with apostrophes for the sake of readability (embedding \" everywhere is painful). See the AssertJson method for details.
Mostrar archivo Open project: mirror/chromium

Private Methods

Method Description
AllSingleFields ( ) : void
AnyMessageType ( ) : void
AnyMessageType_CustomPrefix ( ) : void
AnyNested ( ) : void
AnyUnknownType ( ) : void
AnyWellKnownType ( ) : void
AssertJson ( string expectedJsonWithApostrophes, string actualJson ) : void

Checks that the actual JSON is the same as the expected JSON - but after replacing all apostrophes in the expected JSON with double quotes. This basically makes the tests easier to read.

DefaultValues_WhenIncluded ( ) : void
DefaultValues_WhenOmitted ( ) : void
DoubleRepresentations ( double value, string expectedValueText ) : void
DurationField ( ) : void
DurationStandalone ( long seconds, int nanoseconds, string expected ) : void
DurationStandalone_NonNormalized ( long seconds, int nanoseconds ) : void
FieldMaskField ( ) : void
FieldMaskInvalid ( string input ) : void
FieldMaskStandalone ( ) : void
InvalidSurrogatePairsFail ( ) : void
MapField_BoolBool ( ) : void
MapField_Int32Int32 ( ) : void
MapField_StringString ( ) : void
Oneof ( string fooStringValue, string expectedJson ) : void
OutputIsInNumericFieldOrder_NoDefaults ( ) : void
OutputIsInNumericFieldOrder_WithDefaults ( ) : void
RepeatedField ( ) : void
SimpleNonAscii ( string text, string encoded ) : void
SourceContextStandalone ( ) : void
StructSample ( ) : void
SurrogatePairEscaping ( ) : void
TimestampField ( ) : void
TimestampStandalone ( string expected, int nanos ) : void
TimestampStandalone_FromDateTime ( ) : void
TimestampStandalone_NonNormalized ( long seconds, int nanoseconds ) : void
ToCamelCase ( string original, string expected ) : void
UnknownEnumValueNumeric_MapField ( ) : void
UnknownEnumValueNumeric_RepeatedField ( ) : void
UnknownEnumValueNumeric_SingleField ( ) : void
UnknownEnumValue_RepeatedField_AllEntriesUnknown ( ) : void
WrapperFormatting_IncludeNull ( ) : void
WrapperFormatting_Message ( ) : void
WrapperFormatting_Single ( ) : void