diff options
author | Jie Luo <anandolee@gmail.com> | 2015-04-28 16:26:19 -0700 |
---|---|---|
committer | Jie Luo <anandolee@gmail.com> | 2015-04-28 16:26:19 -0700 |
commit | 8bae6c09bc8c8be808f0acc9b2ad4c9811493060 (patch) | |
tree | 9819ef25dbe807e4e7f0d6c7dbff7f553b1a8723 /csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs | |
parent | 8a3ec53e862cffd310caf434c2c0898782c952f7 (diff) | |
parent | 32ead755d1f97e414f4a50edb7d9f1ebd9cab562 (diff) | |
download | protobuf-8bae6c09bc8c8be808f0acc9b2ad4c9811493060.tar.gz protobuf-8bae6c09bc8c8be808f0acc9b2ad4c9811493060.tar.bz2 protobuf-8bae6c09bc8c8be808f0acc9b2ad4c9811493060.zip |
Merge pull request #1 from google/csharp
Csharp update
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs b/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs index a3543afa..b4472a60 100644 --- a/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs +++ b/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs @@ -88,7 +88,7 @@ namespace Google.ProtocolBuffers Content = sw.ToString();
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
- UnitTestXmlSerializerTestProtoFile.RegisterAllExtensions(registry);
+ UnittestExtrasXmltest.RegisterAllExtensions(registry);
IMessageLite copy =
JsonFormatReader.CreateInstance(Content)
@@ -258,7 +258,7 @@ namespace Google.ProtocolBuffers FormatterAssert(
TestXmlMessage.CreateBuilder()
.SetValid(false)
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText, " extension text value ! ")
+ .SetExtension(UnittestExtrasXmltest.ExtensionText, " extension text value ! ")
.Build(),
@"{""valid"":false,""extension_text"":"" extension text value ! ""}"
);
@@ -269,7 +269,7 @@ namespace Google.ProtocolBuffers {
FormatterAssert(
TestXmlMessage.CreateBuilder()
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage,
+ .SetExtension(UnittestExtrasXmltest.ExtensionMessage,
new TestXmlExtension.Builder().SetNumber(42).Build())
.Build(),
@"{""number"":42}"
@@ -281,9 +281,9 @@ namespace Google.ProtocolBuffers {
FormatterAssert(
TestXmlMessage.CreateBuilder()
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 100)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 101)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 102)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 100)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 101)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 102)
.Build(),
@"{""extension_number"":[100,101,102]}"
);
@@ -294,7 +294,7 @@ namespace Google.ProtocolBuffers {
FormatterAssert(
TestXmlMessage.CreateBuilder()
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum, EnumOptions.ONE)
+ .SetExtension(UnittestExtrasXmltest.ExtensionEnum, EnumOptions.ONE)
.Build(),
@"{""extension_enum"":""ONE""}"
);
@@ -307,12 +307,12 @@ namespace Google.ProtocolBuffers TestXmlMessage.CreateBuilder()
.SetValid(true)
.SetText("text")
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText, "extension text")
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 100)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 101)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 102)
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum, EnumOptions.ONE)
+ .SetExtension(UnittestExtrasXmltest.ExtensionText, "extension text")
+ .SetExtension(UnittestExtrasXmltest.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 100)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 101)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 102)
+ .SetExtension(UnittestExtrasXmltest.ExtensionEnum, EnumOptions.ONE)
.Build(),
@"""text"":""text""",
@"""valid"":true",
@@ -329,19 +329,19 @@ namespace Google.ProtocolBuffers TestXmlMessage original = TestXmlMessage.CreateBuilder()
.SetValid(true)
.SetText("text")
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText, " extension text value ! ")
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 100)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 101)
- .AddExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber, 102)
- .SetExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum, EnumOptions.ONE)
+ .SetExtension(UnittestExtrasXmltest.ExtensionText, " extension text value ! ")
+ .SetExtension(UnittestExtrasXmltest.ExtensionMessage, new TestXmlExtension.Builder().SetNumber(42).Build())
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 100)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 101)
+ .AddExtension(UnittestExtrasXmltest.ExtensionNumber, 102)
+ .SetExtension(UnittestExtrasXmltest.ExtensionEnum, EnumOptions.ONE)
.Build();
TestXmlMessage message = original.ToBuilder()
- .ClearExtension(UnitTestXmlSerializerTestProtoFile.ExtensionText)
- .ClearExtension(UnitTestXmlSerializerTestProtoFile.ExtensionMessage)
- .ClearExtension(UnitTestXmlSerializerTestProtoFile.ExtensionNumber)
- .ClearExtension(UnitTestXmlSerializerTestProtoFile.ExtensionEnum)
+ .ClearExtension(UnittestExtrasXmltest.ExtensionText)
+ .ClearExtension(UnittestExtrasXmltest.ExtensionMessage)
+ .ClearExtension(UnittestExtrasXmltest.ExtensionNumber)
+ .ClearExtension(UnittestExtrasXmltest.ExtensionEnum)
.Build();
JsonFormatWriter writer = JsonFormatWriter.CreateInstance();
|