Assert.

Fail(string, object[]) Method

Summary

Throws a TCLite.AssertionException with the message and arguments provided, ending the running test immediately and reporting it as a Failure.
Namespace
TCLite
Containing Type
Assert

Syntax

public static void Fail(string message = null, params object[] args)

Remarks

The Assert.Fail method allows you to immediately end the test, recording it as failed. Use of Assert.Fail allows you to generate failure messages for tests that are not encapsulated by the other Assert methods. It is also useful in developing your own project-specific assertions.

Parameters

Name Type Description
message string The failure message
args object[] Arguments used format the message

Return Value

Type Description
void