Skip to content

Commit

Permalink
Add string Contains/DoesNotContain assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Jan 30, 2025
1 parent 9165781 commit 3536b20
Show file tree
Hide file tree
Showing 2 changed files with 334 additions and 2 deletions.
324 changes: 322 additions & 2 deletions src/TestFramework/TestFramework/Assertions/Assert.Contains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ public static T ContainsSingle<T>(IEnumerable<T> collection, [StringSyntax(Strin
return default;
}

#region Contains

public static void Contains<T>(IEnumerable<T> collection, T expected)
=> Contains(collection, expected, string.Empty, null);
=> Contains(collection, expected, string.Empty, null);

public static void Contains<T>(IEnumerable<T> collection, T expected, string? message)
=> Contains(collection, expected, message, null);
Expand Down Expand Up @@ -159,8 +161,168 @@ public static void Contains<T>(IEnumerable<T> collection, Func<T, bool> predicat
}
}

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring)
=> Contains(value, substring, StringComparison.Ordinal, string.Empty, null);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring, string? message)
=> Contains(value, substring, StringComparison.Ordinal, message, null);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <param name="parameters">
/// An array of parameters to use when formatting <paramref name="message"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string? message,
params object?[]? parameters)
=> Contains(value, substring, StringComparison.Ordinal, message, parameters);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring, StringComparison comparisonType)
=> Contains(value, substring, comparisonType, string.Empty, null);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring, StringComparison comparisonType, string? message)
=> Contains(value, substring, comparisonType, message, null);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <param name="parameters">
/// An array of parameters to use when formatting <paramref name="message"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void Contains(string value, string substring, StringComparison comparisonType,
[StringSyntax(StringSyntaxAttribute.CompositeFormat)] string? message, params object?[]? parameters)
{
#if NETFRAMEWORK || NETSTANDARD
if (value.IndexOf(substring, comparisonType) < 0)
#else
if (!value.Contains(substring, comparisonType))
#endif
{
string userMessage = BuildUserMessage(message, parameters);
string finalMessage = string.Format(CultureInfo.CurrentCulture, FrameworkMessages.ContainsFail, value, substring, userMessage);
ThrowAssertFailed("StringAssert.Contains", finalMessage);
}
}

#endregion // Contains

#region DoesNotContain

public static void DoesNotContain<T>(IEnumerable<T> collection, T expected)
=> DoesNotContain(collection, expected, string.Empty, null);
=> DoesNotContain(collection, expected, string.Empty, null);

public static void DoesNotContain<T>(IEnumerable<T> collection, T expected, string? message)
=> DoesNotContain(collection, expected, message, null);
Expand Down Expand Up @@ -203,4 +365,162 @@ public static void DoesNotContain<T>(IEnumerable<T> collection, Func<T, bool> pr
ThrowAssertFailed("DoesNotContain", userMessage);
}
}

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring)
=> DoesNotContain(value, substring, string.Empty, StringComparison.Ordinal);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring, string? message)
=> DoesNotContain(value, substring, message, StringComparison.Ordinal);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <param name="parameters">
/// An array of parameters to use when formatting <paramref name="message"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string? message,
params object?[]? parameters)
=> DoesNotContain(value, substring, message, StringComparison.Ordinal, parameters);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring, StringComparison comparisonType)
=> DoesNotContain(value, substring, string.Empty, comparisonType);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring, string? message, StringComparison comparisonType)
=> DoesNotContain(value, substring, message, comparisonType, string.Empty);

/// <summary>
/// Tests whether the specified string contains the specified substring
/// and throws an exception if the substring does not occur within the
/// test string.
/// </summary>
/// <param name="value">
/// The string that is expected to contain <paramref name="substring"/>.
/// </param>
/// <param name="substring">
/// The string expected to occur within <paramref name="value"/>.
/// </param>
/// <param name="comparisonType">
/// The comparison method to compare strings <paramref name="comparisonType"/>.
/// </param>
/// <param name="message">
/// The message to include in the exception when <paramref name="substring"/>
/// is not in <paramref name="value"/>. The message is shown in
/// test results.
/// </param>
/// <param name="parameters">
/// An array of parameters to use when formatting <paramref name="message"/>.
/// </param>
/// <exception cref="AssertFailedException">
/// <paramref name="value"/> is null, or <paramref name="substring"/> is null,
/// or <paramref name="value"/> does not contain <paramref name="substring"/>.
/// </exception>
public static void DoesNotContain(string value, string substring, StringComparison comparisonType,
[StringSyntax(StringSyntaxAttribute.CompositeFormat)] string? message, params object?[]? parameters)
{
#if NETFRAMEWORK || NETSTANDARD
if (value.IndexOf(substring, comparisonType) >= 0)
#else
if (value.Contains(substring, comparisonType))
#endif
{
string userMessage = BuildUserMessage(message, parameters);
string finalMessage = string.Format(CultureInfo.CurrentCulture, FrameworkMessages.DoesNotContainFail, value, substring, userMessage);

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'

Check failure on line 520 in src/TestFramework/TestFramework/Assertions/Assert.Contains.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs#L520

src/TestFramework/TestFramework/Assertions/Assert.Contains.cs(520,95): error CS0117: (NETCORE_ENGINEERING_TELEMETRY=Build) 'FrameworkMessages' does not contain a definition for 'DoesNotContainFail'
ThrowAssertFailed("StringAssert.DoesNotContain", finalMessage);
}
}

#endregion // DoesNotContain
}
Loading

0 comments on commit 3536b20

Please sign in to comment.