-
Notifications
You must be signed in to change notification settings - Fork 158
SamePathConstraint
jnm2 edited this page Mar 18, 2017
·
7 revisions
SamePathConstraint
tests that two paths are equivalent.
Assert.That( @"C:\folder1\folder2", Is.SamePath( @"C:\Folder1\Folder2" ).IgnoreCase ); Assert.That( "/folder1/folder2", Is.Not.SamePath( "/Folder1/Folder2" ).RespectCase );
#### Notes
1. Path constraints perform tests on paths, without reference to any
actual files or directories. This allows testing paths that are
created by an application for reference or later use, without
any effect on the environment.
2. Path constraints are intended to work across multiple file systems,
and convert paths to a canonical form before comparing them.
3. It is usually not necessary to know the file system of the paths
in order to compare them. Where necessary, the programmer may
use the <b>IgnoreCase</b> and <b>RespectCase</b> modifiers to provide
behavior other than the system default.
### See also...
* [[SubPathConstraint]]
* [[SamePathOrUnderConstraint]]
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