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?
Yes exactly - answer D would be correct because of [TestMethod] and Assert.AreEqual. I saw that question with that answer somewhere else, but here is missing. A, B, C are simply wrong because of either Assert line or wrong attribute -> '[UnitTest]'.
This is the same question as an earlier one, altough the earler question used BankLoans or something instead of Gold Mined. The spirit of the question is the same though, the structur of a TestMethod. Option D isn't available as code, but it says Option D as a possible correct answer.
However, A is wrong because it uses Assert.True with two parameters, B is wrong because it's not public and C is wrong because it uses Unittest as Attribtue instead of TestMethod.
FINAL ANSWER: D is correct
The answer will look similar to C, the only difference would be the attribute at the top of the method. [TestMethod()] instead of [UnitTest()]. The big takeaway from this one is the use of AreEqual to compare between the two values.
Option is the right answer. How? There's no option D too choose...
upvoted 6 times
...
This section is not available anymore. Please use the main Exam Page.70-486 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
cccanseco
Highly Voted 5 years, 10 months agoSG
Highly Voted 5 years, 10 months agoLeodolz
Most Recent 4 years, 5 months agomr_
4 years, 11 months agoTimboJones
4 years, 7 months agogokhan
4 years, 12 months agoCaloy
5 years agohungry_ape9000
5 years agoVaginaraptor
5 years, 2 months agoAyeshaKhalid
4 years, 4 months agoAT_TW
5 years, 3 months agopeterluttikhuis
5 years, 10 months ago