コード例 #1
0
 /** Tests an invalid lookup */
 public void testGetInvalidField() {
   String field = "Bad fieldname";
   try {
     sms.getAttribute(field);
     fail("Should raise an IllegalArgumentException");
   } catch (IllegalArgumentException e) {
   }
 }
コード例 #2
0
 /** Tests the lookup of the message text */
 public void testGetData_Text() {
   String field = SMSReceivedEvent.ATTRIB_MESSAGE_TEXT;
   assertEquals(TestData.TEST_MESSAGE_TEXT, sms.getAttribute(field));
 }
コード例 #3
0
 /** Tests the lookup of the sender's phone number */
 public void testGetData_Phone() {
   String field = SMSReceivedEvent.ATTRIB_PHONE_NO;
   assertEquals(TestData.TEST_PHONE_NO, sms.getAttribute(field));
 }