dotnet / dotnet/command-line-api

Changes needed so ICommandHandler classes are testable

Open
#1,634 1 comment 0 reactions 0 assignees View on GitHub
needs documentation question
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

I'm using Beta 2, so please excuse (ignore) me if this has already been addressed.

The ICommandHandler.InvokeAsync method takes an InvocationContext parameter. Unfortunately, I couldn't find a way to instantiate an InvocationContext in my unit tests, so I couldn't suss out how to test it...

Perhaps, this parameter could be changed to an interface?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.