aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs')
-rw-r--r--csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
index 37739d2f..0640a445 100644
--- a/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
@@ -72,17 +72,19 @@ namespace Google.ProtocolBuffers
.AddAddresses(
TestInteropPerson.Types.Addresses.CreateBuilder().SetAddress("123 Seseme").SetCity("Wonderland").
SetState("NA").SetZip(12345).Build())
- .SetExtension(UnitTestExtrasFullProtoFile.EmployeeId,
+ .SetExtension(UnittestExtrasFull.EmployeeId,
TestInteropEmployeeId.CreateBuilder().SetNumber("123").Build())
.Build();
Assert.IsTrue(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
- UnitTestExtrasLiteProtoFile.RegisterAllExtensions(registry);
+ UnittestExtrasLite.RegisterAllExtensions(registry);
+ byte[] fullBytes = person.ToByteArray();
- TestInteropPersonLite copy = TestInteropPersonLite.ParseFrom(person.ToByteArray(), registry);
+ TestInteropPersonLite copy = TestInteropPersonLite.ParseFrom(fullBytes, registry);
+ byte[] liteBytes = copy.ToByteArray();
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ TestUtil.AssertBytesEqual(fullBytes, liteBytes);
}
[TestMethod]
@@ -112,13 +114,13 @@ namespace Google.ProtocolBuffers
.AddAddresses(
TestInteropPersonLite.Types.Addresses.CreateBuilder().SetAddress("123 Seseme").SetCity("Wonderland")
.SetState("NA").SetZip(12345).Build())
- .SetExtension(UnitTestExtrasLiteProtoFile.EmployeeIdLite,
+ .SetExtension(UnittestExtrasLite.EmployeeIdLite,
TestInteropEmployeeIdLite.CreateBuilder().SetNumber("123").Build())
.Build();
Assert.IsTrue(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
- UnitTestExtrasFullProtoFile.RegisterAllExtensions(registry);
+ UnittestExtrasFull.RegisterAllExtensions(registry);
TestInteropPerson copy = TestInteropPerson.ParseFrom(person.ToByteArray(), registry);
@@ -151,13 +153,13 @@ namespace Google.ProtocolBuffers
.AddAddresses(
TestInteropPersonLite.Types.Addresses.CreateBuilder().SetAddress("123 Seseme").SetCity("Wonderland")
.SetState("NA").SetZip(12345).Build())
- .SetExtension(UnitTestExtrasLiteProtoFile.EmployeeIdLite,
+ .SetExtension(UnittestExtrasLite.EmployeeIdLite,
TestInteropEmployeeIdLite.CreateBuilder().SetNumber("123").Build())
.Build();
Assert.IsTrue(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
- UnitTestExtrasFullProtoFile.RegisterAllExtensions(registry);
+ UnittestExtrasFull.RegisterAllExtensions(registry);
TestInteropPerson copy = TestInteropPerson.ParseFrom(person.ToByteArray(), registry);