示例#1
0
文件: Tests.cs 项目: xgray/dotnet
        public void TestComplexBytes()
        {
            Complex complex1 = Complex.Create();

            byte[] buf1 = ThriftSerializer <Complex> .ToBytes(complex1);

            Complex complex2 = ThriftSerializer <Complex> .FromBytes(buf1);

            byte[] buf2 = ThriftSerializer <Complex> .ToBytes(complex2);

            Assert.Equal(buf1, buf2);
        }
示例#2
0
文件: Tests.cs 项目: xgray/dotnet
        public void TestSimpleBytes()
        {
            Simple simple1 = Simple.Create();

            byte[] buf1 = ThriftSerializer <Simple> .ToBytes(simple1);

            Simple simple2 = ThriftSerializer <Simple> .FromBytes(buf1);

            byte[] buf2 = ThriftSerializer <Simple> .ToBytes(simple2);

            Assert.Equal(buf1, buf2);
        }