Share via

How to test a method which contains WriteVerbose()?

NewCodee 1 Reputation point
2021-09-22T06:25:08.63+00:00

I have the following sample piece of code in c# -

public void MyMethod() {

   WriteVerbose("My Statement");

}

How should I write a testmethod for this using MSTest?

WriteVerbose() is from CmdletProvider

Developer technologies | Visual Studio | Testing
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.