<PackageReference Include="NUnit" Version="3.10.0" />

FileAssert

public static class FileAssert
Asserts on Files
public static void AreEqual(Stream expected, Stream actual, string message, object[] args)

Verifies that two Streams are equal. Two Streams are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreEqual(Stream expected, Stream actual)

Verifies that two Streams are equal. Two Streams are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreEqual(FileInfo expected, FileInfo actual, string message, object[] args)

Verifies that two files are equal. Two files are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreEqual(FileInfo expected, FileInfo actual)

Verifies that two files are equal. Two files are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreEqual(string expected, string actual, string message, object[] args)

Verifies that two files are equal. Two files are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreEqual(string expected, string actual)

Verifies that two files are equal. Two files are considered equal if both are null, or if both have the same value byte for byte. If they are not equal an AssertionException is thrown.

public static void AreNotEqual(Stream expected, Stream actual, string message, object[] args)

Asserts that two Streams are not equal. If they are equal an AssertionException is thrown.

public static void AreNotEqual(Stream expected, Stream actual)

Asserts that two Streams are not equal. If they are equal an AssertionException is thrown.

public static void AreNotEqual(FileInfo expected, FileInfo actual, string message, object[] args)

Asserts that two files are not equal. If they are equal an AssertionException is thrown.

public static void AreNotEqual(FileInfo expected, FileInfo actual)

Asserts that two files are not equal. If they are equal an AssertionException is thrown.

public static void AreNotEqual(string expected, string actual, string message, object[] args)

Asserts that two files are not equal. If they are equal an AssertionException is thrown.

public static void AreNotEqual(string expected, string actual)

Asserts that two files are not equal. If they are equal an AssertionException is thrown.

public static void DoesNotExist(FileInfo actual, string message, object[] args)

Asserts that the file does not exist. If it does exist an AssertionException is thrown.

public static void DoesNotExist(FileInfo actual)

Asserts that the file does not exist. If it does exist an AssertionException is thrown.

public static void DoesNotExist(string actual, string message, object[] args)

Asserts that the file does not exist. If it does exist an AssertionException is thrown.

public static void DoesNotExist(string actual)

Asserts that the file does not exist. If it does exist an AssertionException is thrown.

public static bool Equals(object a, object b)

DO NOT USE! Use FileAssert.AreEqual(...) instead. The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.

public static void Exists(FileInfo actual, string message, object[] args)

Asserts that the file exists. If it does not exist an AssertionException is thrown.

public static void Exists(FileInfo actual)

Asserts that the file exists. If it does not exist an AssertionException is thrown.

public static void Exists(string actual, string message, object[] args)

Asserts that the file exists. If it does not exist an AssertionException is thrown.

public static void Exists(string actual)

Asserts that the file exists. If it does not exist an AssertionException is thrown.

public static void ReferenceEquals(object a, object b)

DO NOT USE! The ReferenceEquals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.