Esempio n. 1
0
        public void ExtensionReflectionRepeatedSetters()
        {
            TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
            extensionsReflectionTester.SetAllFieldsViaReflection(builder);
            extensionsReflectionTester.ModifyRepeatedFieldsViaReflection(builder);
            TestAllExtensions message = builder.Build();

            TestUtil.AssertRepeatedExtensionsModified(message);
        }
Esempio n. 2
0
        public void DynamicMessageRepeatedSetters()
        {
            IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);

            reflectionTester.SetAllFieldsViaReflection(builder);
            reflectionTester.ModifyRepeatedFieldsViaReflection(builder);
            IMessage message = builder.WeakBuild();

            reflectionTester.AssertRepeatedFieldsModifiedViaReflection(message);
        }