Method | Description | |
---|---|---|
AssertAllFieldsSetViaReflection ( IMessage message ) : void |
Asserts that all fields of the specified message are set to the values assigned by SetAllFields, using the IMessage reflection interface.
|
|
AssertClearViaReflection ( IMessage message ) : void |
Assert that all fields of the message are cleared, and that getting the fields returns their default values, using the reflection interface.
|
|
AssertPackedFieldsSetViaReflection ( IMessage message ) : void | ||
AssertReflectionRepeatedSettersRejectNull ( IBuilder builder ) : void |
Verifies that the reflection repeated setters for the given Builder object throw an ArgumentNullException if they are passed a null value.
|
|
AssertReflectionSettersRejectNull ( IBuilder builder ) : void |
Verifies that the reflection setters for the given Builder object throw an ArgumentNullException if they are passed a null value.
|
|
CreateTestAllExtensionsInstance ( ) : ReflectionTester |
Creates an instance for the TestAllExtensions message, with an extension registry from TestUtil.CreateExtensionRegistry.
|
|
CreateTestAllTypesInstance ( ) : ReflectionTester |
Creates an instance for the TestAllTypes message, with no extension registry.
|
|
CreateTestPackedTypesInstance ( ) : ReflectionTester |
Creates an instance for the TestPackedTypes message, with no extensions.
|
|
SetPackedFieldsViaReflection ( IBuilder message ) : void |
Method | Description | |
---|---|---|
AssertRepeatedFieldsModifiedViaReflection ( IMessage message ) : void | ||
CreateBuilderForField ( IBuilder parent, FieldDescriptor field ) : IBuilder |
Calls parent.CreateBuilderForField() or uses the extension registry to find an appropriate builder, depending on what type is being tested.
|
|
ModifyRepeatedFieldsViaReflection ( IBuilder message ) : void |
Modify the repeated fields of the specified message to contain the values expected by AssertRepeatedFieldsModified, using the IBuilder reflection interface.
|
|
ReflectionTester ( MessageDescriptor baseDescriptor, ExtensionRegistry extensionRegistry ) : System |
Constructs an instance that will expect messages using the given descriptor. Normally baseDescriptor should be a descriptor for TestAllTypes. However, if extensionRegistry is non-null, then baseDescriptor should be for TestAllExtensions instead, and instead of reading and writing normal fields, the tester will read and write extensions. All of the TestAllExtensions extensions must be registered in the registry.
|
|
SetAllFieldsViaReflection ( IBuilder message ) : void |
Sets every field of the message to the values expected by AssertAllFieldsSet, using the reflection interface.
|
|
f ( String name ) : FieldDescriptor |
Shorthand to get a FieldDescriptor for a field of unittest::TestAllTypes.
|
public AssertAllFieldsSetViaReflection ( IMessage message ) : void | ||
message | IMessage | |
return | void |
public AssertClearViaReflection ( IMessage message ) : void | ||
message | IMessage | |
return | void |
public AssertPackedFieldsSetViaReflection ( IMessage message ) : void | ||
message | IMessage | |
return | void |
public AssertReflectionRepeatedSettersRejectNull ( IBuilder builder ) : void | ||
builder | IBuilder | |
return | void |
public AssertReflectionSettersRejectNull ( IBuilder builder ) : void | ||
builder | IBuilder | |
return | void |
public static CreateTestAllExtensionsInstance ( ) : ReflectionTester | ||
return | ReflectionTester |
public static CreateTestAllTypesInstance ( ) : ReflectionTester | ||
return | ReflectionTester |
public static CreateTestPackedTypesInstance ( ) : ReflectionTester | ||
return | ReflectionTester |
public SetPackedFieldsViaReflection ( IBuilder message ) : void | ||
message | IBuilder | |
return | void |