public void RequiredPlaceholderIsNullException_ToString_ReturnFullDetails() { RequiredPlaceholderIsNullException exception = new RequiredPlaceholderIsNullException("ColumnA"); Assert.AreEqual(@"DBConfirm.Core.Exceptions.RequiredPlaceholderIsNullException: The value for ColumnA is required but has not been set ColumnName: ColumnA", exception.ToString()); }
public void RequiredPlaceholderIsNullException_ToStringWithInnerException_ReturnFullDetails() { Exception inner = new ArgumentNullException(); RequiredPlaceholderIsNullException exception = new RequiredPlaceholderIsNullException("Custom message", "ColumnA", inner); Assert.AreEqual(@"DBConfirm.Core.Exceptions.RequiredPlaceholderIsNullException: Custom message ColumnName: ColumnA ---> System.ArgumentNullException: Value cannot be null.", exception.ToString()); }