dotnet / dotnet/command-line-api

How do we unit test it?

Open
#1,583 8 comments 2 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 would like to add tests for my command line parser.
How de we do it? Is there a sample about how to do this properly?

My goal **is not** to test the whole application, of course (since I'm talking about unit testing), but only that a given command line (string) will fire the expected handler with the correct parameters.

I would also want to emphasize on testing invalid inputs, too.

Thanks in advance and congratulations. This is a great library!

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.