Class StackResult
Used to display the stack
class StackResult
: fluentasserts.core.results.IResult
;
Methods
Name | Description |
print
(printer)
|
Prints the stack using the default writer
|
toString
()
|
Converts the result to a string
|
Example
The stack result should display the stack in a readable form
Throwable exception;
try
{
assert(false, "random message");
}
catch (Throwable t)
{
exception = t;
}
auto result = new StackResult(exception.info).toString;
result.should.startWith("Stack trace:\n-------------------\n...");
result.should.endWith("\n...");
}