public void SetParameters_Success() { CharacterSetConstraint c = new CharacterSetConstraint(); c.SetParametersInternal(new string[] { "Ascii" }, ParameterDataType.String); Assert.AreEqual(CharacterSetConstraint.CharSet.Ascii, c.CharacterSet); }
public void SetParameters_NoParamsOrInvalid_Error() { CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { CharacterSetConstraint c = new CharacterSetConstraint(); c.SetParametersInternal(new string[0], ParameterDataType.String); }); CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { CharacterSetConstraint c = new CharacterSetConstraint(); c.SetParametersInternal(new string[] { "EBCDIC" }, ParameterDataType.String); }); }