From b42e2a6c027c24bdb72caf885d0fbbf20a5f2ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 15 May 2026 15:42:46 +0200 Subject: [PATCH 1/2] Apply structured assertion messages (RFC 012) to Assert.IComparable family Migrates Assert.IsGreaterThan / IsGreaterThanOrEqualTo / IsLessThan / IsLessThanOrEqualTo / IsPositive / IsNegative to the structured assertion message format defined in RFC 012. The bound comparisons use 'lower bound:' / 'upper bound:' labels next to 'actual:'. The IsPositive / IsNegative assertions use 'expected: > 0' / 'expected: < 0' for symmetry with how WithExpectedAndActual is consumed by AssertFailedException.ExpectedText / ActualText. Removes the now-unused BuildUserMessageForLowerBoundExpression* / UpperBoundExpression* / ValueExpression helpers from Assert.cs (the call-site is now reconstructed via FormatCallSiteExpression). Updates the affected tests in AssertTests.IComparableTests.cs to match the new message layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Assertions/Assert.IComparable.cs | 139 +++++++----------- .../TestFramework/Assertions/Assert.cs | 9 -- .../Resources/FrameworkMessages.resx | 18 +++ .../Resources/xlf/FrameworkMessages.cs.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.de.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.es.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.fr.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.it.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.ja.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.ko.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.pl.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.pt-BR.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.ru.xlf | 30 ++++ .../Resources/xlf/FrameworkMessages.tr.xlf | 30 ++++ .../xlf/FrameworkMessages.zh-Hans.xlf | 30 ++++ .../xlf/FrameworkMessages.zh-Hant.xlf | 30 ++++ .../AssertTests.IComparableTests.cs | 66 ++++++++- 17 files changed, 521 insertions(+), 101 deletions(-) diff --git a/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs b/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs index ba7f415a54..01bb00b97a 100644 --- a/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs +++ b/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs @@ -49,8 +49,7 @@ public static void IsGreaterThan(T lowerBound, T value, string? message = "", return; } - string userMessage = BuildUserMessageForLowerBoundExpressionAndValueExpression(message, lowerBoundExpression, valueExpression); - ReportAssertIsGreaterThanFailed(lowerBound, value, userMessage); + ReportAssertIsGreaterThanFailed(lowerBound, value, message, lowerBoundExpression, valueExpression); } #endregion // IsGreaterThan @@ -94,8 +93,7 @@ public static void IsGreaterThanOrEqualTo(T lowerBound, T value, string? mess return; } - string userMessage = BuildUserMessageForLowerBoundExpressionAndValueExpression(message, lowerBoundExpression, valueExpression); - ReportAssertIsGreaterThanOrEqualToFailed(lowerBound, value, userMessage); + ReportAssertIsGreaterThanOrEqualToFailed(lowerBound, value, message, lowerBoundExpression, valueExpression); } #endregion // IsGreaterThanOrEqualTo @@ -139,8 +137,7 @@ public static void IsLessThan(T upperBound, T value, string? message = "", [C return; } - string userMessage = BuildUserMessageForUpperBoundExpressionAndValueExpression(message, upperBoundExpression, valueExpression); - ReportAssertIsLessThanFailed(upperBound, value, userMessage); + ReportAssertIsLessThanFailed(upperBound, value, message, upperBoundExpression, valueExpression); } #endregion // IsLessThan @@ -184,8 +181,7 @@ public static void IsLessThanOrEqualTo(T upperBound, T value, string? message return; } - string userMessage = BuildUserMessageForUpperBoundExpressionAndValueExpression(message, upperBoundExpression, valueExpression); - ReportAssertIsLessThanOrEqualToFailed(upperBound, value, userMessage); + ReportAssertIsLessThanOrEqualToFailed(upperBound, value, message, upperBoundExpression, valueExpression); } #endregion // IsLessThanOrEqualTo @@ -219,17 +215,9 @@ public static void IsPositive(T value, string? message = "", [CallerArgumentE var zero = default(T); // Handle special case for floating point NaN values - if (value is float.NaN) + if (value is float.NaN or double.NaN) { - string userMessage = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsPositiveFailed(value, userMessage); - return; - } - - if (value is double.NaN) - { - string userMessage = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsPositiveFailed(value, userMessage); + ReportAssertIsPositiveFailed(value, message, valueExpression); return; } @@ -238,8 +226,7 @@ public static void IsPositive(T value, string? message = "", [CallerArgumentE return; } - string userMessage2 = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsPositiveFailed(value, userMessage2); + ReportAssertIsPositiveFailed(value, message, valueExpression); } #endregion // IsPositive @@ -273,17 +260,9 @@ public static void IsNegative(T value, string? message = "", [CallerArgumentE var zero = default(T); // Handle special case for floating point NaN values - if (value is float.NaN) - { - string userMessage = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsNegativeFailed(value, userMessage); - return; - } - - if (value is double.NaN) + if (value is float.NaN or double.NaN) { - string userMessage = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsNegativeFailed(value, userMessage); + ReportAssertIsNegativeFailed(value, message, valueExpression); return; } @@ -292,79 +271,67 @@ public static void IsNegative(T value, string? message = "", [CallerArgumentE return; } - string userMessage2 = BuildUserMessageForValueExpression(message, valueExpression); - ReportAssertIsNegativeFailed(value, userMessage2); + ReportAssertIsNegativeFailed(value, message, valueExpression); } #endregion // IsNegative [DoesNotReturn] - private static void ReportAssertIsGreaterThanFailed(T lowerBound, T value, string userMessage) - { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsGreaterThanFailMsg, - userMessage, - ReplaceNulls(lowerBound), - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsGreaterThan", finalMessage); - } + private static void ReportAssertIsGreaterThanFailed(T lowerBound, T value, string? userMessage, string lowerBoundExpression, string valueExpression) + => ReportComparisonFailed("Assert.IsGreaterThan", FrameworkMessages.IsGreaterThanFailedSummary, "lower bound:", lowerBound, value, userMessage, lowerBoundExpression, valueExpression, ""); [DoesNotReturn] - private static void ReportAssertIsGreaterThanOrEqualToFailed(T lowerBound, T value, string userMessage) - { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsGreaterThanOrEqualToFailMsg, - userMessage, - ReplaceNulls(lowerBound), - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsGreaterThanOrEqualTo", finalMessage); - } + private static void ReportAssertIsGreaterThanOrEqualToFailed(T lowerBound, T value, string? userMessage, string lowerBoundExpression, string valueExpression) + => ReportComparisonFailed("Assert.IsGreaterThanOrEqualTo", FrameworkMessages.IsGreaterThanOrEqualToFailedSummary, "lower bound:", lowerBound, value, userMessage, lowerBoundExpression, valueExpression, ""); [DoesNotReturn] - private static void ReportAssertIsLessThanFailed(T upperBound, T value, string userMessage) - { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsLessThanFailMsg, - userMessage, - ReplaceNulls(upperBound), - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsLessThan", finalMessage); - } + private static void ReportAssertIsLessThanFailed(T upperBound, T value, string? userMessage, string upperBoundExpression, string valueExpression) + => ReportComparisonFailed("Assert.IsLessThan", FrameworkMessages.IsLessThanFailedSummary, "upper bound:", upperBound, value, userMessage, upperBoundExpression, valueExpression, ""); [DoesNotReturn] - private static void ReportAssertIsLessThanOrEqualToFailed(T upperBound, T value, string userMessage) - { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsLessThanOrEqualToFailMsg, - userMessage, - ReplaceNulls(upperBound), - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsLessThanOrEqualTo", finalMessage); - } + private static void ReportAssertIsLessThanOrEqualToFailed(T upperBound, T value, string? userMessage, string upperBoundExpression, string valueExpression) + => ReportComparisonFailed("Assert.IsLessThanOrEqualTo", FrameworkMessages.IsLessThanOrEqualToFailedSummary, "upper bound:", upperBound, value, userMessage, upperBoundExpression, valueExpression, ""); [DoesNotReturn] - private static void ReportAssertIsPositiveFailed(T value, string userMessage) + private static void ReportComparisonFailed(string assertionName, string summary, string boundLabel, T bound, T value, string? userMessage, string boundExpression, string valueExpression, string boundPlaceholder) { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsPositiveFailMsg, - userMessage, - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsPositive", finalMessage); + string boundText = AssertionValueRenderer.RenderValue(bound); + string actualText = AssertionValueRenderer.RenderValue(value); + EvidenceBlock evidence = EvidenceBlock.Create() + .AddLine(boundLabel, boundText) + .AddLine("actual:", actualText); + + StructuredAssertionMessage structured = new(summary); + structured.WithUserMessage(userMessage); + structured.WithEvidence(evidence); + structured.WithExpectedAndActual(boundText, actualText); + structured.WithCallSiteExpression(FormatCallSiteExpression(assertionName, boundExpression, valueExpression, boundPlaceholder, "")); + + ReportAssertFailed(structured); } [DoesNotReturn] - private static void ReportAssertIsNegativeFailed(T value, string userMessage) + private static void ReportAssertIsPositiveFailed(T value, string? userMessage, string valueExpression) + => ReportSignFailed("Assert.IsPositive", FrameworkMessages.IsPositiveFailedSummary, "> 0", value, userMessage, valueExpression); + + [DoesNotReturn] + private static void ReportAssertIsNegativeFailed(T value, string? userMessage, string valueExpression) + => ReportSignFailed("Assert.IsNegative", FrameworkMessages.IsNegativeFailedSummary, "< 0", value, userMessage, valueExpression); + + [DoesNotReturn] + private static void ReportSignFailed(string assertionName, string summary, string expectedText, T value, string? userMessage, string valueExpression) { - string finalMessage = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.IsNegativeFailMsg, - userMessage, - ReplaceNulls(value)); - ReportAssertFailed("Assert.IsNegative", finalMessage); + string actualText = AssertionValueRenderer.RenderValue(value); + EvidenceBlock evidence = EvidenceBlock.Create() + .AddLine("expected:", expectedText) + .AddLine("actual:", actualText); + + StructuredAssertionMessage structured = new(summary); + structured.WithUserMessage(userMessage); + structured.WithEvidence(evidence); + structured.WithExpectedAndActual(expectedText, actualText); + structured.WithCallSiteExpression(FormatCallSiteExpression(assertionName, valueExpression, nameof(value))); + + ReportAssertFailed(structured); } } diff --git a/src/TestFramework/TestFramework/Assertions/Assert.cs b/src/TestFramework/TestFramework/Assertions/Assert.cs index 099aa683f4..21f2128c38 100644 --- a/src/TestFramework/TestFramework/Assertions/Assert.cs +++ b/src/TestFramework/TestFramework/Assertions/Assert.cs @@ -286,9 +286,6 @@ private static string BuildUserMessageForThreeExpressions(string? format, string : $"{callerArgMessagePart} {userMessage}"; } - private static string BuildUserMessageForValueExpression(string? format, string valueExpression) - => BuildUserMessageForSingleExpression(format, valueExpression, "value"); - private static string BuildUserMessageForCollectionExpression(string? format, string collectionExpression) => BuildUserMessageForSingleExpression(format, collectionExpression, "collection"); @@ -310,12 +307,6 @@ private static string BuildUserMessageForNotExpectedPrefixExpressionAndValueExpr private static string BuildUserMessageForPatternExpressionAndValueExpression(string? format, string patternExpression, string valueExpression) => BuildUserMessageForTwoExpressions(format, patternExpression, "pattern", valueExpression, "value"); - private static string BuildUserMessageForLowerBoundExpressionAndValueExpression(string? format, string lowerBoundExpression, string valueExpression) - => BuildUserMessageForTwoExpressions(format, lowerBoundExpression, "lowerBound", valueExpression, "value"); - - private static string BuildUserMessageForUpperBoundExpressionAndValueExpression(string? format, string upperBoundExpression, string valueExpression) - => BuildUserMessageForTwoExpressions(format, upperBoundExpression, "upperBound", valueExpression, "value"); - private static string BuildUserMessageForExpectedExpressionAndCollectionExpression(string? format, string expectedExpression, string collectionExpression) => BuildUserMessageForTwoExpressions(format, expectedExpression, "expected", collectionExpression, "collection"); diff --git a/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx b/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx index 691f3edab7..099bf3e25a 100644 --- a/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx +++ b/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx @@ -420,4 +420,22 @@ Actual: {2} Expected value to not be null. + + Expected value to be greater than the lower bound. + + + Expected value to be greater than or equal to the lower bound. + + + Expected value to be less than the upper bound. + + + Expected value to be less than or equal to the upper bound. + + + Expected value to be positive. + + + Expected value to be negative. + diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf index 4ad5deac23..0ea29cd2e0 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf @@ -277,6 +277,16 @@ Skutečnost: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Hodnota {0} není v očekávaném rozsahu [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Skutečnost: {2} {0} Očekávaný typ:<{1}>. Aktuální typ:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} Řetězec „{0}“ neodpovídá vzoru „{1}“. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Očekávalo se, že kolekce bude obsahovat libovolnou položku, ale je prázdná. {0} @@ -332,6 +357,11 @@ Skutečnost: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf index f61ee46c58..349b66ccb3 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf @@ -277,6 +277,16 @@ Tatsächlich: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Der Wert „{0}“ liegt nicht im erwarteten Bereich [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Tatsächlich: {2} {0}Erwarteter Typ:<{1}>. Tatsächlicher Typ:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} Die Zeichenfolge „{0}“ stimmt nicht mit dem Muster „{1}“ überein. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Es wurde erwartet, dass die Sammlung ein beliebiges Element enthält, aber leer ist. {0} @@ -332,6 +357,11 @@ Tatsächlich: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf index 94a5797fc0..2d45beb2ad 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf @@ -277,6 +277,16 @@ Real: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} El valor "{0}" no está dentro del rango esperado [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Real: {2} {0} Tipo esperado:<{1}>. Tipo real:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} La cadena "{0}" no coincide con el patrón "{1}". {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Se esperaba que la colección contenga cualquier elemento, pero está vacía. {0} @@ -332,6 +357,11 @@ Real: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf index 00d78302f3..33ee24b77e 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf @@ -277,6 +277,16 @@ Réel : {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} La valeur « {0} » n'est pas dans la plage attendue [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Réel : {2} {0}Type attendu :<{1}>. Type réel :<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} La chaîne '{0}' ne correspond pas au modèle '{1}'. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} La collection doit contenir n’importe quel élément, mais elle est vide. {0} @@ -332,6 +357,11 @@ Réel : {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf index 80b0b1b715..f2a76eda7a 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf @@ -277,6 +277,16 @@ Effettivo: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Il valore '{0}' non è compreso nell'intervallo previsto [{1}, {2}]. {3} @@ -292,11 +302,26 @@ Effettivo: {2} {0} Tipo previsto:<{1}>. Tipo effettivo:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} La stringa '{0}' non corrisponde al criterio '{1}'. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} È previsto che la raccolta contenga qualsiasi elemento, ma è vuota. {0} @@ -332,6 +357,11 @@ Effettivo: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf index ee5344f86b..9a08ffbc9c 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf @@ -277,6 +277,16 @@ Actual: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} 値 '{0}' は予期される範囲 [{1}..{2}] 内にありません。{3} @@ -292,11 +302,26 @@ Actual: {2} {0} には型 <{1}> が必要ですが、型 <{2}> が指定されました。 + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} 文字列 '{0}' はパターン '{1}' と一致しません。{2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} コレクションには項目が含まれている必要がありますが、空です。{0} @@ -332,6 +357,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf index e1d64ff123..18a6de22f8 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf @@ -277,6 +277,16 @@ Actual: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} '{0}' 값이 예상 범위 [{1}..{2}] 내에 있지 않습니다. {3} @@ -292,11 +302,26 @@ Actual: {2} {0} 예상 형식: <{1}>, 실제 형식: <{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} '{0}' 문자열이 '{1}' 패턴과 일치하지 않습니다. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} 항목을 포함할 컬렉션이 필요한데 비어 있습니다. {0} @@ -332,6 +357,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf index b09f5eb893..85333b7f6f 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf @@ -277,6 +277,16 @@ Rzeczywiste: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Wartość „{0}” nie mieści się w oczekiwanym zakresie [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Rzeczywiste: {2} {0} Oczekiwany typ:<{1}>. Rzeczywisty typ:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} Ciąg „{0}” nie jest zgodny ze wzorcem „{1}”. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Oczekiwano, że kolekcja będzie zawierać dowolny element, ale jest pusta. {0} @@ -332,6 +357,11 @@ Rzeczywiste: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf index 3fdabfe37d..5be8a7c168 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf @@ -277,6 +277,16 @@ Real: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} O valor '{0}' não está dentro do intervalo esperado [{1}.. {2}]. {3} @@ -292,11 +302,26 @@ Real: {2} {0} Tipo esperado:<{1}>. Tipo real:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} A cadeia de caracteres “{0}” não corresponde ao padrão “{1}”. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} A coleção esperada conter qualquer item, mas ela está vazia. {0} @@ -332,6 +357,11 @@ Real: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf index 8262985ee7..87b628d17f 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf @@ -277,6 +277,16 @@ Actual: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Значение "{0}" не находится в пределах ожидаемого диапазона [{1}..{2}]. {3} @@ -292,11 +302,26 @@ Actual: {2} {0}Ожидается тип: <{1}>. Фактический тип: <{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} Строка "{0}" не соответствует шаблону "{1}". {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Ожидается, что коллекция будет содержать любой элемент, но она пуста. {0} @@ -332,6 +357,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf index 8420e144a3..1960f51941 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf @@ -277,6 +277,16 @@ Gerçekte olan: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} Değer '{0}' beklenen aralık [{1}..{2}] içinde değil. {3} @@ -292,11 +302,26 @@ Gerçekte olan: {2} {0} Beklenen tür:<{1}>. Gerçek tür:<{2}>. + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} '{0}' dizesi, '{1}' deseni ile eşleşmiyor. {2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} Koleksiyonun herhangi bir öğe içermesi bekleniyordu ancak boş. {0} @@ -332,6 +357,11 @@ Gerçekte olan: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf index 0b7558f104..881524aff2 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf @@ -277,6 +277,16 @@ Actual: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} 值 "{0}" 不在预期范围 [{1}..{2}] 内。{3} @@ -292,11 +302,26 @@ Actual: {2} {0} 类型应为: <{1}>。类型实为: <{2}>。 + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} 字符串 '{0}' 与模式 '{1}' 不匹配。{2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} 集合应包含任何项,但它为空。{0} @@ -332,6 +357,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf index cc658d8057..a001271684 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf @@ -277,6 +277,16 @@ Actual: {2} Expected condition to be false. + + Expected value to be greater than the lower bound. + Expected value to be greater than the lower bound. + + + + Expected value to be greater than or equal to the lower bound. + Expected value to be greater than or equal to the lower bound. + + Value '{0}' is not within the expected range [{1}..{2}]. {3} 值 '{0}' 不在預期的範圍 [{1}, {2}] 內。{3} @@ -292,11 +302,26 @@ Actual: {2} {0} 預期的類型: <{1}>,實際的類型: <{2}>。 + + Expected value to be less than the upper bound. + Expected value to be less than the upper bound. + + + + Expected value to be less than or equal to the upper bound. + Expected value to be less than or equal to the upper bound. + + String '{0}' does not match pattern '{1}'. {2} 字串 '{0}' 與模式 '{1}' 不符。{2} + + Expected value to be negative. + Expected value to be negative. + + Expected collection to contain any item but it is empty. {0} 預期集合包含任何專案,但卻是空的。{0} @@ -332,6 +357,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Expected condition to be true. diff --git a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.IComparableTests.cs b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.IComparableTests.cs index a574b23c53..5cf8e2582b 100644 --- a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.IComparableTests.cs +++ b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.IComparableTests.cs @@ -42,7 +42,16 @@ public void IsGreaterThanShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsGreaterThan failed. Actual value <5> is not greater than expected value <10>. 'lowerBound' expression: '10', 'value' expression: '5'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be greater than the lower bound. + A Message + + lower bound: 10 + actual: 5 + + Assert.IsGreaterThan(10, 5) + """); } public void IsGreaterThanShouldWorkWithDoubles() => @@ -86,7 +95,16 @@ public void IsGreaterThanOrEqualToShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsGreaterThanOrEqualTo failed. Actual value <5> is not greater than or equal to expected value <10>. 'lowerBound' expression: '10', 'value' expression: '5'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be greater than or equal to the lower bound. + A Message + + lower bound: 10 + actual: 5 + + Assert.IsGreaterThanOrEqualTo(10, 5) + """); } public void IsGreaterThanOrEqualToShouldWorkWithDoubles() => @@ -130,7 +148,16 @@ public void IsLessThanShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsLessThan failed. Actual value <10> is not less than expected value <5>. 'upperBound' expression: '5', 'value' expression: '10'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be less than the upper bound. + A Message + + upper bound: 5 + actual: 10 + + Assert.IsLessThan(5, 10) + """); } public void IsLessThanShouldWorkWithDoubles() => @@ -174,7 +201,16 @@ public void IsLessThanOrEqualToShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsLessThanOrEqualTo failed. Actual value <10> is not less than or equal to expected value <5>. 'upperBound' expression: '5', 'value' expression: '10'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be less than or equal to the upper bound. + A Message + + upper bound: 5 + actual: 10 + + Assert.IsLessThanOrEqualTo(5, 10) + """); } public void IsLessThanOrEqualToShouldWorkWithDoubles() => @@ -233,7 +269,16 @@ public void IsPositiveShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsPositive failed. Expected value <-5> to be positive. 'value' expression: '-5'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be positive. + A Message + + expected: > 0 + actual: -5 + + Assert.IsPositive(-5) + """); } public void IsPositiveShouldWorkWithDoubles() => @@ -298,7 +343,16 @@ public void IsNegativeShouldThrowWithMessage() // Assert action.Should().Throw() - .WithMessage("Assert.IsNegative failed. Expected value <5> to be negative. 'value' expression: '5'. A Message"); + .WithMessage( + """ + Assertion failed. Expected value to be negative. + A Message + + expected: < 0 + actual: 5 + + Assert.IsNegative(5) + """); } public void IsNegativeShouldWorkWithDoubles() => From 5632cb7572524803f14e83fe19c8404a29d1263b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 15 May 2026 18:04:53 +0200 Subject: [PATCH 2/2] Remove orphaned IComparable fail messages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Resources/FrameworkMessages.resx | 18 ----------- .../Resources/xlf/FrameworkMessages.cs.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.de.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.es.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.fr.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.it.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.ja.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.ko.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.pl.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.pt-BR.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.ru.xlf | 30 ------------------- .../Resources/xlf/FrameworkMessages.tr.xlf | 30 ------------------- .../xlf/FrameworkMessages.zh-Hans.xlf | 30 ------------------- .../xlf/FrameworkMessages.zh-Hant.xlf | 30 ------------------- 14 files changed, 408 deletions(-) diff --git a/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx b/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx index 099bf3e25a..e7eb722623 100644 --- a/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx +++ b/src/TestFramework/TestFramework/Resources/FrameworkMessages.resx @@ -328,24 +328,6 @@ Actual: {2} String '{0}' does contain string '{1}'. {2}. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - - - Actual value <{2}> is not less than expected value <{1}>. {0} - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - - - Expected value <{1}> to be positive. {0} - - - Expected value <{1}> to be negative. {0} - String '{0}' ends with string '{1}'. {2} diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf index 0ea29cd2e0..9badf82ae4 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf @@ -473,36 +473,6 @@ Skutečnost: {2} Vlastnost nebo metoda {0} ve třídě {1} vrací prázdné IEnumerable<object[]>. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Skutečná hodnota <{2}> není větší než očekávaná hodnota <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Skutečná hodnota <{2}> není větší nebo rovna očekávané hodnotě <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Skutečná hodnota <{2}> není menší než očekávaná hodnota <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Skutečná hodnota <{2}> není menší nebo rovna očekávané hodnotě <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Očekávaná hodnota <{1}> má být kladná. {0} - - - - Expected value <{1}> to be negative. {0} - Očekávaná hodnota <{1}> má být záporná. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals by neměla být pro kontrolní výrazy používána. Použijte prosím místo toho Assert.AreEqual a její přetížení. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf index 349b66ccb3..fa0c1595ff 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf @@ -473,36 +473,6 @@ Tatsächlich: {2} Eigenschaft oder Methode "{0}" in "{1}" gibt leeres IEnumerable<object[]> zurück. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Der tatsächliche Wert <{2}> ist nicht größer als der erwartete Wert <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Der tatsächliche Wert <{2}> ist nicht größer oder gleich dem erwarteten Wert <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Der tatsächliche Wert <{2}> ist nicht kleiner als der erwartete Wert <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Der tatsächliche Wert <{2}> ist nicht kleiner oder gleich dem erwarteten Wert <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Es wurde erwartet, dass der Wert <{1}> positiv ist. {0} - - - - Expected value <{1}> to be negative. {0} - Es wurde erwartet, dass der Wert <{1}> negativ ist. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals sollte nicht für Assertions verwendet werden. Verwenden Sie stattdessen Assert.AreEqual und Überladungen. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf index 2d45beb2ad..522fa62ef2 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf @@ -473,36 +473,6 @@ Real: {2} La propiedad o el método {0} en {1} devuelve un elemento IEnumerable<object[]> vacío. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - El valor real <{2}> no es mayor que el valor esperado <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - El valor real <{2}> no es mayor o igual que el valor esperado <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - El valor real <{2}> no es menor que el valor esperado <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - El valor real <{2}> no es menor o igual que el valor esperado <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Se esperaba que el valor <{1}> ser positivo. {0} - - - - Expected value <{1}> to be negative. {0} - Se esperaba que el valor <{1}> ser negativo. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. No se debe usar Assert.Equals para aserciones. Use Assert.AreEqual y Overloads en su lugar. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf index 33ee24b77e..7053493fa5 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf @@ -473,36 +473,6 @@ Réel : {2} La propriété ou la méthode {0} sur {1} retourne un IEnumerable<object[]> vide. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - La valeur réelle <{2}> n’est pas supérieure à la valeur attendue <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - La valeur réelle <{2}> n’est pas supérieure ou égale à la valeur attendue <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - La valeur réelle <{2}> n’est pas inférieure à la valeur attendue <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - La valeur réelle <{2}> n’est pas inférieure ou égale à la valeur attendue <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - La valeur attendue <{1}> doit être positive. {0} - - - - Expected value <{1}> to be negative. {0} - La valeur attendue <{1}> doit être négative. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals ne doit pas être utilisé pour les assertions. Utilisez Assert.AreEqual & overloads à la place. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf index f2a76eda7a..73e95a4b03 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf @@ -473,36 +473,6 @@ Effettivo: {2} La proprietà o il metodo {0} nella classe {1} restituisce un elemento IEnumerable<object[]> vuoto. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Il valore effettivo <{2}> non è maggiore del valore previsto <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Il valore effettivo <{2}> non è maggiore o uguale al valore previsto <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Il valore effettivo <{2}> non è minore del valore previsto <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Il valore effettivo <{2}> non è minore o uguale al valore previsto <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Il valore <{1}{0}> dovrebbe essere positivo. - - - - Expected value <{1}> to be negative. {0} - Il valore <{1}{0}> dovrebbe essere negativo. - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Non è possibile usare Assert.Equals per le asserzioni. Usare Assert.AreEqual e gli overload. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf index 9a08ffbc9c..6d5e4102c3 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf @@ -473,36 +473,6 @@ Actual: {2} {1} 上のプロパティまたはメソッド {0} は空の IEnumerable<object[]> を返します。 - - Actual value <{2}> is not greater than expected value <{1}>. {0} - 実際の値 <{2}> は、予期された値 <{1}> より大きくありません。{0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - 実際の値 <{2}> は、予期された値 <{1}> 以上ではありません。{0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - 実際の値 <{2}> は、予期された値 <{1}> より小さくありません。{0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - 実際の値 <{2}> は、予期された値 <{1}> 以下ではありません。{0} - - - - Expected value <{1}> to be positive. {0} - 正の値 <{1}> が必要です。{0} - - - - Expected value <{1}> to be negative. {0} - 負の値 <{1}> が必要です。{0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. アサーションには Assert.Equals を使用せずに、Assert.AreEqual とオーバーロードを使用してください。(& ) diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf index 18a6de22f8..d615ddeb04 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf @@ -473,36 +473,6 @@ Actual: {2} {1}의 속성 또는 메서드 {0}이(가) 빈 IEnumerable<object[]>를 반환합니다. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - 실제 값 <{2}>은(는)는 예상 값 <{1}>보다 크지 않습니다. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - 실제 값 <{2}>은(는)는 예상 값 <{1}>보다 크거나 같지 않습니다. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - 실제 값 <{2}>은(는)는 예상 값 <{1}>보다 작지 않습니다. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - 실제 값 <{2}>은(는)는 예상 값 <{1}>보다 작거나 같지 않습니다. {0} - - - - Expected value <{1}> to be positive. {0} - 예상 값 <{1}>은(는) 양수일 것으로 예상합니다. {0} - - - - Expected value <{1}> to be negative. {0} - 예상 값 <{1}>은(는) 음수일 것으로 예상합니다. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. 어설션에 Assert.Equals를 사용할 수 없습니다. 대신 Assert.AreEqual 및 오버로드를 사용하세요. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf index 85333b7f6f..7c362de35c 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf @@ -473,36 +473,6 @@ Rzeczywiste: {2} Właściwość lub metoda {0} w elemencie {1} zwraca pusty interfejs IEnumerable<object[]>. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Wartość rzeczywista <{2}> nie jest większa niż oczekiwana wartość <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Wartość rzeczywista <{2}> nie jest większa lub równa oczekiwanej wartości <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Wartość rzeczywista <{2}> nie jest mniejsza niż oczekiwana wartość <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Wartość rzeczywista <{2}> nie jest mniejsza lub równa oczekiwanej wartości <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Oczekiwana wartość <{1}> powinna być dodatnia. {0} - - - - Expected value <{1}> to be negative. {0} - Oczekiwana wartość <{1}> powinna być negatywna. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals nie powinno być używane do potwierdzania. Zamiast tego użyj Assert.AreEqual i przeciążeń. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf index 5be8a7c168..7664165dc3 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf @@ -473,36 +473,6 @@ Real: {2} A propriedade ou o método {0} em {1} retorna um IEnumerable<object[]> vazio. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - O valor <{2}> real não é maior que o valor esperado <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - O valor <{2}> real não é maior ou igual ao valor esperado <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - O valor <{2}> real não é menor que o valor esperado <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - O valor <{2}> real não é menor ou igual ao valor esperado <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - O valor <{1}> esperado deve ser positivo. {0} - - - - Expected value <{1}> to be negative. {0} - O valor <{1}> esperado deve ser negativo. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals não deveria ser usado para Declarações. Use Assert.AreEqual e sobrecargas em seu lugar. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf index 87b628d17f..29afa86e18 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf @@ -473,36 +473,6 @@ Actual: {2} Свойство или метод {0} класса {1} возвращает пустой IEnumerable<object[]>. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Действительное значение <{2}> не больше ожидаемого значения <{1}>. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Действительное значение <{2}> не больше или не равно ожидаемому значению <{1}>. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Действительное значение <{2}> не меньше ожидаемого значения <{1}>. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Действительное значение <{2}> не меньше или не равно ожидаемому значению <{1}>. {0} - - - - Expected value <{1}> to be positive. {0} - Ожидалось, что значение <{1}> будет положительным. {0} - - - - Expected value <{1}> to be negative. {0} - Ожидалось, что значение <{1}> будет отрицательным. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Нельзя использовать Assert.Equals для Assertions. Вместо этого используйте Assert.AreEqual и перегрузки. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf index 1960f51941..ef7256bdd4 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf @@ -473,36 +473,6 @@ Gerçekte olan: {2} {1} üzerindeki {0} özelliği veya metodu boş IEnumerable<object[]> döndürür. - - Actual value <{2}> is not greater than expected value <{1}>. {0} - Geçerli <{2}> değeri, beklenen <{1}> değerinden daha büyük değil. {0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - Geçerli <{2}> değeri, beklenen <{1}> değerinden büyük veya bu değere eşit değil. {0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - Geçerli <{2}> değeri, beklenen <{1}> değerinden daha küçük değil. {0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - Geçerli <{2}> değeri, beklenen <{1}> değerinden küçük veya bu değere eşit değil. {0} - - - - Expected value <{1}> to be positive. {0} - Beklenen <{1}> değeri pozitif olmalıdır. {0} - - - - Expected value <{1}> to be negative. {0} - Beklenen <{1}> değeri negatif olmalıdır. {0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals, Onaylama için kullanılmamalı. Lütfen yerine Assert.AreEqual & aşırı yüklemeleri kullanın. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf index 881524aff2..71949963aa 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf @@ -473,36 +473,6 @@ Actual: {2} {1} 上的属性或方法 {0} 返回空 IEnumerable<object[]>。 - - Actual value <{2}> is not greater than expected value <{1}>. {0} - 实际值 <{2}> 不大于预期值 <{1}>。{0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - 实际值 <{2}> 不大于或等于预期值 <{1}>。{0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - 实际值 <{2}> 不小于预期值 <{1}>。{0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - 实际值 <{2}> 不小于或等于预期值 <{1}>。{0} - - - - Expected value <{1}> to be positive. {0} - 预期值 <{1}> 为正值。{0} - - - - Expected value <{1}> to be negative. {0} - 预期值 <{1}> 为负值。{0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals 不应用于断言。请改用 Assert.AreEqual 和重载。 diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf index a001271684..27eace90df 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf @@ -473,36 +473,6 @@ Actual: {2} {1} 上的屬性或方法 {0} 傳回空的 IEnumerable<object[]>。 - - Actual value <{2}> is not greater than expected value <{1}>. {0} - 實際值 <{2}> 不大於預期值 <{1}>。{0} - - - - Actual value <{2}> is not greater than or equal to expected value <{1}>. {0} - 實際值 <{2}> 不大於或等於預期值 <{1}>。{0} - - - - Actual value <{2}> is not less than expected value <{1}>. {0} - 實際值 <{2}> 不小於預期值 <{1}>。{0} - - - - Actual value <{2}> is not less than or equal to expected value <{1}>. {0} - 實際值 <{2}> 不小於或等於預期值 <{1}>。{0} - - - - Expected value <{1}> to be positive. {0} - 預期值 <{1}> 為正數。{0} - - - - Expected value <{1}> to be negative. {0} - 預期值 <{1}> 為負數。{0} - - Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead. Assert.Equals 不應使用於判斷提示。請改用 Assert.AreEqual 及多載。