Is unit testing just for public return function only? it will not include void function (no return value)? or private return function?
Hi KatieNgoc,
Yes you can test void return type method.
Refer below links.
https://stackoverflow.com/questions/105007/should-i-test-private-methods-or-only-public-ones
https://www.toptal.com/qa/how-to-write-testable-code-and-why-it-matters
https://stackoverflow.com/questions/246038/unit-testing-void-methods
https://www.c-sharpcorner.com/blogs/how-to-unit-test-a-method-that-return-void-type1
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.