-
Notifications
You must be signed in to change notification settings - Fork 158
CollectionEquivalentConstraint
jnm2 edited this page Jun 14, 2017
·
5 revisions
CollectionEquivalentConstraint tests that two IEnumerables
are equivalent - that they contain
the same items, in any order. If the actual value passed does not implement IEnumerable
an exception is thrown.
CollectionEquivalentConstraint(IEnumerable other)
Is.EquivalentTo(IEnumerable other)
int[] iarray = new int[] { 1, 2, 3 };
string[] sarray = new string[] { "a", "b", "c" };
Assert.That(new string[] { "c", "a", "b" }, Is.EquivalentTo(sarray));
Assert.That(new int[] { 1, 2, 2 }, Is.Not.EquivalentTo(iarray));
- To compare items in order, use Is.EqualTo().
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator
- NUnit Analyzers