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?
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?
It should be D, not C.
The point is about the attribute on top of the method, that should be [TestMethod]
The missing currentGold is a flaw in the code, I agree with you on that…
Answer has to be C. currentGold was never declared in D.
It should be D, not C.
The point is about the attribute on top of the method, that should be [TestMethod]
The missing currentGold is a flaw in the code, I agree with you on that…
I think your right. ‘currentGold’ is never declared in D.
But ‘[UnitTest()] is wrong in C – so in my opinion the correct answer should be ‘B’.
Sorry. ‘IsEqual’ is not defined.
All aswers are wrong.
‘D’ would throw an exception because ‘totalGold’ is declared twice.
Yes, D is correct
Answer is D because there is no attribute [unittest()]