aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs')
-rw-r--r--csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs57
1 files changed, 0 insertions, 57 deletions
diff --git a/csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs
deleted file mode 100644
index 992ec7e3..00000000
--- a/csharp/src/ProtocolBuffersLite.Test/SerializableLiteTest.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-#if !NOSERIALIZABLE
-using System.Collections.Generic;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
-using System.Text;
-using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Google.ProtocolBuffers
-{
- [TestClass]
- public class SerializableLiteTest
- {
- /// <summary>
- /// Just keep it from even compiling if we these objects don't implement the expected interface.
- /// </summary>
- public static readonly ISerializable CompileTimeCheckSerializableMessage = TestRequiredLite.DefaultInstance;
- public static readonly ISerializable CompileTimeCheckSerializableBuilder = new TestRequiredLite.Builder();
-
- [TestMethod]
- [Ignore] // Serialization hasn't been reimplemented yet
- public void TestPlainMessage()
- {
- TestRequiredLite message = TestRequiredLite.CreateBuilder()
- .SetD(42)
- .BuildPartial();
-
- MemoryStream ms = new MemoryStream();
- new BinaryFormatter().Serialize(ms, message);
-
- ms.Position = 0;
- TestRequiredLite copy = (TestRequiredLite)new BinaryFormatter().Deserialize(ms);
-
- Assert.AreEqual(message, copy);
- }
-
- [TestMethod]
- [Ignore] // Serialization hasn't been reimplemented yet
- public void TestPlainBuilder()
- {
- TestRequiredLite.Builder builder = TestRequiredLite.CreateBuilder()
- .SetD(42)
- ;
-
- MemoryStream ms = new MemoryStream();
- new BinaryFormatter().Serialize(ms, builder);
-
- ms.Position = 0;
- TestRequiredLite.Builder copy = (TestRequiredLite.Builder)new BinaryFormatter().Deserialize(ms);
-
- Assert.AreEqual(builder.BuildPartial(), copy.BuildPartial());
- }
- }
-}
-#endif \ No newline at end of file