AssertException

Overview

Represents a special exception that is thrown by the Assert class to signal assertation failure and handled by the Runner core.

Instead of using this exception directly you can use methods of the Assert class to detect and singal about failed tests.

For example, all following methods will throw AssertException:

Assert.IsTrue(False); 
Assert.IsEmpty("abc");
Assert.Fail("Test failed");

Location

Properties


Message  virtual    (declared in BaseException) Toffee

 

var Message: String { get{} }

ParsableMessage  virtual    (declared in BaseException)

 

property ParsableMessage: String read;

 

String ParsableMessage { get; }

 

var ParsableMessage: String { get{} }

 

String ParsableMessage { __get; }

 

ReadOnly Property ParsableMessage() As String

Instance Methods


constructor .NET, .NET Standard 2.0, Cooper, Island, macOS

 

constructor(aMessage: String; aFile: String; aLine: Int32; aClass: String; aMethod: String; aType: String)

 

AssertException(String aMessage, String aFile, Int32 aLine, String aClass, String aMethod, String aType)

 

init(_ aMessage: String, _ aFile: String, _ aLine: Int32, _ aClass: String, _ aMethod: String, _ aType: String)

 

AssertException(String aMessage, String aFile, Integer aLine, String aClass, String aMethod, String aType)

 

Sub New(aMessage As String, aFile As String, aLine As Int32, aClass As String, aMethod As String, aType As String)

Parameters:

  • aMessage:
  • aFile:
  • aLine:
  • aClass:
  • aMethod:
  • aType: