public override void SimpleTest() { trans.Clear(); simpleInput.Write(prot); PrintBuf(); trans.Seek(0, SeekOrigin.Begin); simpleOutput.Read(prot); WriteLine("{0}:{1},{2},{3},{4}", trans.Length, simpleOutput.Value, simpleOutput.ShortValue, simpleOutput.IntValue, simpleOutput.LongValue); }
public override void Setup() { simpleInput = new Simple(); simpleInput.Value = simpleValue; simpleInput.ShortValue = 16; simpleInput.IntValue = 17; simpleInput.LongValue = 18; simpleOutput = new Simple(); complexInput = new Complex(); complexOutput = new Complex(); complexInput.SimpleValue = simpleInput; complexInput.ListValue = new List <Simple> { simpleInput, simpleInput }; if (full) { complexInput.SetValue = new THashSet <Simple>(); complexInput.SetValue.Add(simpleInput); complexInput.SetValue.Add(simpleInput); complexInput.MapValue = new Dictionary <string, Simple> { { "a", simpleInput }, { "b", simpleInput } }; } trans = new TByteBuffer(1024); // prot = new TBinaryProtocol(trans); prot = new TCompactProtocol(trans); trans.Clear(); simpleInput.Write(prot); }