/// <summary>Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the collection are equal. Displays a message if the assertion fails.</summary> /// <param name="collection">The collection in which to search for duplicate elements.</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">Two or more equal elements are found in <paramref name="collection" />.</exception> public virtual void AllItemsAreUnique(ICollection collection, string message) => CollectionAssert.AllItemsAreUnique(collection, message, null);
/// <summary>Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the collection are equal. 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 duplicate elements.</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">Two or more equal elements are found in <paramref name="collection" />.</exception> public virtual void AllItemsAreUnique(ICollection collection, string message, params object[] parameters) => CollectionAssert.AllItemsAreUnique(collection, message, parameters);
/// <summary>Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the collection are equal.</summary> /// <param name="collection">The collection in which to search for duplicate elements.</param> /// <exception cref="AssertFailedException">Two or more equal elements are found in <paramref name="collection" />.</exception> public virtual void AllItemsAreUnique(ICollection collection) => CollectionAssert.AllItemsAreUnique(collection, string.Empty, null);