gao-artur / WorkerService.Testing

Adoption of Microsoft.AspNetCore.Mvc.Testing for Worker service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WorkerService.Testing

Adoption of Microsoft.AspNetCore.Mvc.Testing for Worker service. It's compatible with .Net Core 3.1.

Installation

Option 1 (preferred):

Pack WorkerService.Testing project in nuget package and install it using your preferred way.

Option 2:

Add WorkerService.Testing as a project reference to integration test project and import WorkerService.Testing.targets. Add this line to the end of integration tests csproj file:

<Import Project="../WorkerService.Testing/WorkerService.Testing.targets" />

Usage

The usage almost similar to Microsoft.AspNetCore.Mvc.Testing. The main difference is that you should call StartAsync() method to start the host. Check WorkerService.Testing.IntegrationTests project for usage example.

About

Adoption of Microsoft.AspNetCore.Mvc.Testing for Worker service

License:Apache License 2.0


Languages

Language:C# 100.0%