public void ensureCustomizedMaterialWithFinishOnlyAndCustomizedMaterialWithColorAndFinishAreEqual() { Finish finish = Finish.valueOf("Ola", 12); Color color = Color.valueOf("aerga", 1, 1, 1, 1); Material material = new Material("#aergaer", "aergae", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish })); CustomizedMaterial instance = CustomizedMaterial.valueOf(material, color, finish); CustomizedMaterial other = CustomizedMaterial.valueOf(material, finish); Assert.True(instance.Equals(other)); }
public void ensureCustomizedMaterialsWithColorOnlyAreEqual() { Color color = Color.valueOf("ola", 1, 1, 1, 1); Finish finish = Finish.valueOf("xa", 12); Material material = new Material("#dzone", "areae", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish })); CustomizedMaterial instance = CustomizedMaterial.valueOf(material, color); CustomizedMaterial other = CustomizedMaterial.valueOf(material, color); Assert.True(instance.Equals(other)); }
public void ensureCustomizedMaterialsWithFinishOnlyWithDifferentFinishesAreNotEqual() { Finish finish = Finish.valueOf("Ola", 12); Finish otherFinish = Finish.valueOf("bananas", 12); Color color = Color.valueOf("aerg", 1, 1, 1, 1); Material material = new Material("#aerga", "asdfsa", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish, otherFinish })); CustomizedMaterial instance = CustomizedMaterial.valueOf(material, finish); CustomizedMaterial other = CustomizedMaterial.valueOf(material, otherFinish); Assert.False(instance.Equals(other)); }
public void ensureCustomizedMaterialsWithDifferentFinishesAreNotEqual() { Color color = Color.valueOf("ola", 1, 1, 1, 1); Finish finish = Finish.valueOf("xa", 12); Finish otherFinish = Finish.valueOf("ax", 12); Material material = new Material("#dzone", "areae", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish, otherFinish })); CustomizedMaterial instance = CustomizedMaterial.valueOf(material, color, finish); CustomizedMaterial other = CustomizedMaterial.valueOf(material, color, otherFinish); Assert.False(instance.Equals(other)); }
public void ensureCustomizedMaterialAndInstanceOfDifferentTypeAreNotEqual() { Finish finish = Finish.valueOf("Acabamento polido", 12); Color color = Color.valueOf("Azul", 1, 1, 1, 1); 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 custMaterial = CustomizedMaterial.valueOf(material, color, finish); Assert.False(custMaterial.Equals(finishes)); }
public void ensureCustomizedMaterialsWithDifferentMaterialsAreNotEqual() { Color color = Color.valueOf("ola", 1, 1, 1, 1); Finish finish = Finish.valueOf("xau", 12); Material material = new Material("#imdifferent", "aerg", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish })); Material otherMaterial = new Material("#imalsodifferent", "aerge", "ola.jpg", new List <Color>(new[] { color }), new List <Finish>(new[] { finish })); CustomizedMaterial instance = CustomizedMaterial.valueOf(material, color, finish); CustomizedMaterial other = CustomizedMaterial.valueOf(otherMaterial, color, finish); Assert.False(instance.Equals(other)); }
public void ensureCustomizedMaterialsWithSameMaterialSameColorSameFinishAreEqual() { 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 custMaterial1 = CustomizedMaterial.valueOf(material, color, finish); CustomizedMaterial custMaterial2 = CustomizedMaterial.valueOf(material, color, finish); Assert.True(custMaterial1.Equals(custMaterial2)); }