public void RandomProvColorTest() { var testProv = new Province[] { new Province() { Color = new P_Color("130", "12", "56") }, new Province() { Color = new P_Color("1", "40", "100") }, new Province() { Color = new P_Color("78", "32", "47") }, new Province() { Color = new P_Color("23", "190", "200") }, new Province() { Color = new P_Color("90", "212", "231") } }; Color newColor = RandomProvColor(testProv); Assert.IsTrue(testProv.Count(p => p.Color == newColor) == 0); }