Beispiel #1
0
        public void Test_GetHashValue()
        {
            var mat1 = new MyMaterial (1, 2.0f, "String");
            var mat2 = new MyMaterial (1, 2.0f, "String");
            var hash1 = mat1.GetHashValue ();
            var hash2 = mat2.GetHashValue ();

            Assert.AreEqual (hash1, hash2);

            mat1.Value1 = 0;
            mat2.Value1 = -1;

            hash1 = mat1.GetHashValue ();
            hash2 = mat2.GetHashValue ();

            Assert.AreNotEqual (hash1, hash2);
        }