Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a392417

Browse files
committed
Update System.Diagnostics.Process Xunit helpers
Assert.None no longer exists, so use Assert.DoesNotContain instead, which is equivalent.
1 parent 7c12b01 commit a392417

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Common/tests/System/Diagnostics/AssertWithCallerAttributes.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,21 +277,21 @@ public static T IsType<T>(object @object,
277277
public static void None(IEnumerable collection, object expected,
278278
[CallerFilePath] string path = null, [CallerLineNumber] int line = 0)
279279
{
280-
try { Xunit.Assert.None(collection, expected); }
280+
try { Xunit.Assert.DoesNotContain(expected, (IEnumerable<object>)collection); }
281281
catch (Exception e) { throw WrapException(e, path, line); }
282282
}
283283

284-
public static void None<T>(IEnumerable<T> collection, Func<T, bool> predicate,
284+
public static void None<T>(IEnumerable<T> collection, Predicate<T> predicate,
285285
[CallerFilePath] string path = null, [CallerLineNumber] int line = 0)
286286
{
287-
try { Xunit.Assert.None(collection, predicate); }
287+
try { Xunit.Assert.DoesNotContain(collection, predicate); }
288288
catch (Exception e) { throw WrapException(e, path, line); }
289289
}
290290

291291
public static void None<T>(IEnumerable<T> collection, T expected,
292292
[CallerFilePath] string path = null, [CallerLineNumber] int line = 0)
293293
{
294-
try { Xunit.Assert.None(collection, expected); }
294+
try { Xunit.Assert.DoesNotContain(expected, collection); }
295295
catch (Exception e) { throw WrapException(e, path, line); }
296296
}
297297

0 commit comments

Comments
 (0)