Replies: 1 comment 1 reply
-
I'm not sure I fully understand the issue you are describing, but generally I don't want to test external packages/dependencies, so I don't bother to isolate flag parsing and make it truly testable. If, for some reason, you do - just make the parseFlag func and test it with a usual unit test. Test_Main is not a unit test, but rather integration test making sure the whole app started properly and responds reasonably |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I research you code for borrow some approach in my project and i don't understand some way in
Test_Main
.If some flags will has error when
Parse
method doing, whole test exitos.Exit(2)
and test doesn't complete successfully (without error or any callback).Or is this test doesn't imply for testing with incorrect flags?
I'm thinking this isn't graceful way for test, or I misunderstand something.
Beta Was this translation helpful? Give feedback.
All reactions