public void DynamicMessageAccessors() { IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor); reflectionTester.SetAllFieldsViaReflection(builder); IMessage message = builder.WeakBuild(); reflectionTester.AssertAllFieldsSetViaReflection(message); }
public void ExtensionReflectionGetters() { TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder(); TestUtil.SetAllExtensions(builder); TestAllExtensions message = builder.Build(); extensionsReflectionTester.AssertAllFieldsSetViaReflection(message); }
public void ReflectionGetters() { TestAllTypes.Builder builder = TestAllTypes.CreateBuilder(); TestUtil.SetAllFields(builder); TestAllTypes message = builder.Build(); 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); }