public void ExtensionReflectionSetters() { TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder(); extensionsReflectionTester.SetAllFieldsViaReflection(builder); TestAllExtensions message = builder.Build(); TestUtil.AssertAllExtensionsSet(message); }
public void ReflectionSetters() { TestAllTypes.Builder builder = TestAllTypes.CreateBuilder(); reflectionTester.SetAllFieldsViaReflection(builder); TestAllTypes message = builder.Build(); TestUtil.AssertAllFieldsSet(message); }
public void DynamicMessageAccessors() { IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor); reflectionTester.SetAllFieldsViaReflection(builder); IMessage message = builder.WeakBuild(); reflectionTester.AssertAllFieldsSetViaReflection(message); }
public void DynamicMessageExtensionAccessors() { // We don't need to extensively test DynamicMessage's handling of // extensions because, frankly, it doesn't do anything special with them. // It treats them just like any other fields. IBuilder builder = DynamicMessage.CreateBuilder(TestAllExtensions.Descriptor); extensionsReflectionTester.SetAllFieldsViaReflection(builder); IMessage message = builder.WeakBuild(); extensionsReflectionTester.AssertAllFieldsSetViaReflection(message); }