public void SetParameters_NoParamsOrNull_Error() { CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { DisplayHintConstraint c = new DisplayHintConstraint(); c.SetParametersInternal(new string[0], ParameterDataType.String); }); CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { DisplayHintConstraint c = new DisplayHintConstraint(); c.SetParametersInternal(new string[] { "1", "2", null, "4" }, ParameterDataType.String); }); }
public void SetParameters_Success() { DisplayHintConstraint c = new DisplayHintConstraint(); c.SetParametersInternal(new string[] { Constants.SchemeNames[0], Constants.SchemeNames[1], Constants.SchemeNames[2] }, ParameterDataType.String); Assert.IsNotNull(c.Hints); List<string> TempSchemas = new List<string>(c.Hints); Assert.AreEqual(3, TempSchemas.Count); }