diff options
author | Tuan Nguyen <tnguy238@ford.com> | 2017-05-30 09:19:04 -0700 |
---|---|---|
committer | Tuan Nguyen <tnguy238@ford.com> | 2017-05-30 09:19:04 -0700 |
commit | 075cf44626eaf8eaeb4515770e04397ef21ecda5 (patch) | |
tree | 8942c93c325ea45d9d765737f83480c62dd81a65 | |
parent | 89dba78bfa107743e7db6e7db8323c3ae0bc56c1 (diff) | |
download | sdl_android-075cf44626eaf8eaeb4515770e04397ef21ecda5.tar.gz |
#466 Appropriately fail test case when catching expected exception.
-rw-r--r-- | sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java index f4f6bd519..282c01357 100644 --- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java +++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java @@ -76,6 +76,8 @@ import com.smartdevicelink.proxy.rpc.enums.Language; import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason; import com.smartdevicelink.transport.BaseTransportConfig; +import junit.framework.Assert; + import java.util.Vector; public class SdlProxyBaseTests extends AndroidTestCase{ @@ -113,6 +115,17 @@ public class SdlProxyBaseTests extends AndroidTestCase{ proxy = builder.build(); } catch (Exception e) { Log.v(TAG, "Exception in testNullSdlProxyConfigurationResources, testing null SdlProxyConfigurationResources"); + Assert.fail("Exception in testNullSdlProxyConfigurationResources, testing null SdlProxyConfigurationResources"); + } + + //Construct with a non-null SdlProxyConfigurationResources and a null TelephonyManager + config.setTelephonyManager(null); + builder.setSdlProxyConfigurationResources(config); + try { + proxy = builder.build(); + } catch (Exception e) { + Log.v(TAG, "Exception in testNullSdlProxyConfigurationResources, testing null TelephonyManager"); + Assert.fail("Exception in testNullSdlProxyConfigurationResources, testing null TelephonyManager"); } } |