Example #1
0
        public void RenderMaterial_SerializedMaterialGeneratesTheSameMaterialID()
        {
            RenderMaterial mat   = new RenderMaterial();
            UUID           matID = new UUID(mat.ComputeMD5Hash(), 0);

            byte[] matData = mat.ToBytes();

            RenderMaterial newmat   = RenderMaterial.FromBytes(matData, 0, matData.Length);
            UUID           newmatID = RenderMaterial.GenerateMaterialID(newmat);

            Assert.That(mat, Is.EqualTo(newmat));
            Assert.That(matID, Is.EqualTo(newmatID));
        }
Example #2
0
        public void RenderMaterial_SerializedMaterialGeneratesTheSameMaterialID()
        {
            RenderMaterial mat = new RenderMaterial();
            UUID matID = new UUID(mat.ComputeMD5Hash(), 0);
            byte[] matData = mat.ToBytes();

            RenderMaterial newmat = RenderMaterial.FromBytes(matData, 0, matData.Length);
            UUID newmatID = RenderMaterial.GenerateMaterialID(newmat);

            Assert.That(mat, Is.EqualTo(newmat));
            Assert.That(matID, Is.EqualTo(newmatID));
        }