public void Only_Tests_On_JArray_Of_Item_JObject() { var validator = new ColorPickerConfigurationEditor.ColorListValidator(); var result = validator.Validate(new JArray("hello", "world"), null, new ColorPickerPropertyEditor(Mock.Of <ILogger>())); Assert.AreEqual(0, result.Count()); }
public void Only_Tests_On_JArray_Of_Item_JObject() { var validator = new ColorPickerConfigurationEditor.ColorListValidator(); IEnumerable <ValidationResult> result = validator.Validate( new JArray("hello", "world"), null, ColorPickerPropertyEditor); Assert.AreEqual(0, result.Count()); }
public void Validates_Color_Vals() { var validator = new ColorPickerConfigurationEditor.ColorListValidator(); var result = validator.Validate(new JArray( JObject.FromObject(new { value = "CC0000" }), JObject.FromObject(new { value = "zxcvzxcvxzcv" }), JObject.FromObject(new { value = "ABC" }), JObject.FromObject(new { value = "1234567" })), null, new ColorPickerPropertyEditor(Mock.Of <ILogger>())); Assert.AreEqual(2, result.Count()); }