-
Notifications
You must be signed in to change notification settings - Fork 157
Assumptions
Chris Maddock edited this page Oct 9, 2018
·
9 revisions
Assumptions are intended to express the state a test must be in to provide a meaningful result. They are functionally similar to assertions, however a unmet assumption will produce an Inconclusive result, as opposed to a Failure.
Assumptions make use of the Assume
static class.
Assume.That(myString, Is.EqualTo("Hello"));
Assume.That()
has the same set of overloads as Assert.That()
. For further details there, see the Constraint Model documentation.
Note that assumptions cannot be used within Multiple Asserts.
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