Table of Contents

Class CaptureConsoleAttribute

Namespace
Xunit
Assembly
xunit.v3.core.dll

Captures Console output (Out and/or Error) and reports it to the test output helper.

[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
public sealed class CaptureConsoleAttribute : BeforeAfterTestAttribute, IBeforeAfterTestAttribute
Inheritance
CaptureConsoleAttribute
Implements
Inherited Members

Properties

CaptureError

Gets or sets a flag to indicate whether to override Error.

CaptureOut

Gets or sets a flag to indicate whether to override Out (which includes the Write and WriteLine methods on Console).

Methods

Before(MethodInfo, IXunitTest)

This method is called before the test method is executed.