Interface ITestLogger<T>
Mock Logger used to capture/test logs within a given class
Namespace: BlazorFocused.Tools
Assembly: BlazorFocused.Tools.dll
Syntax
public interface ITestLogger<T>
Type Parameters
Name | Description |
---|---|
T | Type of class utilizing logger |
Methods
| Improve this Doc View SourceVerifyWasCalled()
Verify logger was called at any level
Declaration
void VerifyWasCalled()
VerifyWasCalledWith(LogLevel)
Verify logger was called with a given level
Declaration
void VerifyWasCalledWith(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | Expected level of expected log entry |
VerifyWasCalledWith(LogLevel, String)
Verify logger was called with a given level and message
Declaration
void VerifyWasCalledWith(LogLevel logLevel, string message)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | Expected level of expected log entry |
System.String | message | Expected message of expected log entry |
VerifyWasCalledWith<TException>(LogLevel, TException, String)
Verify logger was called with a given level, exception, and message
Declaration
void VerifyWasCalledWith<TException>(LogLevel logLevel, TException exception, string message)
where TException : Exception
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | Expected level of log entry |
TException | exception | Expected exception given within log entry |
System.String | message | Expected message given with log entry |
Type Parameters
Name | Description |
---|---|
TException | Type of Exception in log entry |
VerifyWasCalledWithException<TException>(LogLevel)
Verify logger was called with a given level and exception
Declaration
void VerifyWasCalledWithException<TException>(LogLevel logLevel)
where TException : Exception
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | Expected level of log entry |
Type Parameters
Name | Description |
---|---|
TException | Type of exception in log entry |