Ejemplo n.º 1
0
        public void ensureGetHashCodeWorks()
        {
            Color        color  = Color.valueOf("Azul", 1, 1, 1, 1);
            Finish       finish = Finish.valueOf("Acabamento polido", 12);
            List <Color> colors = new List <Color>();

            colors.Add(color);
            List <Finish> finishes = new List <Finish>();

            finishes.Add(finish);
            Material           material      = new Material("1234", "Material", "ola.jpg", colors, finishes);
            CustomizedMaterial cuntMaterial1 = CustomizedMaterial.valueOf(material, color, finish);
            CustomizedMaterial cuntMaterial2 = CustomizedMaterial.valueOf(material, color, finish);

            Assert.Equal(cuntMaterial1.GetHashCode(), cuntMaterial2.GetHashCode());
        }