Class ToolsBuilder
Provides implementations of ISimulatedHttp and ITestLogger<T> for testing
Inheritance
System.Object
ToolsBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: BlazorFocused.Tools
Assembly: BlazorFocused.Tools.dll
Syntax
public static class ToolsBuilder
Methods
| Improve this Doc View SourceCreateSimulatedHttp(String)
Provides implementations of ISimulatedHttp for testing
Declaration
public static ISimulatedHttp CreateSimulatedHttp(string baseAddress = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseAddress |
Returns
Type | Description |
---|---|
ISimulatedHttp |
CreateTestLogger<T>(Action<LogLevel, String, Exception>)
Provides implementations of ITestLogger<T> for testing
Declaration
public static ITestLogger<T> CreateTestLogger<T>(Action<LogLevel, string, Exception> logAction = null)
Parameters
Type | Name | Description |
---|---|---|
Action<LogLevel, System.String, Exception> | logAction | Optional: Execute this action every time a log occurs. This is useful when using test output helpers (i.e. XUnit ITestOutputHelper) or event tracking |
Returns
Type | Description |
---|---|
ITestLogger<T> |
Type Parameters
Name | Description |
---|---|
T | Logger class used in test ( |