summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyen, Tuan (T.N.) <tnguy238@ford.com>2017-05-09 11:46:19 -0700
committerTuan Nguyen <tnguy238@ford.com>2017-05-24 09:01:40 -0700
commitbc70355fe25ccc939bfbccd5651747345bde6a3b (patch)
treeed5e56c00dfaedd4053e621756948c1fdf0cf09b
parentdcf661d204aaf10210e33bda2882d887b2c8a154 (diff)
downloadsdl_android-bugfix/issue_465.tar.gz
#465 Add test casebugfix/issue_465
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java b/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java
index 9f0822a73..901a756a3 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java
@@ -6,6 +6,8 @@ import com.smartdevicelink.transport.enums.TransportType;
import android.test.AndroidTestCase;
+import junit.framework.Assert;
+
public class MultiplexTransportTest extends AndroidTestCase {
private static final int TIMEOUT = 2000;
@@ -69,8 +71,14 @@ public class MultiplexTransportTest extends AndroidTestCase {
trans = new MultiplexTransport(config,transportListener);
assertTrue(trans.brokerThread.isAlive());
-
-
-
+
+ // Send a null config object in the constructor and expect an IllegalArgumentException
+ try {
+ trans = new MultiplexTransport(null, transportListener);
+ } catch (IllegalArgumentException e) {
+ assertEquals("Null transportConfig in MultiplexTransport constructor", e.getMessage());
+ } catch (NullPointerException e) {
+ Assert.fail("NPE in MultiplexTransport constructor");
+ }
}
}