How to test a method which contains WriteVerbose()?

NewCodee 1 Reputation point

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

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.
8,190 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
284 questions
{count} votes