Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TestCleanupAttribute Constructor ()

 

Initializes a new instance of the TestCleanupAttribute class.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public:
TestCleanupAttribute()

Legacy Code Example

The SampleClassLib namespace contains the DivideClass class, which in turn contains the method we want to test. This method is called DivideMethod().

No code example is currently available or this language may not be supported.

In the following code, the DivideClassTest test class contains a test method called DivideMethodTest. This code also contains attributes that control the initialization and clean-up execution order for the method, class, and assembly.

In particular, note the TestCleanup attribute on the Cleanup() method.

No code example is currently available or this language may not be supported.
Return to top
Show: