public void SetParameters_ParamInv_Error() { CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { MaximumLengthConstraint c = new MaximumLengthConstraint(); c.SetParametersInternal(new string[] { "narf" }, ParameterDataType.String); }); }
public void SetParameters_Success() { MaximumLengthConstraint c = new MaximumLengthConstraint(); c.SetParametersInternal(new string[] { "1" }, ParameterDataType.String); Assert.AreEqual(1, c.MaximumLength); }