StreamDeckToolkit icon indicating copy to clipboard operation
StreamDeckToolkit copied to clipboard

Unit tests needed

Open csharpfritz opened this issue 6 years ago • 7 comments

We need to start testing and ensuring the API continues to work properly

csharpfritz avatar Jan 17 '19 14:01 csharpfritz

We will create a /tests folder to hold the unit tests

csharpfritz avatar Jan 18 '19 12:01 csharpfritz

@csharpfritz do you have any preference for UnitTest framework? Mocking framework or DI for this? Do you want to keep it vanilla .net core or are you open to other options?

SimonGeering avatar Jan 21 '19 22:01 SimonGeering

I like xunit and Moq.

I don’t think a DI Framework is needed.

What other options do you have in mind?

Jeff

On Jan 21, 2019, at 17:44, Simon Geering [email protected] wrote:

@csharpfritz do you have any preference for UnitTest framework? Mocking framework or DI for this? Do you want to keep it vanilla .net core or are you open to other options?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

csharpfritz avatar Jan 21 '19 23:01 csharpfritz

I didn't have anything specific in mind, rather I'm happy to go with whatever you feel like using just didn't know what you were thinking. I'll have a play and see where I get, though I'm happy if someone else wants to jump in on this ahead of me.

SimonGeering avatar Jan 21 '19 23:01 SimonGeering

I have managed to get an initial stab at a unit test project into the solution with XUnit, Moq and FluentAssertions but since it is now silly o'clock in the morning here in the UK, and my forked branch is behind FritzAndFriends, a PR will have to wait until tomorrow when I have time to pull changes integrate and re-test a build. The commit that will form the PR is here if you wanted a look before then 3433f53

SimonGeering avatar Jan 22 '19 00:01 SimonGeering

@csharpfritz Any objections to an additional two references in the test project?

  1. A PackageReference to the NuGet package https://www.nuget.org/packages/coverlet.msbuild/
  2. A DotNetCliToolReference to https://www.nuget.org/packages/dotnet-reportgenerator-cli/

These combined will give us cross-platform support for code coverage statistics creation and reporting which will work from both VSCode and later be something we can hook into as part of the CI pipeline from the dotnet CLI

SimonGeering avatar Jan 22 '19 20:01 SimonGeering

Sounds fine to me

Jeff

On Jan 22, 2019, at 15:47, Simon Geering [email protected] wrote:

@csharpfritz Any objections to an additional two references in the test project?

A PackageReference to the NuGet package https://www.nuget.org/packages/coverlet.msbuild/ A DotNetCliToolReference to https://www.nuget.org/packages/dotnet-reportgenerator-cli/ These combined will give us cross-platform support for code coverage statistics creation and reporting which will work from both VSCode and later be something we can hook into as part of the CI pipeline from the dotnet CLI

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

csharpfritz avatar Jan 22 '19 20:01 csharpfritz