/// <summary>Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection. Displays a message if the assertion fails.</summary> /// <param name="collection">The collection in which to search for the element.</param> /// <param name="element">The element that is not expected to be in the collection.</param> /// <param name="message">A message to display if the assertion fails. This message can be seen in the unit test results.</param> /// <exception cref="AssertFailedException"> /// <paramref name="element" /> is found in <paramref name="collection" />.</exception> public virtual void DoesNotContain(ICollection collection, object element, string message) => CollectionAssert.DoesNotContain(collection, element, message, null);
/// <summary>Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection. Displays a message if the assertion fails, and applies the specified formatting to it.</summary> /// <param name="collection">The collection in which to search for the element.</param> /// <param name="element">The element that is not expected to be in the collection.</param> /// <param name="message">A message to display if the assertion fails. This message can be seen in the unit test results.</param> /// <param name="parameters">An array of parameters to use when formatting <paramref name="message" />.</param> /// <exception cref="AssertFailedException"> /// <paramref name="element" /> is found in <paramref name="collection" />.</exception> public virtual void DoesNotContain(ICollection collection, object element, string message, params object[] parameters) => CollectionAssert.DoesNotContain(collection, element, message, parameters);
/// <summary>Verifies that the specified collection does not contain the specified element. The assertion fails if the element is found in the collection.</summary> /// <param name="collection">The collection in which to search for the element.</param> /// <param name="element">The element that is not expected to be in the collection.</param> /// <exception cref="AssertFailedException"> /// <paramref name="element" /> is found in <paramref name="collection" />.</exception> public virtual void DoesNotContain(ICollection collection, object element) => CollectionAssert.DoesNotContain(collection, element, string.Empty, null);