PrepAway - Latest Free Exam Questions & Answers

Which five actions should you perform in sequence?

DRAG DROP
You are building an ASP.NET application for a purchasing system.
The application has a method named CalculateBalance in the Purchasing class.
You need to create a unit test for the CalculateBalance method.
Which five actions should you perform in sequence? To answer, move the appropriate actions from the list of
actions to the answer area and arrange them in the correct order.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Step 1: Select the Purchasing Project and add a new Unit Test Project.
First we create a Unit Test Project within the current project.
Step 2:

You can turn an existing unit test into an ASP.NET unit test by configuring it, that is, by assigning values to
certain of the test’s custom attributes. You set these values in the code file that contains the unit test.
All unit tests require the [TestMethod] attribute.
Step 3: Build the solution
Step 4: Run all tests
Step 5: Debug the solution
After you run a unit test, if you chose to edit the test run configuration when you ran the test, you can open the
Code Coverage window to see what percentage of the methods in the code that you are testing were covered
by your unit tests.Incorrect:
Not:

You do not set up testing by creating copies of methods.
https://msdn.microsoft.com/en-us/library/ms182526(v=vs.90).aspx

4 Comments on “Which five actions should you perform in sequence?

  1. Vincent says:

    2. Create a reference to the Purchasing project in the unit test project. Then create a test class that has a copy of…….

    This step is half correct. You need to create a reference, but you do not have to create a copy of the method.




    11



    1
  2. ekramy says:

    Correct answer is :
    1. Select the Purchasing project and add a new Unit test project

    2. Create a reference to the Purchasing project in the unit test project. Then create a test class that has a copy of…….

    3. Add the TestClass attribute to the test class and the…..

    4. Run all tests

    5. Debug the solution




    11



    4

Leave a Reply