DirectoryAssert
Asserts on Directories
using NUnit.Framework.Constraints;
using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
namespace NUnit.Framework.Legacy
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class DirectoryAssert : AssertBase
{
[EditorBrowsable(EditorBrowsableState.Never)]
public new static bool Equals(object a, object b)
{
throw new InvalidOperationException("DirectoryAssert.Equals should not be used. Use DirectoryAssert.AreEqual instead.");
}
[EditorBrowsable(EditorBrowsableState.Never)]
public new static void ReferenceEquals(object a, object b)
{
throw new InvalidOperationException("DirectoryAssert.ReferenceEquals should not be used.");
}
public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual, string message, [System.Runtime.CompilerServices.Nullable(2)] params object[] args)
{
ClassicAssert.AreEqual(expected, actual, message, args);
}
public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual)
{
AreEqual(expected, actual, string.Empty, null);
}
[System.Runtime.CompilerServices.NullableContext(2)]
public static void AreNotEqual(DirectoryInfo expected, DirectoryInfo actual, [System.Runtime.CompilerServices.Nullable(1)] string message, params object[] args)
{
ClassicAssert.AreNotEqual(expected, actual, message, args);
}
[System.Runtime.CompilerServices.NullableContext(2)]
public static void AreNotEqual(DirectoryInfo expected, DirectoryInfo actual)
{
AreNotEqual(expected, actual, string.Empty, null);
}
public static void Exists(DirectoryInfo actual, string message, [System.Runtime.CompilerServices.Nullable(2)] params object[] args)
{
Assert.That(actual, new FileOrDirectoryExistsConstraint().IgnoreFiles, () => AssertBase.ConvertMessageWithArgs(message, args), "actual", "new FileOrDirectoryExistsConstraint().IgnoreFiles");
}
public static void Exists(DirectoryInfo actual)
{
Exists(actual, string.Empty, null);
}
public static void Exists(string actual, string message, [System.Runtime.CompilerServices.Nullable(2)] params object[] args)
{
Assert.That(actual, new FileOrDirectoryExistsConstraint().IgnoreFiles, () => AssertBase.ConvertMessageWithArgs(message, args), "actual", "new FileOrDirectoryExistsConstraint().IgnoreFiles");
}
public static void Exists(string actual)
{
Exists(actual, string.Empty, null);
}
public static void DoesNotExist(DirectoryInfo actual, string message, [System.Runtime.CompilerServices.Nullable(2)] params object[] args)
{
Assert.That(actual, new NotConstraint(new FileOrDirectoryExistsConstraint().IgnoreFiles), () => AssertBase.ConvertMessageWithArgs(message, args), "actual", "new NotConstraint(new FileOrDirectoryExistsConstraint().IgnoreFiles)");
}
public static void DoesNotExist(DirectoryInfo actual)
{
DoesNotExist(actual, string.Empty, null);
}
public static void DoesNotExist(string actual, string message, [System.Runtime.CompilerServices.Nullable(2)] params object[] args)
{
Assert.That(actual, new NotConstraint(new FileOrDirectoryExistsConstraint().IgnoreFiles), () => AssertBase.ConvertMessageWithArgs(message, args), "actual", "new NotConstraint(new FileOrDirectoryExistsConstraint().IgnoreFiles)");
}
public static void DoesNotExist(string actual)
{
DoesNotExist(actual, string.Empty, null);
}
}
}