-
Notifications
You must be signed in to change notification settings - Fork 158
SameAsConstraint
jnm2 edited this page Jun 14, 2017
·
5 revisions
A SameAsConstraint is used to test whether the object passed as an actual value has the same identity as the object supplied in its constructor.
SameAsConstraint(object expected)
Is.SameAs(object expected)
Exception ex1 = new Exception();
Exception ex2 = ex1;
Assert.That(ex2, Is.SameAs(ex1));
Exception ex3 = new Exception();
Assert.That(ex3, Is.Not.SameAs(ex1));
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