Class DirectoryAssert
Asserts on Directories
public static class DirectoryAssert
- Inheritance
-
DirectoryAssert
- Inherited Members
Methods
AreEqual(DirectoryInfo, DirectoryInfo)
Verifies that two directories are equal. Two directories are considered equal if both are null, or if both point to the same directory. If they are not equal an AssertionException is thrown.
public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
AreEqual(DirectoryInfo, DirectoryInfo, string)
Verifies that two directories are equal. Two directories are considered equal if both are null, or if both point to the same directory. If they are not equal an AssertionException is thrown.
public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual, string message)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if objects are not equal
AreEqual(DirectoryInfo, DirectoryInfo, string, params object[])
Verifies that two directories are equal. Two directories are considered equal if both are null, or if both point to the same directory. If they are not equal an AssertionException is thrown.
public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual, string message, params object[] args)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if the directories are not equal
args
object[]Arguments to be used in formatting the message
AreNotEqual(DirectoryInfo, DirectoryInfo)
Asserts that two directories are not equal. If they are equal an AssertionException is thrown.
public static void AreNotEqual(DirectoryInfo expected, DirectoryInfo actual)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
AreNotEqual(DirectoryInfo, DirectoryInfo, string)
Asserts that two directories are not equal. If they are equal an AssertionException is thrown.
public static void AreNotEqual(DirectoryInfo expected, DirectoryInfo actual, string message)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
AreNotEqual(DirectoryInfo, DirectoryInfo, string, params object[])
Asserts that two directories are not equal. If they are equal an AssertionException is thrown.
public static void AreNotEqual(DirectoryInfo expected, DirectoryInfo actual, string message, params object[] args)
Parameters
expected
DirectoryInfoA directory containing the value that is expected
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
args
object[]Arguments to be used in formatting the message
DoesNotExist(DirectoryInfo)
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(DirectoryInfo actual)
Parameters
actual
DirectoryInfoA directory containing the actual value
DoesNotExist(DirectoryInfo, string)
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(DirectoryInfo actual, string message)
Parameters
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
DoesNotExist(DirectoryInfo, string, params object[])
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(DirectoryInfo actual, string message, params object[] args)
Parameters
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
args
object[]Arguments to be used in formatting the message
DoesNotExist(string)
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(string actual)
Parameters
actual
stringThe path to a directory containing the actual value
DoesNotExist(string, string)
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(string actual, string message)
Parameters
actual
stringThe path to a directory containing the actual value
message
stringThe message to display if directories are not equal
DoesNotExist(string, string, params object[])
Asserts that the directory does not exist. If it does exist an AssertionException is thrown.
public static void DoesNotExist(string actual, string message, params object[] args)
Parameters
actual
stringThe path to a directory containing the actual value
message
stringThe message to display if directories are not equal
args
object[]Arguments to be used in formatting the message
Exists(DirectoryInfo)
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(DirectoryInfo actual)
Parameters
actual
DirectoryInfoA directory containing the actual value
Exists(DirectoryInfo, string)
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(DirectoryInfo actual, string message)
Parameters
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
Exists(DirectoryInfo, string, params object[])
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(DirectoryInfo actual, string message, params object[] args)
Parameters
actual
DirectoryInfoA directory containing the actual value
message
stringThe message to display if directories are not equal
args
object[]Arguments to be used in formatting the message
Exists(string)
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(string actual)
Parameters
actual
stringThe path to a directory containing the actual value
Exists(string, string)
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(string actual, string message)
Parameters
actual
stringThe path to a directory containing the actual value
message
stringThe message to display if directories are not equal
Exists(string, string, params object[])
Asserts that the directory exists. If it does not exist an AssertionException is thrown.
public static void Exists(string actual, string message, params object[] args)
Parameters
actual
stringThe path to a directory containing the actual value
message
stringThe message to display if directories are not equal
args
object[]Arguments to be used in formatting the message
ReferenceEquals(object, object)
override the default ReferenceEquals to throw an AssertionException. This implementation makes sure there is no mistake in calling this function as part of Assert.
public static void ReferenceEquals(object a, object b)