-
Notifications
You must be signed in to change notification settings - Fork 158
ExactCountConstraint
Charlie Poole edited this page Jan 31, 2016
·
8 revisions
ExactCountConstraint applies a constraint to each item in an IEnumerable
, succeeding if the specified number of items succeed. An exception is thrown if the actual value passed does not implement IEnumerable
.
ExactCountConstraint(int expectedCount, Constraint itemConstraint)
Has.Exactly(int expectedCount)...
int[] array = new int[] { 1, 2, 3 };
Assert.That( array, Has.Exactly(1).EqualTo(3) );
Assert.That( array, Has.Exactly(2).GreaterThan(1) );
Assert.That( array, Has.Exactly(3).LessThan(100) );
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