Summary
A simple base test class with logger, logger factory and diagnostic source all wired into the
Xunit.Abstractions.ITestOutputHelper.
- Assembly
- Rocket
.Surgery .Extensions .Testing .dll - Namespace
- Rocket
.Surgery .Extensions .Testing - Interfaces
-
- IDisposable
- Base Types
-
- Object
- Derived Types
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IDisposable"]
Type["LoggerTest"]
class Type type-node
Derived0["AutoFakeTest"]-->Type
click Derived0 "/api/Rocket.Surgery.Extensions.Testing/AutoFakeTest"
Derived1["AutoSubstituteTest"]-->Type
click Derived1 "/api/Rocket.Surgery.Extensions.Testing/AutoSubstituteTest"
Derived2["AutoMockTest"]-->Type
click Derived2 "/api/Rocket.Surgery.Extensions.Testing/AutoMockTest"
Syntax
public abstract class LoggerTest : IDisposable
Attributes
| Type | Description |
|---|---|
| Nullable |
|
| NullableAttribute | |
| PublicAPIAttribute |
Constructors
| Name | Summary |
|---|---|
| LoggerTest |
The default constructor with available logging level |
| LoggerTest |
The default constructor with available logging level |
| LoggerTest |
The default constructor with available logging level |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Disposables |
The
System.Reactive.Disposables.CompositeDisposable
|
Properties
| Name | Value | Summary |
|---|---|---|
| DiagnosticSource | DiagnosticSource |
The
DiagnosticSource
|
| Logger | ILogger |
The
Microsoft.Extensions.Logging.ILogger
|
| LoggerFactory | ILoggerFactory |
The
Microsoft.Extensions.Logging.ILoggerFactory
|
| LogStream | IObservable |
The
System.IObservable`1
|
| SerilogLogger | ILogger |
The
Microsoft.Extensions.Logging.ILogger
|
Methods
| Name | Value | Summary |
|---|---|---|
| CaptureLogs |
IDisposable |
Capture log outputs until the item is disposed
|
| CaptureLogs |
IDisposable |
Capture log outputs until the item is disposed
|
| CreateLoggerFactory |
ILoggerFactory |
Control the way that the serilog logger factory is created.
|
| ExcludeSourceContext |
void |
Filter a given source context from serilog
|
| IncludeSourceContext |
void |
Filter a given source context from serilog
|
Extension Methods
| Name | Value | Summary |
|---|---|---|
| SetBackingValue |
T |
Sets the backing value.
From ValueExtensions
|
| With |
TBuilder |
Adds the specified dictionary to the provided dictionary.
|
