aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs')
-rw-r--r--csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
deleted file mode 100644
index 91d40d83..00000000
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System.IO;
-using System.Xml;
-using Google.ProtocolBuffers.Serialization;
-using NUnit.Framework;
-
-namespace Google.ProtocolBuffers.Compatibility
-{
- [TestFixture]
- public class XmlCompatibilityTests : CompatibilityTests
- {
- protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
- {
- StringWriter text = new StringWriter();
- XmlFormatWriter writer = XmlFormatWriter.CreateInstance(text);
- writer.WriteMessage("root", message);
- return text.ToString();
- }
-
- protected override TBuilder DeserializeMessage<TMessage, TBuilder>(object message, TBuilder builder, ExtensionRegistry registry)
- {
- XmlFormatReader reader = XmlFormatReader.CreateInstance((string)message);
- return reader.Merge("root", builder, registry);
- }
- }
-
- [TestFixture]
- public class XmlCompatibilityFormattedTests : CompatibilityTests
- {
- protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
- {
- StringWriter text = new StringWriter();
- XmlWriter xwtr = XmlWriter.Create(text, new XmlWriterSettings { Indent = true, IndentChars = " " });
-
- XmlFormatWriter writer = XmlFormatWriter.CreateInstance(xwtr).SetOptions(XmlWriterOptions.OutputNestedArrays);
- writer.WriteMessage("root", message);
- return text.ToString();
- }
-
- protected override TBuilder DeserializeMessage<TMessage, TBuilder>(object message, TBuilder builder, ExtensionRegistry registry)
- {
- XmlFormatReader reader = XmlFormatReader.CreateInstance((string)message).SetOptions(XmlReaderOptions.ReadNestedArrays);
- return reader.Merge("root", builder, registry);
- }
- }
-} \ No newline at end of file