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

C#
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.
10,235 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.
328 questions
{count} votes