public void GetObjectData_InfoNull_Error() { CustomAssert.ThrowsException<CodedArgumentNullException>(() => { LengthConstraint c = new LengthConstraint(5); c.GetObjectData(null, new System.Runtime.Serialization.StreamingContext()); }); }
public void AssertDataType_DataTypeArray_Error() { CustomAssert.ThrowsException<InvalidDataTypeException>(() => { LengthConstraint c = new LengthConstraint(5); c.Validate(42, ParameterDataType.Int32, Constants.MemberName); }); }