HOTSPOT -
You are building an ASP.NET application. You develop the following unit test code. Line numbers are included for reference only.
01 [TestClass]
02 public class UnitTest1
03 {
04 protected string _name;
05 protected float _expenses;
06 protected float _income;
07 protected float _payment;
08 protected float _balance;
09 public void AddCustomer(string name, float income, float payment, float balance)
10 {
11 _name = name;
12 _expenses = expenses;
13 _income = income;
14 _payment = payment;
15 _balance = balance;
16 CheckName();
17 DebRatio();
18 CheckBalance();
19 }
20 [TestMethod]
21 public void CheckName()
22 {
23 Assert.IsNotNull(_name, "CheckName failed unit test");
24 }
25 [TestMethod]
26 public void DebRatio()
27 {
28 Assert.AreSame(_income, _payment, "DebRatio failed unit test");
29 }
30 [TestMethod]
31 public void CheckBalance()
32 {
33 Assert.IsTrue(_balance >= 0.0f, Check balance failed unit test.");
34 }
35}
You run the following line of code:
AddCustomer("Contoso", 0, 100, 100, -1);
You need to evaluate the unit test results. For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Hot Area:
ex
Highly Voted 5 years, 7 months agoAghie
Highly Voted 5 years, 10 months agoLeodolz
Most Recent 4 years, 5 months agonorthgaterebel
4 years, 5 months agowel
4 years, 6 months agoTimboJones
4 years, 8 months agoelevator44
4 years, 9 months agomr_
5 years agorhysabray
5 years, 3 months agoOS
5 years, 10 months agoAghie
5 years, 10 months ago