Show / Hide Table of Contents

    Class ExceptionAssert

    Class that contains extensions for asserting exceptions.

    Inheritance
    System.Object
    ExceptionAssert
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Common.TestingUtilities
    Assembly: Fibula.Common.TestingUtilities.dll
    Syntax
    public static class ExceptionAssert

    Methods

    | Improve this Doc View Source

    Throws<T>(Action, String)

    Checks that the function supplied throws an exception of type T.

    Declaration
    public static T Throws<T>(Action action, string message = null)
        where T : Exception
    Parameters
    Type Name Description
    System.Action action

    The function to test.

    System.String message

    Optional. The message that the caught exception should contain.

    Returns
    Type Description
    T

    The exception that was thrown.

    Type Parameters
    Name Description
    T

    The expected type in the exception thrown.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.