What should you do?

You are an enterprise application developer. You plan to create unit tests for an ASP.NET application. You need to ensure that all the resources that are obtained by the assembly during the unit tests are released. What should you do?

You are an enterprise application developer. You plan to create unit tests for an ASP.NET application. You need to ensure that all the resources that are obtained by the assembly during the unit tests are released. What should you do?

A.
Implement the IDisposable interface in each class.Release the resources in the Dispose method.

B.
Define a method to release the resources after all the tests in each class are run.Decorate the method by using the TestCleanUp attribute.

C.
Define a method to release the resources after all the tests in each class are run.Decorate the method by using the ClassCleanUp attribute.

D.
Define a method to release the resources after all the tests in the assembly are run.Decorate the method by using the AssemblyCleanUp attribute.



Leave a Reply 0

Your email address will not be published. Required fields are marked *