Search Results for

    Show / Hide Table of Contents

    Class DirectoryAssert

    Asserts on Directories

    Inheritance
    object
    AssertBase
    DirectoryAssert
    Inherited Members
    AssertBase.ConvertMessageWithArgs(string, object[])
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Legacy
    Assembly: nunit.framework.legacy.dll
    Syntax
    public abstract class DirectoryAssert : AssertBase

    Constructors

    View Source

    DirectoryAssert()

    Declaration
    protected DirectoryAssert()

    Methods

    View Source

    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.

    Declaration
    public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual)
    Parameters
    Type Name Description
    DirectoryInfo expected

    A directory containing the value that is expected

    DirectoryInfo actual

    A directory containing the actual value

    View Source

    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.

    Declaration
    public static void AreEqual(DirectoryInfo expected, DirectoryInfo actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    DirectoryInfo expected

    A directory containing the value that is expected

    DirectoryInfo actual

    A directory containing the actual value

    string message

    The message to display if the directories are not equal

    object[] args

    Arguments to be used in formatting the message

    View Source

    AreNotEqual(DirectoryInfo?, DirectoryInfo?)

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

    Declaration
    public static void AreNotEqual(DirectoryInfo? expected, DirectoryInfo? actual)
    Parameters
    Type Name Description
    DirectoryInfo expected

    A directory containing the value that is expected

    DirectoryInfo actual

    A directory containing the actual value

    View Source

    AreNotEqual(DirectoryInfo?, DirectoryInfo?, string, params object?[]?)

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

    Declaration
    public static void AreNotEqual(DirectoryInfo? expected, DirectoryInfo? actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    DirectoryInfo expected

    A directory containing the value that is expected

    DirectoryInfo actual

    A directory containing the actual value

    string message

    The message to display if directories are not equal

    object[] args

    Arguments to be used in formatting the message

    View Source

    DoesNotExist(DirectoryInfo)

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

    Declaration
    public static void DoesNotExist(DirectoryInfo actual)
    Parameters
    Type Name Description
    DirectoryInfo actual

    A directory containing the actual value

    View Source

    DoesNotExist(DirectoryInfo, string, params object?[]?)

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

    Declaration
    public static void DoesNotExist(DirectoryInfo actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    DirectoryInfo actual

    A directory containing the actual value

    string message

    The message to display if directories are not equal

    object[] args

    Arguments to be used in formatting the message

    View Source

    DoesNotExist(string)

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

    Declaration
    public static void DoesNotExist(string actual)
    Parameters
    Type Name Description
    string actual

    The path to a directory containing the actual value

    View Source

    DoesNotExist(string, string, params object?[]?)

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

    Declaration
    public static void DoesNotExist(string actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    string actual

    The path to a directory containing the actual value

    string message

    The message to display if directories are not equal

    object[] args

    Arguments to be used in formatting the message

    View Source

    Exists(DirectoryInfo)

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

    Declaration
    public static void Exists(DirectoryInfo actual)
    Parameters
    Type Name Description
    DirectoryInfo actual

    A directory containing the actual value

    View Source

    Exists(DirectoryInfo, string, params object?[]?)

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

    Declaration
    public static void Exists(DirectoryInfo actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    DirectoryInfo actual

    A directory containing the actual value

    string message

    The message to display if directories are not equal

    object[] args

    Arguments to be used in formatting the message

    View Source

    Exists(string)

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

    Declaration
    public static void Exists(string actual)
    Parameters
    Type Name Description
    string actual

    The path to a directory containing the actual value

    View Source

    Exists(string, string, params object?[]?)

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

    Declaration
    public static void Exists(string actual, string message, params object?[]? args)
    Parameters
    Type Name Description
    string actual

    The path to a directory containing the actual value

    string message

    The message to display if directories are not equal

    object[] args

    Arguments to be used in formatting the message

    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0