public void simplePhoneServiceTest()
 {
     PhoneService service = new PhoneService();
     ICollection<PhoneModel> phones = service.listPhonesByUser(1);
     foreach (PhoneModel phone in phones) {
         Assert.AreEqual(1, phone.applicantId);
         if (phone.phoneCd.ToUpper().Equals("HM")){
             Assert.AreEqual(5028011112, phone.phoneNumber);
         }
     }
 }
示例#2
0
 public void simplePhoneServiceTest()
 {
     IPhoneService service = new PhoneService();
     ICollection<PhoneModel> phones = service.listPhonesByUser(1);
     bool hasPhones = false;
     foreach (PhoneModel phone in phones) {
         hasPhones = true;
         Assert.AreEqual(1, phone.applicantId);
         if (phone.phoneCd.ToUpper().Equals("HM")){
             Assert.AreEqual(5028011112, phone.phoneNumber);
         }
     }
     Assert.AreEqual(true, hasPhones, "No Phones were returned from the service call.");
 }