diff --git a/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs b/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs index 0d1d634c01..fe358a0e78 100644 --- a/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs +++ b/src/TestFramework/TestFramework/Assertions/Assert.IComparable.cs @@ -51,8 +51,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 @@ -98,8 +97,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 @@ -145,8 +143,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 @@ -192,8 +189,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 @@ -229,17 +225,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; } @@ -248,8 +236,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 @@ -285,17 +272,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; } @@ -304,79 +283,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 e1b286fb3d..231b11b259 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"); @@ -298,12 +295,6 @@ private static string BuildUserMessageForSubstringExpressionAndValueExpression(s 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 1a9ada9eb1..9ab853067e 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} @@ -420,6 +402,24 @@ 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. + Expected string to start with the specified prefix. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf index 0cc1d38005..555488c111 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf @@ -292,6 +292,16 @@ Skutečnost: {2} Očekávala se podmínka 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Skutečnost: {2} Očekávaná hodnota bude null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Očekávala se podmínka true. @@ -463,36 +493,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 1ca029b035..6db7ac250f 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf @@ -292,6 +292,16 @@ Tatsächlich: {2} Es wurde erwartet, dass die Bedingung „falsch“ lautet. + + 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Tatsächlich: {2} Erwarteter Wert ist null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Es wurde erwartet, dass die Bedingung „wahr“ ist. @@ -463,36 +493,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 7d05e9a1c5..480625e029 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf @@ -292,6 +292,16 @@ Real: {2} Se esperaba que la condición fuera 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Real: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Se esperaba que la condición fuera true. @@ -463,36 +493,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 a7b759c5d7..00c76c6aec 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf @@ -292,6 +292,16 @@ Réel : {2} La condition attendue doit être 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Réel : {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Condition attendue pour être true. @@ -463,36 +493,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 24c4784d10..b5f43b203b 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf @@ -292,6 +292,16 @@ Effettivo: {2} La condizione prevista deve essere 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Effettivo: {2} Il valore previsto dovrebbe essere null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. La condizione prevista deve essere true. @@ -463,36 +493,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 d013fe5cfd..d2a0367675 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf @@ -292,6 +292,16 @@ Actual: {2} 予期される条件は 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Actual: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. 予想される条件は true です。 @@ -463,36 +493,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 8494571f23..7e99ad4fa6 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf @@ -292,6 +292,16 @@ Actual: {2} 조건이 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Actual: {2} 값이 null이어야 합니다. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. 조건이 true여야 합니다. @@ -463,36 +493,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 f6d318ca3c..4b9df558de 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf @@ -292,6 +292,16 @@ Rzeczywiste: {2} Oczekiwano warunku o wartości 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Rzeczywiste: {2} Expected value to be null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Oczekiwano warunku o wartości true. @@ -463,36 +493,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 649de41672..6313c3fde9 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf @@ -292,6 +292,16 @@ Real: {2} Condição esperada como falsa. + + 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Real: {2} O valor esperado deve ser nulo. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Condição esperada como verdadeira. @@ -463,36 +493,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 27c09706b6..4eef5d6704 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf @@ -292,6 +292,16 @@ Actual: {2} Ожидается, что условие будет ложным (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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Actual: {2} Ожидаемое значение должно быть null. + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. Ожидается, что условие будет истинным (true). @@ -463,36 +493,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 394510166c..55fb2aa6f6 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf @@ -292,6 +292,16 @@ Gerçekte olan: {2} Koşulun yanlış olması bekleniyordu. + + 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} @@ -307,11 +317,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} @@ -347,6 +372,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. Koşulun doğru olması bekleniyordu. @@ -463,36 +493,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 3e9c7f7040..27412d38d4 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf @@ -292,6 +292,16 @@ Actual: {2} 预期条件为 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Actual: {2} 预期值为 null。 + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. 预期条件为 true。 @@ -463,36 +493,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 93501c3992..aa9c61281d 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf @@ -292,6 +292,16 @@ Actual: {2} 預期條件為 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} @@ -307,11 +317,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} @@ -347,6 +372,11 @@ Actual: {2} 預期值可為 Null。 + + Expected value to be positive. + Expected value to be positive. + + Expected condition to be true. 預期條件為 True。 @@ -463,36 +493,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/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() =>