You are developing an ASP.NET MVC web application that includes the following method.
You need to test the GoldMined method.
Which unit test should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
You are developing an ASP.NET MVC web application that includes the following method.
You need to test the GoldMined method.
Which unit test should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
I’ll go with C as in D totalGold is defined twice
The method should have the [TestMethod()] attribute, not the [UnitTest()] attribute so C is wrong answer for sure.
There is no IsEqual() assertion so B is also wrong.
IsTrue assertion needs a condition so A is also wrong
D is the correct answer but it contains a typo