Class ReportTestRunner
Report test runner
Inherited Members
Namespace: PayrollEngine.Client.Test.Report
Assembly: PayrollEngine.Client.Test.dll
Syntax
public class ReportTestRunner : TestRunnerBase
Constructors
ReportTestRunner(PayrollHttpClient)
Initializes a new instance of the class
Declaration
public ReportTestRunner(PayrollHttpClient httpClient)
Parameters
| Type | Name | Description |
|---|---|---|
| PayrollHttpClient | httpClient | The payroll engine http client |
Methods
CreateTestContext(ReportTest)
Create the test context
Declaration
protected virtual Task<ReportTestContext> CreateTestContext(ReportTest reportTest)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportTest | reportTest | The test |
Returns
| Type | Description |
|---|---|
| Task<ReportTestContext> | The test context |
GetRegulationAsync(int, string)
Get regulation
Declaration
protected Task<Regulation> GetRegulationAsync(int tenantId, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| int | tenantId | The tenant id |
| string | name | The regulation name |
Returns
| Type | Description |
|---|---|
| Task<Regulation> |
InitTest(ReportTest, ReportTestContext)
Initialize the test
Declaration
protected virtual void InitTest(ReportTest reportTest, ReportTestContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportTest | reportTest | The test |
| ReportTestContext | context | The test context |
RunCustomTest<T>(T, ReportTestType, Type, MethodInfo, ReportTestContext)
Run the test
Declaration
protected virtual ReportScriptTestResult RunCustomTest<T>(T test, ReportTestType reportTestType, Type testType, MethodInfo testMethod, ReportTestContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| T | test | |
| ReportTestType | reportTestType | |
| Type | testType | |
| MethodInfo | testMethod | |
| ReportTestContext | context |
Returns
| Type | Description |
|---|---|
| ReportScriptTestResult |
Type Parameters
| Name | Description |
|---|---|
| T |
Exceptions
| Type | Condition |
|---|---|
| TestCompileException |
TestAsync(ReportTest)
Test case
Declaration
public virtual Task<ReportTestResult> TestAsync(ReportTest reportTest)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportTest | reportTest |
Returns
| Type | Description |
|---|---|
| Task<ReportTestResult> | The report test results |