aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs
blob: 2d74cf9f92d91a9c052434ad43b1cbbc39fd9129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.IO;
using Xunit;

namespace Google.ProtocolBuffers.Compatibility
{
    public class TextCompatibilityTests : CompatibilityTests
    {
        protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
        {
            StringWriter text = new StringWriter();
            message.PrintTo(text);
            return text.ToString();
        }

        protected override TBuilder DeserializeMessage<TMessage, TBuilder>(object message, TBuilder builder, ExtensionRegistry registry)
        {
            TextFormat.Merge(new StringReader((string)message), registry, (IBuilder)builder);
            return builder;
        }
        //This test can take a very long time to run.
        [Fact]
        public override void RoundTripMessage2OptimizeSize()
        {
            //base.RoundTripMessage2OptimizeSize();
        }

        //This test can take a very long time to run.
        [Fact]
        public override void RoundTripMessage2OptimizeSpeed()
        {
            //base.RoundTripMessage2OptimizeSpeed();
        }
    }
}