Search code examples
c#unit-testingmstestassert

In MSTest, what does the second argument in Assert.Fail do?


In MS's docs they mention the following:

Fail(String, Object[])

public static void Fail (string message, params object[] parameters);

Parameters

message
    String 

The message to include in the exception. The message is shown in test results.

parameters
    Object[] 

An array of parameters to use when formatting message.

It doesn't mention in detail what does the parameters argument do. Everything I put in there doesn't show up in the error message, so what does it do?


Solution

  • I figured it out. In the source code it's clear that it just works like string.Format.