diff --git a/source/TestFramework/Assert.cs b/source/TestFramework/Assert.cs index e226e5d..c45963c 100644 --- a/source/TestFramework/Assert.cs +++ b/source/TestFramework/Assert.cs @@ -170,7 +170,6 @@ public static void Equal( /// The first value to compare. This is the value the tests expects. /// The second value to compare. This is the value produced by the code under test. /// The message to include in the exception when is not equal to . The message is shown in test results. - /// The message to include in the exception when is not equal to . The message is shown in test results. /// Thrown if is not equal to . public static void AreEqual( int expected, @@ -192,7 +191,6 @@ public static void AreEqual( /// The first value to compare. This is the value the tests expects. /// The second value to compare. This is the value produced by the code under test. /// The message to include in the exception when is not equal to . The message is shown in test results. - /// The message to include in the exception when is not equal to . The message is shown in test results. /// Thrown if is not equal to . [Obsolete("This method is deprecated and will be removed in a future version. Use the new method AreEqual.")] public static void Equal( @@ -1600,7 +1598,7 @@ public static void NotSame( /// The object the test expects to be null. /// The message to include in the exception when value is not null. The message is shown in test results. /// Thrown if value is not null. - public static void IsNull(object value, string message = "") + public static void IsNull(object value, [CallerArgumentExpression(nameof(value))] string message = "") { if (value is not null) { @@ -1623,7 +1621,7 @@ public static void IsNull(object value, string message = "") /// The object the test expects not to be null. /// The message to include in the exception when value is null. The message is shown in test results. /// Thrown if value is null. - public static void IsNotNull([NotNull] object value, string message = "") + public static void IsNotNull([NotNull] object value, [CallerArgumentExpression(nameof(value))] string message = "") { if (value is null) { @@ -1636,19 +1634,19 @@ public static void IsNotNull([NotNull] object value, string message = "") /// /// The object the test expects not to be null. /// The message to include in the exception when value is null. The message is shown in test results. - /// Thrown if value is null./exception> + /// Thrown if value is null. [Obsolete("This method is deprecated and will be removed in a future version. Use the new method IsNotNull.")] public static void NotNull(object obj, string message = "") => IsNotNull(obj, message); /// /// Tests whether the code specified by delegate action throws exact given exception /// of type (and not of derived type) and throws if code - /// does not throws exception or throws exception of type other than . + /// does not throw exception or throws exception of type other than . /// /// Type of exception expected to be thrown. /// Delegate to code to be tested and which is expected to throw exception. - /// The message to include in the exception when action does not throws exception of type . - /// Thrown if action does not throws exception of type . + /// The message to include in the exception when action does not throw exception of type . + /// Thrown if action does not throw exception of type . /// Thrown if is . public static void ThrowsException( Type exceptionType, @@ -1688,12 +1686,12 @@ public static void ThrowsException( /// /// Tests whether the code specified by delegate action throws exact given exception /// of type (and not of derived type) and throws if code - /// does not throws exception or throws exception of type other than . + /// does not throw exception or throws exception of type other than . /// /// Type of exception expected to be thrown. /// Delegate to code to be tested and which is expected to throw exception. - /// The message to include in the exception when action does not throws exception of type . - /// Thrown if action does not throws exception of type . + /// The message to include in the exception when action does not throw exception of type . + /// Thrown if action does not throw exception of type . /// Thrown if is . [Obsolete("This method is deprecated and will be removed in a future version. Use the new method ThrowsException.")] public static void Throws(