Esempio n. 1
0
        private void AssertEqualSerializedObjectsWithIntegerField(byte[] sutOut)
        {
            SerializeTest2 obj = new SerializeTest2();

            byte[] def     = BitConverter.GetBytes(obj.GetType().GetHashCode());
            byte[] payload = BitConverter.GetBytes(obj.testInt);

            List <byte> retList = new List <byte>();

            retList.AddRange(def);
            retList.AddRange(payload);

            Assert.AreEqual(sutOut, retList.ToArray());
        }
Esempio n. 2
0
        private byte[] GivenSerializedIntegerObject()
        {
            SerializeTest2 obj = new SerializeTest2();

            return(serializer.Serialize(obj));
        }