/joke-generator

template project for dotnet console applications

Primary LanguageC#MIT LicenseMIT

README

Build status

Installation

Install dotnet core using the dotnet-install script

./dotnet-install.sh -Version 3.1.201
git clone git@github.com:hekar/joke-generator.git
dotnet restore

Execute

dotnet run

Testing

The project only contains unit tests. Integration tests will need to be added in the future. There would need to a mechanism to mock the console and web server.

Execute Unit Tests

cd JokeGeneratorUnitTests
dotnet test

Code Coverage (dotcover)

Dotcover gathers code coverage results.

Install Dotnet 2.2.x

Dotcover requires dotnet core 2.2.x.

./dotnet-install.sh -Version 2.2.207

Analyze Coverage

cd JokeGeneratorUnitTests
dotnet dotcover test --dotCoverXml=coverage.xml
View Results

The default coverage.xml generates an HTML report under JokeGeneratorUnitTests/dotCover.html.

xdg-open JokeGeneratorUnitTests/dotCover.html