示例#1
0
        public static void Validate(MockClassC item, MockClassC orig)
        {
            Assert.AreEqual(item.Id, orig.Id);
            Assert.AreEqual(item.Name, orig.Name);
            Assert.AreEqual(item.GetSomeCheckSum[0], orig.GetSomeCheckSum[0]);
            Assert.AreEqual(item.Location.X, orig.Location.X);
            Assert.AreEqual(item.Location.Y, orig.Location.Y);
            Assert.AreEqual(item.Location.Z, orig.Location.Z);
            Assert.AreEqual(item.Location.W, orig.Location.W);
            Assert.AreEqual(item.ReferenceCode, orig.ReferenceCode);
            Assert.AreEqual(item.ReplicationID, orig.ReplicationID);
            Assert.AreEqual(item.CatalogName, orig.CatalogName);
            Assert.AreEqual(item.CatalogNameNull, orig.CatalogNameNull);
            Assert.AreEqual(item.DecAnimal, orig.DecAnimal);
            Assert.AreEqual(item.MyDate, orig.MyDate);
            Assert.AreEqual(item.BigId, orig.BigId);
            Assert.AreEqual(item.Unsigned16, orig.Unsigned16);
            Assert.AreEqual(item.Unsigned32, orig.Unsigned32);
            Assert.AreEqual(item.Unsigned64, orig.Unsigned64);
            Assert.AreEqual(item.LittleId, orig.LittleId);

            if (item.Friend != null)
                Validate(item.Friend, orig.Friend);

            if (item.Other != null)
                Validate(item.Other, orig.Other);
        }
示例#2
0
        internal static bool ValidateC(MockClassC a, MockClassC b)
        {
            Assert.AreEqual(a.Id, b.Id);
            Assert.AreEqual(a.Name, b.Name);
            Assert.AreEqual(a.GetSomeCheckSum[0], b.GetSomeCheckSum[0]);
            Assert.AreEqual(a.Location.X, b.Location.X);
            Assert.AreEqual(a.Location.Y, b.Location.Y);
            Assert.AreEqual(a.Location.Z, b.Location.Z);
            Assert.AreEqual(a.Location.W, b.Location.W);
            Assert.AreEqual(a.ReferenceCode, b.ReferenceCode);
            Assert.AreEqual(a.ReplicationID, b.ReplicationID);
            Assert.AreEqual(a.CatalogName, b.CatalogName);
            Assert.AreEqual(a.CatalogNameNull, b.CatalogNameNull);
            Assert.AreEqual(a.DecAnimal, b.DecAnimal);
            Assert.AreEqual(a.MyDate, b.MyDate);
            Assert.AreEqual(a.BigId, b.BigId);
            Assert.AreEqual(a.Unsigned16, b.Unsigned16);
            Assert.AreEqual(a.Unsigned32, b.Unsigned32);
            Assert.AreEqual(a.Unsigned64, b.Unsigned64);
            Assert.AreEqual(a.LittleId, b.LittleId);

            if (a.Friend != null)
                ValidateC(a.Friend, b.Friend);

            return true;
        }