Beispiel #1
0
        public void TestRoundtrip()
        {
            var inBytes  = File.ReadAllBytes("FR112.nbt");
            var commands = TraceReader.Read(inBytes);
            var outBytes = TraceSerializer.Serialize(commands);

            Assert.AreEqual(inBytes.Length, outBytes.Length);
            for (var i = 0; i < inBytes.Length; i++)
            {
                Assert.AreEqual(inBytes[i], outBytes[i], string.Format("byte #{0}", i));
            }
        }
Beispiel #2
0
 private byte[] S(ICommand cmd)
 {
     return(TraceSerializer.Serialize(new[] { cmd }));
 }