diff options
author | Mikayla Ray <mikayla@livioconnect.com> | 2015-05-29 11:26:32 -0400 |
---|---|---|
committer | Mikayla Ray <mikayla@livioconnect.com> | 2015-05-29 11:26:32 -0400 |
commit | 7452dda2bd9839c885b4f6f162a588a2dc13a510 (patch) | |
tree | ab2d3d289220a2a9691c29a2c97c43a9c1f91ddc | |
parent | c91d4534cd3e14d7be659ef6a2007570d8e82d86 (diff) | |
download | sdl_android-7452dda2bd9839c885b4f6f162a588a2dc13a510.tar.gz |
Updated and documented more unit tests.
8 files changed, 546 insertions, 1455 deletions
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/protocol/heartbeat/HeartbeatMonitorTests.java b/sdl_android_tests/src/com/smartdevicelink/test/protocol/heartbeat/HeartbeatMonitorTests.java index 640568e53..0b5524786 100644 --- a/sdl_android_tests/src/com/smartdevicelink/test/protocol/heartbeat/HeartbeatMonitorTests.java +++ b/sdl_android_tests/src/com/smartdevicelink/test/protocol/heartbeat/HeartbeatMonitorTests.java @@ -5,20 +5,27 @@ import java.util.TimerTask; import com.smartdevicelink.protocol.heartbeat.HeartbeatMonitor; import com.smartdevicelink.protocol.heartbeat.IHeartbeatMonitorListener; +import com.smartdevicelink.test.Test; import junit.framework.TestCase; +/** + * This is a unit test class for the SmartDeviceLink library project class : + * {@link com.smartdevicelink.protocol.heartbeat.HeartbeatMonitor} + */ public class HeartbeatMonitorTests extends TestCase { + // TODO : Proper thread testing. + private HeartbeatMonitor monitor = new HeartbeatMonitor(); private Runnable testRunnable; private Timer timer; public void testValues () { - assertNotNull("HeartbeatMonitor returned null", monitor); + assertNotNull(Test.NOT_NULL, monitor); testRunnable = monitor.getHeartbeatRunnable(); - assertNotNull("HeartbeatTimeoutRunnable returned null", testRunnable); + assertNotNull(Test.NOT_NULL, testRunnable); int testInterval = 100; monitor.setInterval(testInterval); @@ -28,7 +35,7 @@ public class HeartbeatMonitorTests extends TestCase { public void testThread () { try { Thread testThread = new Thread(testRunnable); - assertNotNull("Thread was null", testThread); + assertNotNull(Test.NOT_NULL, testThread); setTimeout(5000, testThread); // Cannot leave thread hanging testThread.start(); @@ -59,9 +66,4 @@ public class HeartbeatMonitorTests extends TestCase { // monitor.heartbeatACKReceived(); // Sets the ack boolean flag // assertTrue("ACK value was not true", monitor.getACKReceived()); } - - // TODO: Test notifyTransportActivity() method - // TODO: Test heartbeatTimeoutRunnable execution code - // TODO: Test start/stop thread methods - }
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/InternalProxyMessageTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/InternalProxyMessageTests.java index 1e14245a1..f5baf5e06 100644 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/InternalProxyMessageTests.java +++ b/sdl_android_tests/src/com/smartdevicelink/test/proxy/InternalProxyMessageTests.java @@ -1,30 +1,35 @@ package com.smartdevicelink.test.proxy; import com.smartdevicelink.proxy.callbacks.InternalProxyMessage; +import com.smartdevicelink.test.Test; import junit.framework.TestCase; +/** + * This is a unit test class for the SmartDeviceLink library project class : + * {@link com.smartdevicelink.proxy.callbacks.InternalProxyMessage} + */ public class InternalProxyMessageTests extends TestCase { + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.callbacks.InternalProxyMessage#InternalProxyMessage(String)} + */ public void testValues () { + // Valid Tests String test = "functionName"; InternalProxyMessage testIPM = new InternalProxyMessage(test); - assertEquals("Function name did not match expected value.", test, - testIPM.getFunctionName()); - - testIPM = new InternalProxyMessage(null); - assertNull("Function name was not null", testIPM.getFunctionName()); + assertEquals(Test.MATCH, test, testIPM.getFunctionName()); test = "OnProxyError"; - assertEquals("OnProxyError did not match expected value.", test, - InternalProxyMessage.OnProxyError); - + assertEquals(Test.MATCH, test, InternalProxyMessage.OnProxyError); test = "OnProxyOpened"; - assertEquals("OnProxyOpened did not match expected value.", test, - InternalProxyMessage.OnProxyOpened); - + assertEquals(Test.MATCH, test, InternalProxyMessage.OnProxyOpened); test = "OnProxyClosed"; - assertEquals("OnProxyClosed did not match expected value.", test, - InternalProxyMessage.OnProxyClosed); + assertEquals(Test.MATCH, test, InternalProxyMessage.OnProxyClosed); + + // Invalid/Null Tests + testIPM = new InternalProxyMessage(null); + assertNull(Test.NULL, testIPM.getFunctionName()); } }
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/LockScreenManagerTest.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/LockScreenManagerTest.java index 77747fdc5..ceba82f36 100644 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/LockScreenManagerTest.java +++ b/sdl_android_tests/src/com/smartdevicelink/test/proxy/LockScreenManagerTest.java @@ -6,118 +6,137 @@ import com.smartdevicelink.proxy.LockScreenManager; import com.smartdevicelink.proxy.rpc.OnLockScreenStatus; import com.smartdevicelink.proxy.rpc.enums.HMILevel; import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus; +import com.smartdevicelink.test.Test; +/** + * This is a unit test class for the SmartDeviceLink library project class : + * {@link com.smartdevicelink.proxy.LockScreenManager} + */ public class LockScreenManagerTest extends TestCase{ - private static final String ERROR_MSG = "Input value didn't match result."; + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.LockScreenManager#setDriverDistStatus(boolean)} + */ public void testDriverDistStatus(){ LockScreenManager lockMan = new LockScreenManager(); lockMan.setDriverDistStatus(true); - assertEquals(ERROR_MSG, true, (boolean) lockMan.getLockObj().getDriverDistractionStatus()); + assertEquals(Test.MATCH, true, (boolean) lockMan.getLockObj().getDriverDistractionStatus()); lockMan.setDriverDistStatus(false); - assertEquals(ERROR_MSG, false, (boolean) lockMan.getLockObj().getDriverDistractionStatus()); + assertEquals(Test.MATCH, false, (boolean) lockMan.getLockObj().getDriverDistractionStatus()); } + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.LockScreenManager#setHMILevel(HMILevel)} + */ public void testHmiLevelStatus(){ LockScreenManager lockMan = new LockScreenManager(); lockMan.setHMILevel(HMILevel.HMI_BACKGROUND); - assertEquals(ERROR_MSG, HMILevel.HMI_BACKGROUND, lockMan.getLockObj().getHMILevel()); + assertEquals(Test.MATCH, HMILevel.HMI_BACKGROUND, lockMan.getLockObj().getHMILevel()); lockMan.setHMILevel(HMILevel.HMI_FULL); - assertEquals(ERROR_MSG, HMILevel.HMI_FULL, lockMan.getLockObj().getHMILevel()); + assertEquals(Test.MATCH, HMILevel.HMI_FULL, lockMan.getLockObj().getHMILevel()); lockMan.setHMILevel(HMILevel.HMI_LIMITED); - assertEquals(ERROR_MSG, HMILevel.HMI_LIMITED, lockMan.getLockObj().getHMILevel()); + assertEquals(Test.MATCH, HMILevel.HMI_LIMITED, lockMan.getLockObj().getHMILevel()); lockMan.setHMILevel(HMILevel.HMI_NONE); - assertEquals(ERROR_MSG, HMILevel.HMI_NONE, lockMan.getLockObj().getHMILevel()); + assertEquals(Test.MATCH, HMILevel.HMI_NONE, lockMan.getLockObj().getHMILevel()); lockMan.setHMILevel(null); - assertNull(ERROR_MSG, lockMan.getLockObj().getHMILevel()); + assertNull(Test.NULL, lockMan.getLockObj().getHMILevel()); } - // test lock screen status when no setters are called + /** + * Test the lock screen status when no setter methods are called. + */ public void testLockScreenStatusNull(){ LockScreenManager lockMan = new LockScreenManager(); OnLockScreenStatus result = lockMan.getLockObj(); - assertNotNull(ERROR_MSG, result); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertNotNull(Test.NOT_NULL, result); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); } + /** + * Test the invalid settings of lock screen status. + */ public void testLockScreenStatusDriverDistNull(){ LockScreenManager lockMan = new LockScreenManager(); - // driver dist status is null - - // HMI level is null + OnLockScreenStatus result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_NONE); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_BACKGROUND); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_FULL); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.REQUIRED, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_LIMITED); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.REQUIRED, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen()); } + /** + * Test the enabled settings of lock screen status. + */ public void testLockScreenStatusDriverDistEnabled(){ LockScreenManager lockMan = new LockScreenManager(); lockMan.setDriverDistStatus(true); // HMI level is null OnLockScreenStatus result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_NONE); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_BACKGROUND); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_FULL); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.REQUIRED, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_LIMITED); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.REQUIRED, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen()); } + /** + * Test the disabled settings of lock screen status. + */ public void testLockScreenStatusDriverDistDisabled(){ LockScreenManager lockMan = new LockScreenManager(); lockMan.setDriverDistStatus(false); - // HMI level is null OnLockScreenStatus result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_NONE); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_BACKGROUND); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OFF, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_FULL); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OPTIONAL, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen()); lockMan.setHMILevel(HMILevel.HMI_LIMITED); result = lockMan.getLockObj(); - assertEquals(ERROR_MSG, LockScreenStatus.OPTIONAL, result.getShowLockScreen()); + assertEquals(Test.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen()); } - -} +}
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/RPCRequestFactoryTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/RPCRequestFactoryTests.java index 479f36994..df821c203 100644 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/RPCRequestFactoryTests.java +++ b/sdl_android_tests/src/com/smartdevicelink/test/proxy/RPCRequestFactoryTests.java @@ -53,11 +53,14 @@ import com.smartdevicelink.proxy.rpc.enums.Language; import com.smartdevicelink.proxy.rpc.enums.SamplingRate; import com.smartdevicelink.proxy.rpc.enums.TextAlignment; import com.smartdevicelink.proxy.rpc.enums.UpdateMode; +import com.smartdevicelink.test.Test; import com.smartdevicelink.test.Validator; +/** + * This is a unit test class for the SmartDeviceLink library project class : + * {@link com.smartdevicelink.proxy.RPCRequestFactory} + */ public class RPCRequestFactoryTests extends TestCase { - - private final String MSG = "Response value did not match tested value."; public void testBuildSystemRequest () { @@ -70,14 +73,14 @@ public class RPCRequestFactoryTests extends TestCase { testData = "test"; testInt = 0; testBSR = RPCRequestFactory.buildSystemRequest(testData, testInt); - assertNotNull(MSG, testBSR.getBulkData()); - assertEquals(MSG, testInt, testBSR.getCorrelationID()); + assertNotNull(Test.NOT_NULL, testBSR.getBulkData()); + assertEquals(Test.MATCH, testInt, testBSR.getCorrelationID()); testBSR = RPCRequestFactory.buildSystemRequest(testData, null); - assertNull(MSG, testBSR.getCorrelationID()); + assertNull(Test.NULL, testBSR.getCorrelationID()); testBSR = RPCRequestFactory.buildSystemRequest(null, testInt); - assertNull(MSG, testBSR); + assertNull(Test.NULL, testBSR); // Test -- buildSystemRequestLegacy(Vector<String> data, Integer correlationID) testVData = new Vector<String>(); @@ -85,14 +88,14 @@ public class RPCRequestFactoryTests extends TestCase { testVData.add("Test B"); testVData.add("Test C"); testBSR = RPCRequestFactory.buildSystemRequestLegacy(testVData, testInt); - assertEquals(MSG, testVData, new Vector<String>(testBSR.getLegacyData())); - assertEquals(MSG, testInt, testBSR.getCorrelationID()); + assertEquals(Test.MATCH, testVData, new Vector<String>(testBSR.getLegacyData())); + assertEquals(Test.MATCH, testInt, testBSR.getCorrelationID()); testBSR = RPCRequestFactory.buildSystemRequestLegacy(testVData, null); - assertNull(MSG, testBSR.getCorrelationID()); + assertNull(Test.NULL, testBSR.getCorrelationID()); testBSR = RPCRequestFactory.buildSystemRequestLegacy(null, testInt); - assertNull(MSG, testBSR); + assertNull(Test.NULL, testBSR); // Issue #166 -- Null values within the Vector<String> parameter. // TODO: Once resolved, add the following test. @@ -101,7 +104,7 @@ public class RPCRequestFactoryTests extends TestCase { //testVData.add("Test B"); //testVData.add(null); //testBSR = RPCRequestFactory.buildSystemRequestLegacy(testVData, testInt); - //assertNull(MSG, testBSR); + //assertNull(Test.NULL, testBSR); } public void testBuildAddCommand () { @@ -126,20 +129,20 @@ public class RPCRequestFactoryTests extends TestCase { testVrCommands.add("Test A"); testVrCommands.add("Test B"); testBAC = RPCRequestFactory.buildAddCommand(testCommandID, testMenuText, testParentID, testPosition, testVrCommands, testImage, testCorrelationID); - assertEquals(MSG, testCommandID, testBAC.getCmdID()); - assertEquals(MSG, testMenuText, testBAC.getMenuParams().getMenuName()); - assertEquals(MSG, testParentID, testBAC.getMenuParams().getParentID()); - assertEquals(MSG, testPosition, testBAC.getMenuParams().getPosition()); - assertEquals(MSG, testVrCommands, testBAC.getVrCommands()); - assertTrue(MSG, Validator.validateImage(testImage, testBAC.getCmdIcon())); - assertEquals(MSG, testCorrelationID, testBAC.getCorrelationID()); + assertEquals(Test.MATCH, testCommandID, testBAC.getCmdID()); + assertEquals(Test.MATCH, testMenuText, testBAC.getMenuParams().getMenuName()); + assertEquals(Test.MATCH, testParentID, testBAC.getMenuParams().getParentID()); + assertEquals(Test.MATCH, testPosition, testBAC.getMenuParams().getPosition()); + assertEquals(Test.MATCH, testVrCommands, testBAC.getVrCommands()); + assertTrue(Test.TRUE, Validator.validateImage(testImage, testBAC.getCmdIcon())); + assertEquals(Test.MATCH, testCorrelationID, testBAC.getCorrelationID()); testBAC = RPCRequestFactory.buildAddCommand(null, null, null, null, null, null, null); - assertNull(MSG, testBAC.getCmdID()); - assertNull(MSG, testBAC.getMenuParams()); - assertNull(MSG, testBAC.getVrCommands()); - assertNull(MSG, testBAC.getCmdIcon()); - assertNull(MSG, testBAC.getCorrelationID()); + assertNull(Test.NULL, testBAC.getCmdID()); + assertNull(Test.NULL, testBAC.getMenuParams()); + assertNull(Test.NULL, testBAC.getVrCommands()); + assertNull(Test.NULL, testBAC.getCmdIcon()); + assertNull(Test.NULL, testBAC.getCorrelationID()); // Test -- buildAddCommand(Integer commandID, String menuText, Integer parentID, Integer position, Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID) testIconValue = "icon"; @@ -148,59 +151,59 @@ public class RPCRequestFactoryTests extends TestCase { testImage.setValue(testIconValue); testImage.setImageType(testIconType); testBAC = RPCRequestFactory.buildAddCommand(testCommandID, testMenuText, testParentID, testPosition, testVrCommands, testIconValue, testIconType, testCorrelationID); - assertEquals(MSG, testCommandID, testBAC.getCmdID()); - assertEquals(MSG, testMenuText, testBAC.getMenuParams().getMenuName()); - assertEquals(MSG, testParentID, testBAC.getMenuParams().getParentID()); - assertEquals(MSG, testPosition, testBAC.getMenuParams().getPosition()); - assertEquals(MSG, testVrCommands, testBAC.getVrCommands()); - assertEquals(MSG, testCorrelationID, testBAC.getCorrelationID()); - assertTrue(MSG, Validator.validateImage(testImage, testBAC.getCmdIcon())); + assertEquals(Test.MATCH, testCommandID, testBAC.getCmdID()); + assertEquals(Test.MATCH, testMenuText, testBAC.getMenuParams().getMenuName()); + assertEquals(Test.MATCH, testParentID, testBAC.getMenuParams().getParentID()); + assertEquals(Test.MATCH, testPosition, testBAC.getMenuParams().getPosition()); + assertEquals(Test.MATCH, testVrCommands, testBAC.getVrCommands()); + assertEquals(Test.MATCH, testCorrelationID, testBAC.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateImage(testImage, testBAC.getCmdIcon())); testBAC = RPCRequestFactory.buildAddCommand(null, null, null, null, null, null, null, null); - assertNull(MSG, testBAC.getCmdID()); - assertNull(MSG, testBAC.getMenuParams()); - assertNull(MSG, testBAC.getVrCommands()); - assertNull(MSG, testBAC.getCmdIcon()); - assertNull(MSG, testBAC.getCorrelationID()); + assertNull(Test.NULL, testBAC.getCmdID()); + assertNull(Test.NULL, testBAC.getMenuParams()); + assertNull(Test.NULL, testBAC.getVrCommands()); + assertNull(Test.NULL, testBAC.getCmdIcon()); + assertNull(Test.NULL, testBAC.getCorrelationID()); // Test -- buildAddCommand(Integer commandID, String menuText, Integer parentID, Integer position, Vector<String> vrCommands, Integer correlationID) testBAC = RPCRequestFactory.buildAddCommand(testCommandID, testMenuText, testParentID, testPosition, testVrCommands, testCorrelationID); - assertEquals(MSG, testCommandID, testBAC.getCmdID()); - assertEquals(MSG, testMenuText, testBAC.getMenuParams().getMenuName()); - assertEquals(MSG, testParentID, testBAC.getMenuParams().getParentID()); - assertEquals(MSG, testPosition, testBAC.getMenuParams().getPosition()); - assertEquals(MSG, testVrCommands, testBAC.getVrCommands()); - assertEquals(MSG, testCorrelationID, testBAC.getCorrelationID()); + assertEquals(Test.MATCH, testCommandID, testBAC.getCmdID()); + assertEquals(Test.MATCH, testMenuText, testBAC.getMenuParams().getMenuName()); + assertEquals(Test.MATCH, testParentID, testBAC.getMenuParams().getParentID()); + assertEquals(Test.MATCH, testPosition, testBAC.getMenuParams().getPosition()); + assertEquals(Test.MATCH, testVrCommands, testBAC.getVrCommands()); + assertEquals(Test.MATCH, testCorrelationID, testBAC.getCorrelationID()); testBAC = RPCRequestFactory.buildAddCommand(null, null, null, null, null, null); - assertNull(MSG, testBAC.getCmdID()); - assertNull(MSG, testBAC.getMenuParams()); - assertNull(MSG, testBAC.getVrCommands()); - assertNull(MSG, testBAC.getCorrelationID()); + assertNull(Test.NULL, testBAC.getCmdID()); + assertNull(Test.NULL, testBAC.getMenuParams()); + assertNull(Test.NULL, testBAC.getVrCommands()); + assertNull(Test.NULL, testBAC.getCorrelationID()); // Test -- buildAddCommand(Integer commandID, String menuText, Vector<String> vrCommands, Integer correlationID) testBAC = RPCRequestFactory.buildAddCommand(testCommandID, testMenuText, testVrCommands, testCorrelationID); - assertEquals(MSG, testCommandID, testBAC.getCmdID()); - assertEquals(MSG, testMenuText, testBAC.getMenuParams().getMenuName()); - assertEquals(MSG, testVrCommands, testBAC.getVrCommands()); - assertEquals(MSG, testCorrelationID, testBAC.getCorrelationID()); + assertEquals(Test.MATCH, testCommandID, testBAC.getCmdID()); + assertEquals(Test.MATCH, testMenuText, testBAC.getMenuParams().getMenuName()); + assertEquals(Test.MATCH, testVrCommands, testBAC.getVrCommands()); + assertEquals(Test.MATCH, testCorrelationID, testBAC.getCorrelationID()); testBAC = RPCRequestFactory.buildAddCommand(null, null, null, null); - assertNull(MSG, testBAC.getCmdID()); - assertNull(MSG, testBAC.getMenuParams()); - assertNull(MSG, testBAC.getVrCommands()); - assertNull(MSG, testBAC.getCorrelationID()); + assertNull(Test.NULL, testBAC.getCmdID()); + assertNull(Test.NULL, testBAC.getMenuParams()); + assertNull(Test.NULL, testBAC.getVrCommands()); + assertNull(Test.NULL, testBAC.getCorrelationID()); // Test -- buildAddCommand(Integer commandID, Vector<String> vrCommands, Integer correlationID) testBAC = RPCRequestFactory.buildAddCommand(testCommandID, testVrCommands, testCorrelationID); - assertEquals(MSG, testCommandID, testBAC.getCmdID()); - assertEquals(MSG, testVrCommands, testBAC.getVrCommands()); - assertEquals(MSG, testCorrelationID, testBAC.getCorrelationID()); + assertEquals(Test.MATCH, testCommandID, testBAC.getCmdID()); + assertEquals(Test.MATCH, testVrCommands, testBAC.getVrCommands()); + assertEquals(Test.MATCH, testCorrelationID, testBAC.getCorrelationID()); testBAC = RPCRequestFactory.buildAddCommand(null, null, null); - assertNull(MSG, testBAC.getCmdID()); - assertNull(MSG, testBAC.getVrCommands()); - assertNull(MSG, testBAC.getCorrelationID()); + assertNull(Test.NULL, testBAC.getCmdID()); + assertNull(Test.NULL, testBAC.getVrCommands()); + assertNull(Test.NULL, testBAC.getCorrelationID()); } public void testBuildAddSubMenu () { @@ -217,16 +220,16 @@ public class RPCRequestFactoryTests extends TestCase { testPosition = 1; testCorrelationID = 2; testBASM = RPCRequestFactory.buildAddSubMenu(testMenuID, testMenuName, testPosition, testCorrelationID); - assertEquals(MSG, testMenuID, testBASM.getMenuID()); - assertEquals(MSG, testMenuName, testBASM.getMenuName()); - assertEquals(MSG, testPosition, testBASM.getPosition()); - assertEquals(MSG, testCorrelationID, testBASM.getCorrelationID()); + assertEquals(Test.MATCH, testMenuID, testBASM.getMenuID()); + assertEquals(Test.MATCH, testMenuName, testBASM.getMenuName()); + assertEquals(Test.MATCH, testPosition, testBASM.getPosition()); + assertEquals(Test.MATCH, testCorrelationID, testBASM.getCorrelationID()); testBASM = RPCRequestFactory.buildAddSubMenu(null, null, null, null); - assertNull(MSG, testBASM.getMenuID()); - assertNull(MSG, testBASM.getMenuName()); - assertNull(MSG, testBASM.getPosition()); - assertNull(MSG, testBASM.getCorrelationID()); + assertNull(Test.NULL, testBASM.getMenuID()); + assertNull(Test.NULL, testBASM.getMenuName()); + assertNull(Test.NULL, testBASM.getPosition()); + assertNull(Test.NULL, testBASM.getCorrelationID()); } public void testBuildAlert () { @@ -250,7 +253,7 @@ public class RPCRequestFactoryTests extends TestCase { testSoftButtons.add(test1); testSoftButtons.add(test2); testAlert = RPCRequestFactory.buildAlert(testTTSText, testPlayTone, testSoftButtons, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(TTSChunkFactory.createSimpleTTSChunks(testTTSText), testAlert.getTtsChunks())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(TTSChunkFactory.createSimpleTTSChunks(testTTSText), testAlert.getTtsChunks())); // ^ Calls another build method. // Test -- buildAlert(String alertText1, String alertText2, String alertText3, Integer duration, Vector<SoftButton> softButtons, Integer correlationID) @@ -262,7 +265,7 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildAlert(String ttsText, String alertText1, String alertText2, String alertText3, Boolean playTone, Integer duration, Vector<SoftButton> softButtons, Integer correlationID) testAlert = RPCRequestFactory.buildAlert(testTTSText, testAlertText1, testAlertText2, testAlertText3, testPlayTone, testDuration, testSoftButtons, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(TTSChunkFactory.createSimpleTTSChunks(testTTSText), testAlert.getTtsChunks())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(TTSChunkFactory.createSimpleTTSChunks(testTTSText), testAlert.getTtsChunks())); // ^ Calls another build method. // Test -- buildAlert(Vector<TTSChunk> chunks, Boolean playTone, Vector<SoftButton> softButtons, Integer correlationID) @@ -271,24 +274,24 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildAlert(Vector<TTSChunk> ttsChunks, String alertText1, String alertText2, String alertText3, Boolean playTone, Integer duration, Vector<SoftButton> softButtons, Integer correlationID) testTtsChunks = TTSChunkFactory.createSimpleTTSChunks(testTTSText); testAlert = RPCRequestFactory.buildAlert(testTtsChunks, testAlertText1, testAlertText2, testAlertText3, testPlayTone, testDuration, testSoftButtons, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testTtsChunks, testAlert.getTtsChunks())); - assertEquals(MSG, testAlertText1, testAlert.getAlertText1()); - assertEquals(MSG, testAlertText2, testAlert.getAlertText2()); - assertEquals(MSG, testAlertText3, testAlert.getAlertText3()); - assertEquals(MSG, testPlayTone, testAlert.getPlayTone()); - assertEquals(MSG, testDuration, testAlert.getDuration()); - assertTrue(MSG, Validator.validateSoftButtons(testSoftButtons, testAlert.getSoftButtons())); - assertEquals(MSG, testCorrelationID, testAlert.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTtsChunks, testAlert.getTtsChunks())); + assertEquals(Test.MATCH, testAlertText1, testAlert.getAlertText1()); + assertEquals(Test.MATCH, testAlertText2, testAlert.getAlertText2()); + assertEquals(Test.MATCH, testAlertText3, testAlert.getAlertText3()); + assertEquals(Test.MATCH, testPlayTone, testAlert.getPlayTone()); + assertEquals(Test.MATCH, testDuration, testAlert.getDuration()); + assertTrue(Test.TRUE, Validator.validateSoftButtons(testSoftButtons, testAlert.getSoftButtons())); + assertEquals(Test.MATCH, testCorrelationID, testAlert.getCorrelationID()); testAlert = RPCRequestFactory.buildAlert((Vector<TTSChunk>) null, null, null, null, null, null, null, null); - assertNull(MSG, testAlert.getTtsChunks()); - assertNull(MSG, testAlert.getAlertText1()); - assertNull(MSG, testAlert.getAlertText2()); - assertNull(MSG, testAlert.getAlertText3()); - assertNull(MSG, testAlert.getPlayTone()); - assertNull(MSG, testAlert.getDuration()); - assertNull(MSG, testAlert.getSoftButtons()); - assertNull(MSG, testAlert.getCorrelationID()); + assertNull(Test.NULL, testAlert.getTtsChunks()); + assertNull(Test.NULL, testAlert.getAlertText1()); + assertNull(Test.NULL, testAlert.getAlertText2()); + assertNull(Test.NULL, testAlert.getAlertText3()); + assertNull(Test.NULL, testAlert.getPlayTone()); + assertNull(Test.NULL, testAlert.getDuration()); + assertNull(Test.NULL, testAlert.getSoftButtons()); + assertNull(Test.NULL, testAlert.getCorrelationID()); // Test -- buildAlert(String ttsText, Boolean playTone, Integer correlationID) // ^ Calls another build method. @@ -304,20 +307,20 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildAlert(Vector<TTSChunk> ttsChunks, String alertText1, String alertText2, Boolean playTone, Integer duration, Integer correlationID) testAlert = RPCRequestFactory.buildAlert(testTtsChunks, testAlertText1, testAlertText2, testPlayTone, testDuration, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testTtsChunks, testAlert.getTtsChunks())); - assertEquals(MSG, testAlertText1, testAlert.getAlertText1()); - assertEquals(MSG, testAlertText2, testAlert.getAlertText2()); - assertEquals(MSG, testPlayTone, testAlert.getPlayTone()); - assertEquals(MSG, testDuration, testAlert.getDuration()); - assertEquals(MSG, testCorrelationID, testAlert.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTtsChunks, testAlert.getTtsChunks())); + assertEquals(Test.MATCH, testAlertText1, testAlert.getAlertText1()); + assertEquals(Test.MATCH, testAlertText2, testAlert.getAlertText2()); + assertEquals(Test.MATCH, testPlayTone, testAlert.getPlayTone()); + assertEquals(Test.MATCH, testDuration, testAlert.getDuration()); + assertEquals(Test.MATCH, testCorrelationID, testAlert.getCorrelationID()); testAlert = RPCRequestFactory.buildAlert((Vector<TTSChunk>) null, null, null, null, null, null); - assertNull(MSG, testAlert.getTtsChunks()); - assertNull(MSG, testAlert.getAlertText1()); - assertNull(MSG, testAlert.getAlertText2()); - assertNull(MSG, testAlert.getPlayTone()); - assertNull(MSG, testAlert.getDuration()); - assertNull(MSG, testAlert.getCorrelationID()); + assertNull(Test.NULL, testAlert.getTtsChunks()); + assertNull(Test.NULL, testAlert.getAlertText1()); + assertNull(Test.NULL, testAlert.getAlertText2()); + assertNull(Test.NULL, testAlert.getPlayTone()); + assertNull(Test.NULL, testAlert.getDuration()); + assertNull(Test.NULL, testAlert.getCorrelationID()); } public void testBuildCreateInteractionChoiceSet () { @@ -333,14 +336,14 @@ public class RPCRequestFactoryTests extends TestCase { Choice testChoice = new Choice(); testChoiceSet.add(testChoice); testBCICS = RPCRequestFactory.buildCreateInteractionChoiceSet(testChoiceSet, testICSID, testCorrelationID); - assertEquals(MSG, testChoiceSet, testBCICS.getChoiceSet()); - assertEquals(MSG, testICSID, testBCICS.getInteractionChoiceSetID()); - assertEquals(MSG, testCorrelationID, testBCICS.getCorrelationID()); + assertEquals(Test.MATCH, testChoiceSet, testBCICS.getChoiceSet()); + assertEquals(Test.MATCH, testICSID, testBCICS.getInteractionChoiceSetID()); + assertEquals(Test.MATCH, testCorrelationID, testBCICS.getCorrelationID()); testBCICS = RPCRequestFactory.buildCreateInteractionChoiceSet(null, null, null); - assertNull(MSG, testBCICS.getChoiceSet()); - assertNull(MSG, testBCICS.getInteractionChoiceSetID()); - assertNull(MSG, testBCICS.getCorrelationID()); + assertNull(Test.NULL, testBCICS.getChoiceSet()); + assertNull(Test.NULL, testBCICS.getInteractionChoiceSetID()); + assertNull(Test.NULL, testBCICS.getCorrelationID()); } public void testBuildDeleteCommand () { @@ -352,12 +355,12 @@ public class RPCRequestFactoryTests extends TestCase { testCID = 0; testCorrelationID = 1; testDC = RPCRequestFactory.buildDeleteCommand(testCID, testCorrelationID); - assertEquals(MSG, testCID, testDC.getCmdID()); - assertEquals(MSG, testCorrelationID, testDC.getCorrelationID()); + assertEquals(Test.MATCH, testCID, testDC.getCmdID()); + assertEquals(Test.MATCH, testCorrelationID, testDC.getCorrelationID()); testDC = RPCRequestFactory.buildDeleteCommand(null, null); - assertNull(MSG, testDC.getCmdID()); - assertNull(MSG, testDC.getCorrelationID()); + assertNull(Test.NULL, testDC.getCmdID()); + assertNull(Test.NULL, testDC.getCorrelationID()); } @@ -371,12 +374,12 @@ public class RPCRequestFactoryTests extends TestCase { testCorrelationID = 0; testFileName = "test"; testDF = RPCRequestFactory.buildDeleteFile(testFileName, testCorrelationID); - assertEquals(MSG, testCorrelationID, testDF.getCorrelationID()); - assertEquals(MSG, testFileName, testDF.getSdlFileName()); + assertEquals(Test.MATCH, testCorrelationID, testDF.getCorrelationID()); + assertEquals(Test.MATCH, testFileName, testDF.getSdlFileName()); testDF = RPCRequestFactory.buildDeleteFile(null, null); - assertNull(MSG, testDF.getCorrelationID()); - assertNull(MSG, testDF.getSdlFileName()); + assertNull(Test.NULL, testDF.getCorrelationID()); + assertNull(Test.NULL, testDF.getSdlFileName()); } @@ -389,12 +392,12 @@ public class RPCRequestFactoryTests extends TestCase { testICSID = 0; testCorrelationID = 1; testDICS = RPCRequestFactory.buildDeleteInteractionChoiceSet(testICSID, testCorrelationID); - assertEquals(MSG, testICSID, testDICS.getInteractionChoiceSetID()); - assertEquals(MSG, testCorrelationID, testDICS.getCorrelationID()); + assertEquals(Test.MATCH, testICSID, testDICS.getInteractionChoiceSetID()); + assertEquals(Test.MATCH, testCorrelationID, testDICS.getCorrelationID()); testDICS = RPCRequestFactory.buildDeleteInteractionChoiceSet(null, null); - assertNull(MSG, testDICS.getInteractionChoiceSetID()); - assertNull(MSG, testDICS.getCorrelationID()); + assertNull(Test.NULL, testDICS.getInteractionChoiceSetID()); + assertNull(Test.NULL, testDICS.getCorrelationID()); } public void testBuildDeleteSubMenu () { @@ -406,12 +409,12 @@ public class RPCRequestFactoryTests extends TestCase { testMenuID = 0; testCorrelationID = 1; testDSM = RPCRequestFactory.buildDeleteSubMenu(testMenuID, testCorrelationID); - assertEquals(MSG, testMenuID, testDSM.getMenuID()); - assertEquals(MSG, testCorrelationID, testDSM.getCorrelationID()); + assertEquals(Test.MATCH, testMenuID, testDSM.getMenuID()); + assertEquals(Test.MATCH, testCorrelationID, testDSM.getCorrelationID()); testDSM = RPCRequestFactory.buildDeleteSubMenu(null, null); - assertNull(MSG, testDSM.getMenuID()); - assertNull(MSG, testDSM.getCorrelationID()); + assertNull(Test.NULL, testDSM.getMenuID()); + assertNull(Test.NULL, testDSM.getCorrelationID()); } public void testBuildListFiles () { @@ -421,10 +424,10 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildListFiles(Integer correlationID) testLF = RPCRequestFactory.buildListFiles(testCorrelationID); - assertEquals(MSG, testCorrelationID, testLF.getCorrelationID()); + assertEquals(Test.MATCH, testCorrelationID, testLF.getCorrelationID()); testLF = RPCRequestFactory.buildListFiles(null); - assertNull(MSG, testLF.getCorrelationID()); + assertNull(Test.NULL, testLF.getCorrelationID()); } @SuppressWarnings("deprecation") @@ -455,26 +458,26 @@ public class RPCRequestFactoryTests extends TestCase { testCSIDs.add(0); testCSIDs.add(1); testPI = RPCRequestFactory.buildPerformInteraction(testInitChunks, testDisplayText, testCSIDs, testHelpChunks, testTimeoutChunks, testIM, testTimeout, testVrHelpItems, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); - assertEquals(MSG, testDisplayText, testPI.getInitialText()); - assertTrue(MSG, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); - assertTrue(MSG, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); - assertTrue(MSG, Validator.validateTtsChunks(testTimeoutChunks, testPI.getTimeoutPrompt())); - assertEquals(MSG, testIM, testPI.getInteractionMode()); - assertEquals(MSG, testTimeout, testPI.getTimeout()); - assertTrue(MSG, Validator.validateVrHelpItems(testVrHelpItems, testPI.getVrHelp())); - assertEquals(MSG, testCorrelationID, testPI.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); + assertEquals(Test.MATCH, testDisplayText, testPI.getInitialText()); + assertTrue(Test.TRUE, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTimeoutChunks, testPI.getTimeoutPrompt())); + assertEquals(Test.MATCH, testIM, testPI.getInteractionMode()); + assertEquals(Test.MATCH, testTimeout, testPI.getTimeout()); + assertTrue(Test.TRUE, Validator.validateVrHelpItems(testVrHelpItems, testPI.getVrHelp())); + assertEquals(Test.MATCH, testCorrelationID, testPI.getCorrelationID()); testPI = RPCRequestFactory.buildPerformInteraction((Vector<TTSChunk>) null, null, null, null, null, null, null, null, null); - assertNull(MSG, testPI.getInitialPrompt()); - assertNull(MSG, testPI.getInitialText()); - assertNull(MSG, testPI.getInteractionChoiceSetIDList()); - assertNull(MSG, testPI.getHelpPrompt()); - assertNull(MSG, testPI.getTimeoutPrompt()); - assertNull(MSG, testPI.getInteractionMode()); - assertNull(MSG, testPI.getTimeout()); - assertNull(MSG, testPI.getVrHelp()); - assertNull(MSG, testPI.getCorrelationID()); + assertNull(Test.NULL, testPI.getInitialPrompt()); + assertNull(Test.NULL, testPI.getInitialText()); + assertNull(Test.NULL, testPI.getInteractionChoiceSetIDList()); + assertNull(Test.NULL, testPI.getHelpPrompt()); + assertNull(Test.NULL, testPI.getTimeoutPrompt()); + assertNull(Test.NULL, testPI.getInteractionMode()); + assertNull(Test.NULL, testPI.getTimeout()); + assertNull(Test.NULL, testPI.getVrHelp()); + assertNull(Test.NULL, testPI.getCorrelationID()); // Test -- buildPerformInteraction(String initPrompt, String displayText, Vector<Integer> interactionChoiceSetIDList, String helpPrompt, String timeoutPrompt, InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp, Integer correlationID) // ^ Calls another build method. @@ -487,24 +490,24 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildPerformInteraction(Vector<TTSChunk> initChunks, String displayText, Vector<Integer> interactionChoiceSetIDList, Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks, InteractionMode interactionMode, Integer timeout, Integer correlationID) testPI = RPCRequestFactory.buildPerformInteraction(testInitChunks, testDisplayText, testCSIDs, testHelpChunks, testTimeoutChunks, testIM, testTimeout, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); - assertEquals(MSG, testDisplayText, testPI.getInitialText()); - assertTrue(MSG, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); - assertTrue(MSG, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); - assertTrue(MSG, Validator.validateTtsChunks(testTimeoutChunks, testPI.getTimeoutPrompt())); - assertEquals(MSG, testIM, testPI.getInteractionMode()); - assertEquals(MSG, testTimeout, testPI.getTimeout()); - assertEquals(MSG, testCorrelationID, testPI.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); + assertEquals(Test.MATCH, testDisplayText, testPI.getInitialText()); + assertTrue(Test.TRUE, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTimeoutChunks, testPI.getTimeoutPrompt())); + assertEquals(Test.MATCH, testIM, testPI.getInteractionMode()); + assertEquals(Test.MATCH, testTimeout, testPI.getTimeout()); + assertEquals(Test.MATCH, testCorrelationID, testPI.getCorrelationID()); testPI = RPCRequestFactory.buildPerformInteraction((Vector<TTSChunk>) null, null, null, null, null, null, null, null); - assertNull(MSG, testPI.getInitialPrompt()); - assertNull(MSG, testPI.getInitialText()); - assertNull(MSG, testPI.getInteractionChoiceSetIDList()); - assertNull(MSG, testPI.getHelpPrompt()); - assertNull(MSG, testPI.getTimeoutPrompt()); - assertNull(MSG, testPI.getInteractionMode()); - assertNull(MSG, testPI.getTimeout()); - assertNull(MSG, testPI.getCorrelationID()); + assertNull(Test.NULL, testPI.getInitialPrompt()); + assertNull(Test.NULL, testPI.getInitialText()); + assertNull(Test.NULL, testPI.getInteractionChoiceSetIDList()); + assertNull(Test.NULL, testPI.getHelpPrompt()); + assertNull(Test.NULL, testPI.getTimeoutPrompt()); + assertNull(Test.NULL, testPI.getInteractionMode()); + assertNull(Test.NULL, testPI.getTimeout()); + assertNull(Test.NULL, testPI.getCorrelationID()); // Test -- buildPerformInteraction(String initPrompt, String displayText, Vector<Integer> interactionChoiceSetIDList, String helpPrompt, String timeoutPrompt, InteractionMode interactionMode, Integer timeout, Integer correlationID) // ^ Calls another build method. @@ -517,22 +520,22 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildPerformInteraction(Vector<TTSChunk> initChunks, String displayText, Vector<Integer> interactionChoiceSetIDList, Vector<TTSChunk> helpChunks, InteractionMode interactionMode, Integer timeout, Integer correlationID) testPI = RPCRequestFactory.buildPerformInteraction(testInitChunks, testDisplayText, testCSIDs, testHelpChunks, testIM, testTimeout, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); - assertEquals(MSG, testDisplayText, testPI.getInitialText()); - assertTrue(MSG, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); - assertTrue(MSG, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); - assertEquals(MSG, testIM, testPI.getInteractionMode()); - assertEquals(MSG, testTimeout, testPI.getTimeout()); - assertEquals(MSG, testCorrelationID, testPI.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testInitChunks, testPI.getInitialPrompt())); + assertEquals(Test.MATCH, testDisplayText, testPI.getInitialText()); + assertTrue(Test.TRUE, Validator.validateIntegerList(testCSIDs, testPI.getInteractionChoiceSetIDList())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testHelpChunks, testPI.getHelpPrompt())); + assertEquals(Test.MATCH, testIM, testPI.getInteractionMode()); + assertEquals(Test.MATCH, testTimeout, testPI.getTimeout()); + assertEquals(Test.MATCH, testCorrelationID, testPI.getCorrelationID()); testPI = RPCRequestFactory.buildPerformInteraction((Vector<TTSChunk>) null, null, null, null, null, null, null); - assertNull(MSG, testPI.getInitialPrompt()); - assertNull(MSG, testPI.getInitialText()); - assertNull(MSG, testPI.getInteractionChoiceSetIDList()); - assertNull(MSG, testPI.getHelpPrompt()); - assertNull(MSG, testPI.getInteractionMode()); - assertNull(MSG, testPI.getTimeout()); - assertNull(MSG, testPI.getCorrelationID()); + assertNull(Test.NULL, testPI.getInitialPrompt()); + assertNull(Test.NULL, testPI.getInitialText()); + assertNull(Test.NULL, testPI.getInteractionChoiceSetIDList()); + assertNull(Test.NULL, testPI.getHelpPrompt()); + assertNull(Test.NULL, testPI.getInteractionMode()); + assertNull(Test.NULL, testPI.getTimeout()); + assertNull(Test.NULL, testPI.getCorrelationID()); // Test -- buildPerformInteraction(String initPrompt, String displayText, Vector<Integer> interactionChoiceSetIDList, String helpPrompt, InteractionMode interactionMode, Integer timeout, Integer correlationID) // ^ Calls another build method. @@ -549,45 +552,45 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildPutFile(String sdlFileName, FileType fileType, Boolean persistentFile, byte[] fileData, Integer correlationID) testPF = RPCRequestFactory.buildPutFile(testFileName, testFileType, testPFile, testFileData, testCorrelationID); - assertEquals(MSG, testFileName, testPF.getSdlFileName()); - assertEquals(MSG, testFileType, testPF.getFileType()); - assertEquals(MSG, testPFile, testPF.getPersistentFile()); - assertTrue(MSG, Validator.validateBulkData(testFileData, testPF.getFileData())); - assertEquals(MSG, testCorrelationID, testPF.getCorrelationID()); + assertEquals(Test.MATCH, testFileName, testPF.getSdlFileName()); + assertEquals(Test.MATCH, testFileType, testPF.getFileType()); + assertEquals(Test.MATCH, testPFile, testPF.getPersistentFile()); + assertTrue(Test.TRUE, Validator.validateBulkData(testFileData, testPF.getFileData())); + assertEquals(Test.MATCH, testCorrelationID, testPF.getCorrelationID()); testPF = RPCRequestFactory.buildPutFile(null, null, null, null, null); - assertNull(MSG, testPF.getSdlFileName()); - assertNull(MSG, testPF.getFileType()); - assertNull(MSG, testPF.getPersistentFile()); - assertNull(MSG, testPF.getFileData()); - assertNull(MSG, testPF.getCorrelationID()); + assertNull(Test.NULL, testPF.getSdlFileName()); + assertNull(Test.NULL, testPF.getFileType()); + assertNull(Test.NULL, testPF.getPersistentFile()); + assertNull(Test.NULL, testPF.getFileData()); + assertNull(Test.NULL, testPF.getCorrelationID()); // Test -- buildPutFile(String sdlFileName, Integer iOffset, Integer iLength) testPF = RPCRequestFactory.buildPutFile(testFileName, testOffset, testLength); - assertEquals(MSG, testFileName, testPF.getSdlFileName()); - assertEquals(MSG, testOffset, testPF.getOffset()); - assertEquals(MSG, testLength, testPF.getLength()); + assertEquals(Test.MATCH, testFileName, testPF.getSdlFileName()); + assertEquals(Test.MATCH, testOffset, testPF.getOffset()); + assertEquals(Test.MATCH, testLength, testPF.getLength()); testPF = RPCRequestFactory.buildPutFile(null, null, null); - assertNull(MSG, testPF.getSdlFileName()); - assertNull(MSG, testPF.getOffset()); - assertNull(MSG, testPF.getLength()); + assertNull(Test.NULL, testPF.getSdlFileName()); + assertNull(Test.NULL, testPF.getOffset()); + assertNull(Test.NULL, testPF.getLength()); // Test -- buildPutFile(String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) testPF = RPCRequestFactory.buildPutFile(testFileName, testOffset, testLength, testFileType, testPFile, testSystemFile); - assertEquals(MSG, testFileName, testPF.getSdlFileName()); - assertEquals(MSG, testOffset, testPF.getOffset()); - assertEquals(MSG, testLength, testPF.getLength()); - assertTrue(MSG, testPF.getPersistentFile()); - assertEquals(MSG, testSystemFile, testPF.getSystemFile()); + assertEquals(Test.MATCH, testFileName, testPF.getSdlFileName()); + assertEquals(Test.MATCH, testOffset, testPF.getOffset()); + assertEquals(Test.MATCH, testLength, testPF.getLength()); + assertTrue(Test.TRUE, testPF.getPersistentFile()); + assertEquals(Test.MATCH, testSystemFile, testPF.getSystemFile()); testPF = RPCRequestFactory.buildPutFile(null, null, null, null, null, null); - assertNull(MSG, testPF.getSdlFileName()); - assertNull(MSG, testPF.getOffset()); - assertNull(MSG, testPF.getLength()); - assertNull(MSG, testPF.getFileType()); - assertNull(MSG, testPF.getPersistentFile()); - assertNull(MSG, testPF.getSystemFile()); + assertNull(Test.NULL, testPF.getSdlFileName()); + assertNull(Test.NULL, testPF.getOffset()); + assertNull(Test.NULL, testPF.getLength()); + assertNull(Test.NULL, testPF.getFileType()); + assertNull(Test.NULL, testPF.getPersistentFile()); + assertNull(Test.NULL, testPF.getSystemFile()); } public void testBuildRegisterAppInterface () { @@ -614,31 +617,31 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildRegisterAppInterface(SdlMsgVersion sdlMsgVersion, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, Integer correlationID) testRAI = RPCRequestFactory.buildRegisterAppInterface(testSMV, testAppName, testTTSName, testNGN, testSynonyms, testIMA, testLang, testHMILang, testHMIType, testAppID, testCorrelationID); - assertTrue(MSG, Validator.validateSdlMsgVersion(testSMV, testRAI.getSdlMsgVersion())); - assertEquals(MSG, testAppName, testRAI.getAppName()); - assertTrue(MSG, Validator.validateTtsChunks(testTTSName, testRAI.getTtsName())); - assertEquals(MSG, testNGN, testRAI.getNgnMediaScreenAppName()); - assertTrue(MSG, Validator.validateStringList(testSynonyms, testRAI.getVrSynonyms())); - assertEquals(MSG, testIMA, testRAI.getIsMediaApplication()); - assertEquals(MSG, testLang, testRAI.getLanguageDesired()); - assertEquals(MSG, testHMILang, testRAI.getHmiDisplayLanguageDesired()); - assertEquals(MSG, AppHMIType.DEFAULT, testRAI.getAppHMIType().get(0)); - assertEquals(MSG, testAppID, testRAI.getAppID()); - assertEquals(MSG, testCorrelationID, testRAI.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateSdlMsgVersion(testSMV, testRAI.getSdlMsgVersion())); + assertEquals(Test.MATCH, testAppName, testRAI.getAppName()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTTSName, testRAI.getTtsName())); + assertEquals(Test.MATCH, testNGN, testRAI.getNgnMediaScreenAppName()); + assertTrue(Test.TRUE, Validator.validateStringList(testSynonyms, testRAI.getVrSynonyms())); + assertEquals(Test.MATCH, testIMA, testRAI.getIsMediaApplication()); + assertEquals(Test.MATCH, testLang, testRAI.getLanguageDesired()); + assertEquals(Test.MATCH, testHMILang, testRAI.getHmiDisplayLanguageDesired()); + assertEquals(Test.MATCH, AppHMIType.DEFAULT, testRAI.getAppHMIType().get(0)); + assertEquals(Test.MATCH, testAppID, testRAI.getAppID()); + assertEquals(Test.MATCH, testCorrelationID, testRAI.getCorrelationID()); testRAI = RPCRequestFactory.buildRegisterAppInterface(null, null, null, null, null, null, null, null, null, null, null); - assertEquals(MSG, (Integer) 1, testRAI.getCorrelationID()); - assertEquals(MSG, testSMV.getMajorVersion(), testRAI.getSdlMsgVersion().getMajorVersion()); - assertEquals(MSG, testSMV.getMinorVersion(), testRAI.getSdlMsgVersion().getMinorVersion()); - assertNull(MSG, testRAI.getAppName()); - assertNull(MSG, testRAI.getTtsName()); - assertNull(MSG, testRAI.getNgnMediaScreenAppName()); - assertNull(MSG, testRAI.getVrSynonyms()); - assertNull(MSG, testRAI.getIsMediaApplication()); - assertNotNull(MSG, testRAI.getLanguageDesired()); - assertNotNull(MSG, testRAI.getHmiDisplayLanguageDesired()); - assertNull(MSG, testRAI.getAppHMIType()); - assertNull(MSG, testRAI.getAppID()); + assertEquals(Test.MATCH, (Integer) 1, testRAI.getCorrelationID()); + assertEquals(Test.MATCH, testSMV.getMajorVersion(), testRAI.getSdlMsgVersion().getMajorVersion()); + assertEquals(Test.MATCH, testSMV.getMinorVersion(), testRAI.getSdlMsgVersion().getMinorVersion()); + assertNull(Test.NULL, testRAI.getAppName()); + assertNull(Test.NULL, testRAI.getTtsName()); + assertNull(Test.NULL, testRAI.getNgnMediaScreenAppName()); + assertNull(Test.NULL, testRAI.getVrSynonyms()); + assertNull(Test.NULL, testRAI.getIsMediaApplication()); + assertNotNull(Test.NOT_NULL, testRAI.getLanguageDesired()); + assertNotNull(Test.NOT_NULL, testRAI.getHmiDisplayLanguageDesired()); + assertNull(Test.NULL, testRAI.getAppHMIType()); + assertNull(Test.NULL, testRAI.getAppID()); } public void testBuildSetAppIcon () { @@ -649,12 +652,12 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildSetAppIcon(String sdlFileName, Integer correlationID) testSAI = RPCRequestFactory.buildSetAppIcon(testFileName, testCorrelationID); - assertEquals(MSG, testFileName, testSAI.getSdlFileName()); - assertEquals(MSG, testCorrelationID, testSAI.getCorrelationID()); + assertEquals(Test.MATCH, testFileName, testSAI.getSdlFileName()); + assertEquals(Test.MATCH, testCorrelationID, testSAI.getCorrelationID()); testSAI = RPCRequestFactory.buildSetAppIcon(null, null); - assertNull(MSG, testSAI.getSdlFileName()); - assertNull(MSG, testSAI.getCorrelationID()); + assertNull(Test.NULL, testSAI.getSdlFileName()); + assertNull(Test.NULL, testSAI.getCorrelationID()); } @@ -680,32 +683,32 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildSetGlobalProperties(Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks, Integer correlationID) testSBP = RPCRequestFactory.buildSetGlobalProperties(testHelpChunks, testTimeoutChunks, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testHelpChunks, testSBP.getHelpPrompt())); - assertTrue(MSG, Validator.validateTtsChunks(testTimeoutChunks, testSBP.getTimeoutPrompt())); - assertEquals(MSG, testCorrelationID, testSBP.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testHelpChunks, testSBP.getHelpPrompt())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTimeoutChunks, testSBP.getTimeoutPrompt())); + assertEquals(Test.MATCH, testCorrelationID, testSBP.getCorrelationID()); testSBP = RPCRequestFactory.buildSetGlobalProperties((Vector<TTSChunk>) null, null, null); - assertNull(MSG, testSBP.getHelpPrompt()); - assertNull(MSG, testSBP.getTimeoutPrompt()); - assertNull(MSG, testSBP.getCorrelationID()); + assertNull(Test.NULL, testSBP.getHelpPrompt()); + assertNull(Test.NULL, testSBP.getTimeoutPrompt()); + assertNull(Test.NULL, testSBP.getCorrelationID()); // Test -- buildSetGlobalProperties(String helpPrompt, String timeoutPrompt, String vrHelpTitle, Vector<VrHelpItem> vrHelp, Integer correlationID) // ^ Calls another build method. // Test -- buildSetGlobalProperties(Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks, String vrHelpTitle, Vector<VrHelpItem> vrHelp, Integer correlationID) testSBP = RPCRequestFactory.buildSetGlobalProperties(testHelpChunks, testTimeoutChunks, testHelpTitle, testVrHelp, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testHelpChunks, testSBP.getHelpPrompt())); - assertTrue(MSG, Validator.validateTtsChunks(testTimeoutChunks, testSBP.getTimeoutPrompt())); - assertEquals(MSG, testHelpTitle, testSBP.getVrHelpTitle()); - assertTrue(MSG, Validator.validateVrHelpItems(testVrHelp, testSBP.getVrHelp())); - assertEquals(MSG, testCorrelationID, testSBP.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testHelpChunks, testSBP.getHelpPrompt())); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTimeoutChunks, testSBP.getTimeoutPrompt())); + assertEquals(Test.MATCH, testHelpTitle, testSBP.getVrHelpTitle()); + assertTrue(Test.TRUE, Validator.validateVrHelpItems(testVrHelp, testSBP.getVrHelp())); + assertEquals(Test.MATCH, testCorrelationID, testSBP.getCorrelationID()); testSBP = RPCRequestFactory.buildSetGlobalProperties((Vector<TTSChunk>) null, null, null, null, null); - assertNull(MSG, testSBP.getHelpPrompt()); - assertNull(MSG, testSBP.getTimeoutPrompt()); - assertNull(MSG, testSBP.getVrHelpTitle()); - assertNull(MSG, testSBP.getVrHelp()); - assertNull(MSG, testSBP.getCorrelationID()); + assertNull(Test.NULL, testSBP.getHelpPrompt()); + assertNull(Test.NULL, testSBP.getTimeoutPrompt()); + assertNull(Test.NULL, testSBP.getVrHelpTitle()); + assertNull(Test.NULL, testSBP.getVrHelp()); + assertNull(Test.NULL, testSBP.getCorrelationID()); } public void testBuildSetMediaClockTimer () { @@ -716,16 +719,16 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildSetMediaClockTimer(Integer hours, Integer minutes, Integer seconds, UpdateMode updateMode, Integer correlationID) testSMCT = RPCRequestFactory.buildSetMediaClockTimer(hours, minutes, seconds, testMode, testCorrelationID); - assertEquals(MSG, hours, testSMCT.getStartTime().getHours()); - assertEquals(MSG, minutes, testSMCT.getStartTime().getMinutes()); - assertEquals(MSG, seconds, testSMCT.getStartTime().getSeconds()); - assertEquals(MSG, testMode, testSMCT.getUpdateMode()); - assertEquals(MSG, testCorrelationID, testSMCT.getCorrelationID()); + assertEquals(Test.MATCH, hours, testSMCT.getStartTime().getHours()); + assertEquals(Test.MATCH, minutes, testSMCT.getStartTime().getMinutes()); + assertEquals(Test.MATCH, seconds, testSMCT.getStartTime().getSeconds()); + assertEquals(Test.MATCH, testMode, testSMCT.getUpdateMode()); + assertEquals(Test.MATCH, testCorrelationID, testSMCT.getCorrelationID()); testSMCT = RPCRequestFactory.buildSetMediaClockTimer(null, null, null, null, null); - assertNull(MSG, testSMCT.getStartTime()); - assertNull(MSG, testSMCT.getUpdateMode()); - assertNull(MSG, testSMCT.getCorrelationID()); + assertNull(Test.NULL, testSMCT.getStartTime()); + assertNull(Test.NULL, testSMCT.getUpdateMode()); + assertNull(Test.NULL, testSMCT.getCorrelationID()); // Test -- buildSetMediaClockTimer(UpdateMode updateMode, Integer correlationID) // ^ Calls another build method. @@ -748,53 +751,53 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildShow(String mainText1, String mainText2, String mainText3, String mainText4, String statusBar, String mediaClock, String mediaTrack, Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets, TextAlignment alignment, Integer correlationID) testShow = RPCRequestFactory.buildShow(testText1, testText2, testText3, testText4, testStatusBar, testMediaClock, testMediaTrack, testGraphic, testSoftButtons, testCustomPresets, testAlignment, testCorrelationID); - assertEquals(MSG, testText1, testShow.getMainField1()); - assertEquals(MSG, testText2, testShow.getMainField2()); - assertEquals(MSG, testText3, testShow.getMainField3()); - assertEquals(MSG, testText4, testShow.getMainField4()); - assertEquals(MSG, testStatusBar, testShow.getStatusBar()); - assertEquals(MSG, testMediaClock, testShow.getMediaClock()); - assertEquals(MSG, testMediaTrack, testShow.getMediaTrack()); - assertTrue(MSG, Validator.validateImage(testGraphic, testShow.getGraphic())); - assertTrue(MSG, Validator.validateSoftButtons(testSoftButtons, testShow.getSoftButtons())); - assertTrue(MSG, Validator.validateStringList(testCustomPresets, testShow.getCustomPresets())); - assertEquals(MSG, testAlignment, testShow.getAlignment()); - assertEquals(MSG, testCorrelationID, testShow.getCorrelationID()); + assertEquals(Test.MATCH, testText1, testShow.getMainField1()); + assertEquals(Test.MATCH, testText2, testShow.getMainField2()); + assertEquals(Test.MATCH, testText3, testShow.getMainField3()); + assertEquals(Test.MATCH, testText4, testShow.getMainField4()); + assertEquals(Test.MATCH, testStatusBar, testShow.getStatusBar()); + assertEquals(Test.MATCH, testMediaClock, testShow.getMediaClock()); + assertEquals(Test.MATCH, testMediaTrack, testShow.getMediaTrack()); + assertTrue(Test.TRUE, Validator.validateImage(testGraphic, testShow.getGraphic())); + assertTrue(Test.TRUE, Validator.validateSoftButtons(testSoftButtons, testShow.getSoftButtons())); + assertTrue(Test.TRUE, Validator.validateStringList(testCustomPresets, testShow.getCustomPresets())); + assertEquals(Test.MATCH, testAlignment, testShow.getAlignment()); + assertEquals(Test.MATCH, testCorrelationID, testShow.getCorrelationID()); testShow = RPCRequestFactory.buildShow(null, null, null, null, null, null, null, null, null, null, null, null); - assertNull(MSG, testShow.getMainField1()); - assertNull(MSG, testShow.getMainField2()); - assertNull(MSG, testShow.getMainField3()); - assertNull(MSG, testShow.getMainField4()); - assertNull(MSG, testShow.getStatusBar()); - assertNull(MSG, testShow.getMediaClock()); - assertNull(MSG, testShow.getMediaTrack()); - assertNull(MSG, testShow.getGraphic()); - assertNull(MSG, testShow.getSoftButtons()); - assertNull(MSG, testShow.getCustomPresets()); - assertNull(MSG, testShow.getAlignment()); - assertNull(MSG, testShow.getCorrelationID()); + assertNull(Test.NULL, testShow.getMainField1()); + assertNull(Test.NULL, testShow.getMainField2()); + assertNull(Test.NULL, testShow.getMainField3()); + assertNull(Test.NULL, testShow.getMainField4()); + assertNull(Test.NULL, testShow.getStatusBar()); + assertNull(Test.NULL, testShow.getMediaClock()); + assertNull(Test.NULL, testShow.getMediaTrack()); + assertNull(Test.NULL, testShow.getGraphic()); + assertNull(Test.NULL, testShow.getSoftButtons()); + assertNull(Test.NULL, testShow.getCustomPresets()); + assertNull(Test.NULL, testShow.getAlignment()); + assertNull(Test.NULL, testShow.getCorrelationID()); // Test -- buildShow(String mainText1, String mainText2, String mainText3, String mainText4, TextAlignment alignment, Integer correlationID) // ^ Calls another build method. // Test -- buildShow(String mainText1, String mainText2, String statusBar, String mediaClock, String mediaTrack, TextAlignment alignment, Integer correlationID) testShow = RPCRequestFactory.buildShow(testText1, testText2, testStatusBar, testMediaClock, testMediaTrack, testAlignment, testCorrelationID); - assertEquals(MSG, testText1, testShow.getMainField1()); - assertEquals(MSG, testText2, testShow.getMainField2()); - assertEquals(MSG, testStatusBar, testShow.getStatusBar()); - assertEquals(MSG, testMediaClock, testShow.getMediaClock()); - assertEquals(MSG, testMediaTrack, testShow.getMediaTrack()); - assertEquals(MSG, testAlignment, testShow.getAlignment()); - assertEquals(MSG, testCorrelationID, testShow.getCorrelationID()); + assertEquals(Test.MATCH, testText1, testShow.getMainField1()); + assertEquals(Test.MATCH, testText2, testShow.getMainField2()); + assertEquals(Test.MATCH, testStatusBar, testShow.getStatusBar()); + assertEquals(Test.MATCH, testMediaClock, testShow.getMediaClock()); + assertEquals(Test.MATCH, testMediaTrack, testShow.getMediaTrack()); + assertEquals(Test.MATCH, testAlignment, testShow.getAlignment()); + assertEquals(Test.MATCH, testCorrelationID, testShow.getCorrelationID()); testShow = RPCRequestFactory.buildShow(null, null, null, null, null, null, null); - assertNull(MSG, testShow.getMainField1()); - assertNull(MSG, testShow.getMainField2()); - assertNull(MSG, testShow.getStatusBar()); - assertNull(MSG, testShow.getMediaClock()); - assertNull(MSG, testShow.getMediaTrack()); - assertNull(MSG, testShow.getAlignment()); - assertNull(MSG, testShow.getCorrelationID()); + assertNull(Test.NULL, testShow.getMainField1()); + assertNull(Test.NULL, testShow.getMainField2()); + assertNull(Test.NULL, testShow.getStatusBar()); + assertNull(Test.NULL, testShow.getMediaClock()); + assertNull(Test.NULL, testShow.getMediaTrack()); + assertNull(Test.NULL, testShow.getAlignment()); + assertNull(Test.NULL, testShow.getCorrelationID()); // Test -- buildShow(String mainText1, String mainText2, TextAlignment alignment, Integer correlationID) // ^ Calls another build method. @@ -809,21 +812,21 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildSpeak(String ttsText, Integer correlationID) testSpeak = RPCRequestFactory.buildSpeak(testTTSText, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testTTSChunks, testSpeak.getTtsChunks())); - assertEquals(MSG, testCorrelationID, testSpeak.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTTSChunks, testSpeak.getTtsChunks())); + assertEquals(Test.MATCH, testCorrelationID, testSpeak.getCorrelationID()); testSpeak = RPCRequestFactory.buildSpeak((String) null, null); - assertNull(MSG, testSpeak.getTtsChunks()); - assertNull(MSG, testSpeak.getCorrelationID()); + assertNull(Test.NULL, testSpeak.getTtsChunks()); + assertNull(Test.NULL, testSpeak.getCorrelationID()); // Test -- buildSpeak(Vector<TTSChunk> ttsChunks, Integer correlationID) testSpeak = RPCRequestFactory.buildSpeak(testTTSChunks, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testTTSChunks, testSpeak.getTtsChunks())); - assertEquals(MSG, testCorrelationID, testSpeak.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testTTSChunks, testSpeak.getTtsChunks())); + assertEquals(Test.MATCH, testCorrelationID, testSpeak.getCorrelationID()); testSpeak = RPCRequestFactory.buildSpeak((Vector<TTSChunk>) null, null); - assertNull(MSG, testSpeak.getTtsChunks()); - assertNull(MSG, testSpeak.getCorrelationID()); + assertNull(Test.NULL, testSpeak.getTtsChunks()); + assertNull(Test.NULL, testSpeak.getCorrelationID()); } public void testBuildSubscribeButton () { @@ -834,12 +837,12 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildSubscribeButton(ButtonName buttonName, Integer correlationID) testSB = RPCRequestFactory.buildSubscribeButton(testButtonName, testCorrelationID); - assertEquals(MSG, testButtonName, testSB.getButtonName()); - assertEquals(MSG, testCorrelationID, testSB.getCorrelationID()); + assertEquals(Test.MATCH, testButtonName, testSB.getButtonName()); + assertEquals(Test.MATCH, testCorrelationID, testSB.getCorrelationID()); testSB = RPCRequestFactory.buildSubscribeButton(null, null); - assertNull(MSG, testSB.getButtonName()); - assertNull(MSG, testSB.getCorrelationID()); + assertNull(Test.NULL, testSB.getButtonName()); + assertNull(Test.NULL, testSB.getCorrelationID()); } @@ -850,10 +853,10 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildUnregisterAppInterface(Integer correlationID) testUAI = RPCRequestFactory.buildUnregisterAppInterface(testCorrelationID); - assertEquals(MSG, testCorrelationID, testUAI.getCorrelationID()); + assertEquals(Test.MATCH, testCorrelationID, testUAI.getCorrelationID()); testUAI = RPCRequestFactory.buildUnregisterAppInterface(null); - assertNull(MSG, testUAI.getCorrelationID()); + assertNull(Test.NULL, testUAI.getCorrelationID()); } public void testBuildUnsubscribeButton () { @@ -864,12 +867,12 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- buildUnsubscribeButton(ButtonName buttonName, Integer correlationID) testUB = RPCRequestFactory.buildUnsubscribeButton(testButtonName, testCorrelationID); - assertEquals(MSG, testButtonName, testUB.getButtonName()); - assertEquals(MSG, testCorrelationID, testUB.getCorrelationID()); + assertEquals(Test.MATCH, testButtonName, testUB.getButtonName()); + assertEquals(Test.MATCH, testCorrelationID, testUB.getCorrelationID()); testUB = RPCRequestFactory.buildUnsubscribeButton(null, null); - assertNull(MSG, testUB.getButtonName()); - assertNull(MSG, testUB.getCorrelationID()); + assertNull(Test.NULL, testUB.getButtonName()); + assertNull(Test.NULL, testUB.getCorrelationID()); } @@ -881,24 +884,24 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildSubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State, boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure, boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus, boolean driverBraking, Integer correlationID) testSVD = RPCRequestFactory.BuildSubscribeVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, testCorrelationID); - assertTrue(MSG, testSVD.getGps()); - assertTrue(MSG, testSVD.getSpeed()); - assertTrue(MSG, testSVD.getRpm()); - assertTrue(MSG, testSVD.getFuelLevel()); - assertTrue(MSG, testSVD.getFuelLevelState()); - assertTrue(MSG, testSVD.getInstantFuelConsumption()); - assertTrue(MSG, testSVD.getExternalTemperature()); - assertTrue(MSG, testSVD.getPrndl()); - assertTrue(MSG, testSVD.getTirePressure()); - assertTrue(MSG, testSVD.getOdometer()); - assertTrue(MSG, testSVD.getBeltStatus()); - assertTrue(MSG, testSVD.getBodyInformation()); - assertTrue(MSG, testSVD.getDeviceStatus()); - assertTrue(MSG, testSVD.getDriverBraking()); - assertEquals(MSG, testCorrelationID, testSVD.getCorrelationID()); + assertTrue(Test.TRUE, testSVD.getGps()); + assertTrue(Test.TRUE, testSVD.getSpeed()); + assertTrue(Test.TRUE, testSVD.getRpm()); + assertTrue(Test.TRUE, testSVD.getFuelLevel()); + assertTrue(Test.TRUE, testSVD.getFuelLevelState()); + assertTrue(Test.TRUE, testSVD.getInstantFuelConsumption()); + assertTrue(Test.TRUE, testSVD.getExternalTemperature()); + assertTrue(Test.TRUE, testSVD.getPrndl()); + assertTrue(Test.TRUE, testSVD.getTirePressure()); + assertTrue(Test.TRUE, testSVD.getOdometer()); + assertTrue(Test.TRUE, testSVD.getBeltStatus()); + assertTrue(Test.TRUE, testSVD.getBodyInformation()); + assertTrue(Test.TRUE, testSVD.getDeviceStatus()); + assertTrue(Test.TRUE, testSVD.getDriverBraking()); + assertEquals(Test.MATCH, testCorrelationID, testSVD.getCorrelationID()); testSVD = RPCRequestFactory.BuildSubscribeVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, null); - assertNull(MSG, testSVD.getCorrelationID()); + assertNull(Test.NULL, testSVD.getCorrelationID()); } public void testBuildUnsubscribeVehicleData () { @@ -909,24 +912,24 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildUnsubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State, boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure, boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus, boolean driverBraking, Integer correlationID) testUVD = RPCRequestFactory.BuildUnsubscribeVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, testCorrelationID); - assertTrue(MSG, testUVD.getGps()); - assertTrue(MSG, testUVD.getSpeed()); - assertTrue(MSG, testUVD.getRpm()); - assertTrue(MSG, testUVD.getFuelLevel()); - assertTrue(MSG, testUVD.getFuelLevelState()); - assertTrue(MSG, testUVD.getInstantFuelConsumption()); - assertTrue(MSG, testUVD.getExternalTemperature()); - assertTrue(MSG, testUVD.getPrndl()); - assertTrue(MSG, testUVD.getTirePressure()); - assertTrue(MSG, testUVD.getOdometer()); - assertTrue(MSG, testUVD.getBeltStatus()); - assertTrue(MSG, testUVD.getBodyInformation()); - assertTrue(MSG, testUVD.getDeviceStatus()); - assertTrue(MSG, testUVD.getDriverBraking()); - assertEquals(MSG, testCorrelationID, testUVD.getCorrelationID()); + assertTrue(Test.TRUE, testUVD.getGps()); + assertTrue(Test.TRUE, testUVD.getSpeed()); + assertTrue(Test.TRUE, testUVD.getRpm()); + assertTrue(Test.TRUE, testUVD.getFuelLevel()); + assertTrue(Test.TRUE, testUVD.getFuelLevelState()); + assertTrue(Test.TRUE, testUVD.getInstantFuelConsumption()); + assertTrue(Test.TRUE, testUVD.getExternalTemperature()); + assertTrue(Test.TRUE, testUVD.getPrndl()); + assertTrue(Test.TRUE, testUVD.getTirePressure()); + assertTrue(Test.TRUE, testUVD.getOdometer()); + assertTrue(Test.TRUE, testUVD.getBeltStatus()); + assertTrue(Test.TRUE, testUVD.getBodyInformation()); + assertTrue(Test.TRUE, testUVD.getDeviceStatus()); + assertTrue(Test.TRUE, testUVD.getDriverBraking()); + assertEquals(Test.MATCH, testCorrelationID, testUVD.getCorrelationID()); testUVD = RPCRequestFactory.BuildUnsubscribeVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, null); - assertNull(MSG, testUVD.getCorrelationID()); + assertNull(Test.NULL, testUVD.getCorrelationID()); } public void testBuildGetVehicleData () { @@ -937,25 +940,25 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildGetVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State, boolean instantFuelConsumption, boolean externalTemperature, boolean vin, boolean prndl, boolean tirePressure, boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus, boolean driverBraking, Integer correlationID) testGVD = RPCRequestFactory.BuildGetVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testVIN, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, testCorrelationID); - assertTrue(MSG, testGVD.getGps()); - assertTrue(MSG, testGVD.getSpeed()); - assertTrue(MSG, testGVD.getRpm()); - assertTrue(MSG, testGVD.getFuelLevel()); - assertTrue(MSG, testGVD.getFuelLevelState()); - assertTrue(MSG, testGVD.getInstantFuelConsumption()); - assertTrue(MSG, testGVD.getExternalTemperature()); - assertTrue(MSG, testGVD.getPrndl()); - assertTrue(MSG, testGVD.getTirePressure()); - assertTrue(MSG, testGVD.getOdometer()); - assertTrue(MSG, testGVD.getBeltStatus()); - assertTrue(MSG, testGVD.getBodyInformation()); - assertTrue(MSG, testGVD.getDeviceStatus()); - assertTrue(MSG, testGVD.getDriverBraking()); - assertTrue(MSG, testGVD.getVin()); - assertEquals(MSG, testCorrelationID, testGVD.getCorrelationID()); + assertTrue(Test.TRUE, testGVD.getGps()); + assertTrue(Test.TRUE, testGVD.getSpeed()); + assertTrue(Test.TRUE, testGVD.getRpm()); + assertTrue(Test.TRUE, testGVD.getFuelLevel()); + assertTrue(Test.TRUE, testGVD.getFuelLevelState()); + assertTrue(Test.TRUE, testGVD.getInstantFuelConsumption()); + assertTrue(Test.TRUE, testGVD.getExternalTemperature()); + assertTrue(Test.TRUE, testGVD.getPrndl()); + assertTrue(Test.TRUE, testGVD.getTirePressure()); + assertTrue(Test.TRUE, testGVD.getOdometer()); + assertTrue(Test.TRUE, testGVD.getBeltStatus()); + assertTrue(Test.TRUE, testGVD.getBodyInformation()); + assertTrue(Test.TRUE, testGVD.getDeviceStatus()); + assertTrue(Test.TRUE, testGVD.getDriverBraking()); + assertTrue(Test.TRUE, testGVD.getVin()); + assertEquals(Test.MATCH, testCorrelationID, testGVD.getCorrelationID()); testGVD = RPCRequestFactory.BuildGetVehicleData(testGPS, testSpeed, testRPM, testFuelLevel, testFuelLevelState, testInstantFuelConsumption, testExternalTemperature, testVIN, testPRNDL, testTirePressure, testOdometer, testBeltStatus, testBodyInformation, testDeviceStatus, testDriverBraking, null); - assertNull(MSG, testGVD.getCorrelationID()); + assertNull(Test.NULL, testGVD.getCorrelationID()); } public void testBuildScrollableMessage () { @@ -968,16 +971,16 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildScrollableMessage(String scrollableMessageBody, Integer timeout, Vector<SoftButton> softButtons, Integer correlationID) testSM = RPCRequestFactory.BuildScrollableMessage(testSMB, testTimeout, testSoftButtons, testCorrelationID); - assertEquals(MSG, testSMB, testSM.getScrollableMessageBody()); - assertEquals(MSG, testTimeout, testSM.getTimeout()); - assertTrue(MSG, Validator.validateSoftButtons(testSoftButtons, testSM.getSoftButtons())); - assertEquals(MSG, testCorrelationID, testSM.getCorrelationID()); + assertEquals(Test.MATCH, testSMB, testSM.getScrollableMessageBody()); + assertEquals(Test.MATCH, testTimeout, testSM.getTimeout()); + assertTrue(Test.TRUE, Validator.validateSoftButtons(testSoftButtons, testSM.getSoftButtons())); + assertEquals(Test.MATCH, testCorrelationID, testSM.getCorrelationID()); testSM = RPCRequestFactory.BuildScrollableMessage(null, null, null, null); - assertNull(MSG, testSM.getScrollableMessageBody()); - assertNull(MSG, testSM.getTimeout()); - assertNull(MSG, testSM.getSoftButtons()); - assertNull(MSG, testSM.getCorrelationID()); + assertNull(Test.NULL, testSM.getScrollableMessageBody()); + assertNull(Test.NULL, testSM.getTimeout()); + assertNull(Test.NULL, testSM.getSoftButtons()); + assertNull(Test.NULL, testSM.getCorrelationID()); } public void testBuildSlider () { @@ -990,19 +993,19 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildSlider(Integer numTicks, Integer position, String sliderHeader, Vector<String> sliderFooter, Integer timeout, Integer correlationID) testSlider = RPCRequestFactory.BuildSlider(testTicks, testPosition, testHeader, testFooter, testTimeout, testCorrelationID); - assertEquals(MSG, testTicks, testSlider.getNumTicks()); - assertEquals(MSG, testPosition, testSlider.getPosition()); - assertEquals(MSG, testHeader, testSlider.getSliderHeader()); - assertTrue(MSG, Validator.validateStringList(testFooter, testSlider.getSliderFooter())); - assertEquals(MSG, testCorrelationID, testSlider.getCorrelationID()); + assertEquals(Test.MATCH, testTicks, testSlider.getNumTicks()); + assertEquals(Test.MATCH, testPosition, testSlider.getPosition()); + assertEquals(Test.MATCH, testHeader, testSlider.getSliderHeader()); + assertTrue(Test.TRUE, Validator.validateStringList(testFooter, testSlider.getSliderFooter())); + assertEquals(Test.MATCH, testCorrelationID, testSlider.getCorrelationID()); testSlider = RPCRequestFactory.BuildSlider(null, null, null, null, null, null); - assertNull(MSG, testSlider.getNumTicks()); - assertNull(MSG, testSlider.getPosition()); - assertNull(MSG, testSlider.getSliderHeader()); - assertNull(MSG, testSlider.getSliderFooter()); - assertNull(MSG, testSlider.getTimeout()); - assertNull(MSG, testSlider.getCorrelationID()); + assertNull(Test.NULL, testSlider.getNumTicks()); + assertNull(Test.NULL, testSlider.getPosition()); + assertNull(Test.NULL, testSlider.getSliderHeader()); + assertNull(Test.NULL, testSlider.getSliderFooter()); + assertNull(Test.NULL, testSlider.getTimeout()); + assertNull(Test.NULL, testSlider.getCorrelationID()); } public void testBuildChangeRegistration () { @@ -1013,14 +1016,14 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildChangeRegistration(Language language, Language hmiDisplayLanguage, Integer correlationID) testCR = RPCRequestFactory.BuildChangeRegistration(testLang, testHMILang, testCorrelationID); - assertEquals(MSG, testLang, testCR.getLanguage()); - assertEquals(MSG, testHMILang, testCR.getHmiDisplayLanguage()); - assertEquals(MSG, testCorrelationID, testCR.getCorrelationID()); + assertEquals(Test.MATCH, testLang, testCR.getLanguage()); + assertEquals(Test.MATCH, testHMILang, testCR.getHmiDisplayLanguage()); + assertEquals(Test.MATCH, testCorrelationID, testCR.getCorrelationID()); testCR = RPCRequestFactory.BuildChangeRegistration(null, null, null); - assertNull(MSG, testCR.getLanguage()); - assertNull(MSG, testCR.getHmiDisplayLanguage()); - assertNull(MSG, testCR.getCorrelationID()); + assertNull(Test.NULL, testCR.getLanguage()); + assertNull(Test.NULL, testCR.getHmiDisplayLanguage()); + assertNull(Test.NULL, testCR.getCorrelationID()); } public void testBuildSetDisplayLayout () { @@ -1031,12 +1034,12 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildSetDisplayLayout(String displayLayout, Integer correlationID) testSDL = RPCRequestFactory.BuildSetDisplayLayout(testDL, testCorrelationID); - assertEquals(MSG, testDL, testSDL.getDisplayLayout()); - assertEquals(MSG, testCorrelationID, testSDL.getCorrelationID()); + assertEquals(Test.MATCH, testDL, testSDL.getDisplayLayout()); + assertEquals(Test.MATCH, testCorrelationID, testSDL.getCorrelationID()); testSDL = RPCRequestFactory.BuildSetDisplayLayout(null, null); - assertNull(MSG, testSDL.getDisplayLayout()); - assertNull(MSG, testSDL.getCorrelationID()); + assertNull(Test.NULL, testSDL.getDisplayLayout()); + assertNull(Test.NULL, testSDL.getCorrelationID()); } public void testBuildPerformAudioPassThru () { @@ -1055,26 +1058,26 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildPerformAudioPassThru(Vector<TTSChunk> initialPrompt, String audioPassThruDisplayText1, String audioPassThruDisplayText2, SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample, AudioType audioType, Boolean muteAudio, Integer correlationID) testPAPT = RPCRequestFactory.BuildPerformAudioPassThru(testInitialPrompt, testAPTDT1, testAPTDT2, testSR, testMaxDuration, testBits, testAT, testMute, testCorrelationID); - assertTrue(MSG, Validator.validateTtsChunks(testInitialPrompt, testPAPT.getInitialPrompt())); - assertEquals(MSG, testAPTDT1, testPAPT.getAudioPassThruDisplayText1()); - assertEquals(MSG, testAPTDT2, testPAPT.getAudioPassThruDisplayText2()); - assertEquals(MSG, testSR, testPAPT.getSamplingRate()); - assertEquals(MSG, testMaxDuration, testPAPT.getMaxDuration()); - assertEquals(MSG, testBits, testPAPT.getBitsPerSample()); - assertEquals(MSG, testAT, testPAPT.getAudioType()); - assertEquals(MSG, testMute, testPAPT.getMuteAudio()); - assertEquals(MSG, testCorrelationID, testPAPT.getCorrelationID()); + assertTrue(Test.TRUE, Validator.validateTtsChunks(testInitialPrompt, testPAPT.getInitialPrompt())); + assertEquals(Test.MATCH, testAPTDT1, testPAPT.getAudioPassThruDisplayText1()); + assertEquals(Test.MATCH, testAPTDT2, testPAPT.getAudioPassThruDisplayText2()); + assertEquals(Test.MATCH, testSR, testPAPT.getSamplingRate()); + assertEquals(Test.MATCH, testMaxDuration, testPAPT.getMaxDuration()); + assertEquals(Test.MATCH, testBits, testPAPT.getBitsPerSample()); + assertEquals(Test.MATCH, testAT, testPAPT.getAudioType()); + assertEquals(Test.MATCH, testMute, testPAPT.getMuteAudio()); + assertEquals(Test.MATCH, testCorrelationID, testPAPT.getCorrelationID()); testPAPT = RPCRequestFactory.BuildPerformAudioPassThru((Vector<TTSChunk>) null, null, null, null, null, null, null, null, null); - assertNull(MSG, testPAPT.getInitialPrompt()); - assertNull(MSG, testPAPT.getAudioPassThruDisplayText1()); - assertNull(MSG, testPAPT.getAudioPassThruDisplayText2()); - assertNull(MSG, testPAPT.getSamplingRate()); - assertNull(MSG, testPAPT.getMaxDuration()); - assertNull(MSG, testPAPT.getBitsPerSample()); - assertNull(MSG, testPAPT.getAudioType()); - assertNull(MSG, testPAPT.getMuteAudio()); - assertNull(MSG, testPAPT.getCorrelationID()); + assertNull(Test.NULL, testPAPT.getInitialPrompt()); + assertNull(Test.NULL, testPAPT.getAudioPassThruDisplayText1()); + assertNull(Test.NULL, testPAPT.getAudioPassThruDisplayText2()); + assertNull(Test.NULL, testPAPT.getSamplingRate()); + assertNull(Test.NULL, testPAPT.getMaxDuration()); + assertNull(Test.NULL, testPAPT.getBitsPerSample()); + assertNull(Test.NULL, testPAPT.getAudioType()); + assertNull(Test.NULL, testPAPT.getMuteAudio()); + assertNull(Test.NULL, testPAPT.getCorrelationID()); } public void testBuildEndAudioPassThru () { @@ -1084,9 +1087,9 @@ public class RPCRequestFactoryTests extends TestCase { // Test -- BuildEndAudioPassThru(Integer correlationID) testEAPT = RPCRequestFactory.BuildEndAudioPassThru(testCorrelationID); - assertEquals(MSG, testCorrelationID, testEAPT.getCorrelationID()); + assertEquals(Test.MATCH, testCorrelationID, testEAPT.getCorrelationID()); testEAPT = RPCRequestFactory.BuildEndAudioPassThru(null); - assertNull(MSG, testEAPT.getCorrelationID()); + assertNull(Test.NULL, testEAPT.getCorrelationID()); } }
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyALMTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyALMTests.java deleted file mode 100644 index 2504fa863..000000000 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyALMTests.java +++ /dev/null @@ -1,900 +0,0 @@ -//package com.smartdevicelink.test.proxy; -// -//import java.util.Vector; -// -//import junit.framework.TestCase; -// -//import com.smartdevicelink.exception.SdlException; -//import com.smartdevicelink.proxy.SdlProxyALM; -//import com.smartdevicelink.proxy.SdlProxyConfigurationResources; -//import com.smartdevicelink.proxy.interfaces.IProxyListenerALM; -//import com.smartdevicelink.proxy.rpc.AddCommandResponse; -//import com.smartdevicelink.proxy.rpc.AddSubMenuResponse; -//import com.smartdevicelink.proxy.rpc.AlertResponse; -//import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse; -//import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse; -//import com.smartdevicelink.proxy.rpc.DeleteCommandResponse; -//import com.smartdevicelink.proxy.rpc.DeleteFileResponse; -//import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse; -//import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse; -//import com.smartdevicelink.proxy.rpc.DiagnosticMessageResponse; -//import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse; -//import com.smartdevicelink.proxy.rpc.GenericResponse; -//import com.smartdevicelink.proxy.rpc.GetDTCsResponse; -//import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse; -//import com.smartdevicelink.proxy.rpc.ListFilesResponse; -//import com.smartdevicelink.proxy.rpc.OnAudioPassThru; -//import com.smartdevicelink.proxy.rpc.OnButtonEvent; -//import com.smartdevicelink.proxy.rpc.OnButtonPress; -//import com.smartdevicelink.proxy.rpc.OnCommand; -//import com.smartdevicelink.proxy.rpc.OnDriverDistraction; -//import com.smartdevicelink.proxy.rpc.OnHMIStatus; -//import com.smartdevicelink.proxy.rpc.OnHashChange; -//import com.smartdevicelink.proxy.rpc.OnKeyboardInput; -//import com.smartdevicelink.proxy.rpc.OnLanguageChange; -//import com.smartdevicelink.proxy.rpc.OnLockScreenStatus; -//import com.smartdevicelink.proxy.rpc.OnPermissionsChange; -//import com.smartdevicelink.proxy.rpc.OnSystemRequest; -//import com.smartdevicelink.proxy.rpc.OnTBTClientState; -//import com.smartdevicelink.proxy.rpc.OnTouchEvent; -//import com.smartdevicelink.proxy.rpc.OnVehicleData; -//import com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse; -//import com.smartdevicelink.proxy.rpc.PerformInteractionResponse; -//import com.smartdevicelink.proxy.rpc.PutFileResponse; -//import com.smartdevicelink.proxy.rpc.ReadDIDResponse; -//import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse; -//import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse; -//import com.smartdevicelink.proxy.rpc.SdlMsgVersion; -//import com.smartdevicelink.proxy.rpc.SetAppIconResponse; -//import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse; -//import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse; -//import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse; -//import com.smartdevicelink.proxy.rpc.ShowResponse; -//import com.smartdevicelink.proxy.rpc.SliderResponse; -//import com.smartdevicelink.proxy.rpc.SpeakResponse; -//import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse; -//import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse; -//import com.smartdevicelink.proxy.rpc.SystemRequestResponse; -//import com.smartdevicelink.proxy.rpc.TTSChunk; -//import com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse; -//import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse; -//import com.smartdevicelink.proxy.rpc.enums.AppHMIType; -//import com.smartdevicelink.proxy.rpc.enums.Language; -//import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason; -//import com.smartdevicelink.transport.BTTransportConfig; -//import com.smartdevicelink.transport.BaseTransportConfig; -//import com.smartdevicelink.transport.TransportType; -// -//public class SdlProxyALMTests extends TestCase { -// -// /* Issue - Constructor Test # -// * = = = = = = = = -// * No get method for IProxyListenerALM listener - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 -// * No get method for Boolean IsMediaApp - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 -// * No get method for List<String> VrSynonyms - 2,3,4,5,6,8,9,10,11,12,17,18,19,20,21,22,23,24,25 -// * No get method for Boolean autoActivateId - 2,3,4,5,6,8,9,10,11,12,17,18,19,20,21,22,23,24,25 -// * No get method for SdlProxyConfigurationResources - 3,5,6,9,11,12,17,18,19,20,21,22,23,24,25 -// * No get method for boolean CallbackToUIThread - 4,5,6,10,11,12,13,16,17,18,19,20,21,22,23,24,25 -// * No get method for boolean PreRegister - 6,12,13,16,17,18,19,20,21,22,23,24,25 -// * No get method for BaseTransportConfig - 7,8,9,10,11,12,15,18,20,22,23,24,25 -// * No get method for Service appService - 17,18,23,25 -// * No get method for List<TTSChunk> ttsNames - 17,18,19,20,21,22,23,24,25 -// * No get method for List<AppHMIType> appType - 21,22,23,24,25 -// * No get method for String getHashId - 24,25 -// * -// * Cannot test the assignment of these values through the constructors. -// * - - -// * Cannot test RegisterAppInterface return values, they are dependent on the -// * applications using library. -// * - - -// * Cannot mock a service object to test the constructors that require an -// * instance of the service that the users must provide. -// * Test # 17,18,23, and 25 have been commented out due to this issue. -// * - - -// * Cannot test anything because of bluetooth data. -// **/ -// -// Vector<AppHMIType> testAppType = new Vector<AppHMIType>(); -// Vector<TTSChunk> testTtsName = new Vector<TTSChunk>(); -// TransportType testTransportType = TransportType.USB; -// BaseTransportConfig testTransportConfig = new BTTransportConfig(); -// boolean testCallbackToUIThread = false, testPreRegister = true; -// SdlProxyConfigurationResources testConfigResources = new SdlProxyConfigurationResources(); -// SdlMsgVersion testMessageVersion = new SdlMsgVersion(); -// String testAppName = "appName", testAppId = "appId", testMediaName = "ngn", testAutoActivateId = "auto", testHashId = "hash"; -// Boolean testIsMediaApp = true; -// Language testLanguageDesired = Language.EN_US, testHmiDisplayLanguage = Language.EN_GB; -// IProxyListenerALM testListener = new MockListener(); -// SdlProxyALM testALM = null; -// -// public void testConstructors () { -// -// Vector<String> testVrSynonyms = new Vector<String>(); -// testVrSynonyms.add("synonym"); -// -// // Test 1 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp, Language languageDesired, Language hmiDisplayLanguageDesired, String appID) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testLanguageDesired, testHmiDisplayLanguage, testAppId); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { // Note: listener and IsMediaApp cannot be null -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp were null"); -// } -// -// // Test 2 -- SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, testIsMediaApp, null, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 3 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 4 -- SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, testIsMediaApp, null, null, null, null, null, false); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 5 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null, false); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 6 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null, false, true); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 7 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testLanguageDesired, testHmiDisplayLanguage, testAppId, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 8 -- SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, TransportType transportType, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testTransportType, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// assertEquals("Transport type did not match expected value.", testTransportType, testALM.getCurrentTransportType()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, testIsMediaApp, null, null, null, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// assertNull("Transport type did not match expected value.", testALM.getCurrentTransportType()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 9 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 10 -- SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, testIsMediaApp, null, null, null, null, null, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 11 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null, true, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 12 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, testIsMediaApp, null, null, null, null, null, true, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 13 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,Language languageDesired, Language hmiDisplayLanguageDesired, String appID, boolean callbackToUIThread, boolean preRegister) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testLanguageDesired, testHmiDisplayLanguage, testAppId, testCallbackToUIThread, testPreRegister); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null, null, null, false, true); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 14 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testAppId); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 15 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testAppId, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 16 -- SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID, boolean callbackToUIThread, boolean preRegister) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testAppName, testIsMediaApp, testAppId, testCallbackToUIThread, testPreRegister); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, testIsMediaApp, null, false, true); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -//// Test 17 -- SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException -//// try { -//// testALM = new SdlProxyALM(testAppService, testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister); -//// assertNotNull("SdlProxyALM should not be null", testALM); -//// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -//// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -//// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -//// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -//// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -//// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -//// -//// try { -//// testALM = new SdlProxyALM(null, testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, false, true); -//// assertNull("App name did not match expected value.", testALM.getAppName()); -//// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -//// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -//// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -//// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -//// assertNull("App id did not match expected value.", testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -// -//// Test 18 -- SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException -//// try { -//// testALM = new SdlProxyALM(testAppService, testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testTransportConfig); -//// assertNotNull("SdlProxyALM should not be null", testALM); -//// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -//// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -//// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -//// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -//// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -//// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -//// -//// try { -//// testALM = new SdlProxyALM(null, testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, false, true, null); -//// assertNull("App name did not match expected value.", testALM.getAppName()); -//// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -//// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -//// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -//// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -//// assertNull("App id did not match expected value.", testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -// -// // Test 19 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, false, true); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 20 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, false, true, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 21 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppType, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, null, false, true); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// // Test 22 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppType, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, null, false, true, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -//// Test 23 -- SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException -//// try { -//// testALM = new SdlProxyALM(testAppService, testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppType, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testTransportConfig); -//// assertNotNull("SdlProxyALM should not be null", testALM); -//// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -//// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -//// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -//// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -//// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -//// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -//// -//// try { -//// testALM = new SdlProxyALM(null, testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, null, false, true, null); -//// assertNull("App name did not match expected value.", testALM.getAppName()); -//// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -//// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -//// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -//// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -//// assertNull("App id did not match expected value.", testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -// -// // Test 24 -- SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, String sHashID, BaseTransportConfig transportConfig) throws SdlException -// try { -// testALM = new SdlProxyALM(testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppType, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testHashId,testTransportConfig); -// assertNotNull("SdlProxyALM should not be null", testALM); -// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -// try { -// testALM = new SdlProxyALM(testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, null, false, true, null, null); -// assertNull("App name did not match expected value.", testALM.getAppName()); -// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -// assertNull("App id did not match expected value.", testALM.getAppID()); -// } catch (SdlException e) { -// fail("SdlException was thrown"); -// } catch (IllegalArgumentException e) { -// fail("IProxyListenerALM or IsMediaApp was null"); -// } -// -//// Test 25 -- SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, String sHashID, BaseTransportConfig transportConfig) throws SdlException -//// try { -//// testALM = new SdlProxyALM(testAppService,testListener, testConfigResources, testAppName, testTtsName, testMediaName, testVrSynonyms, testIsMediaApp, testMessageVersion, testLanguageDesired, testHmiDisplayLanguage, testAppType, testAppId, testAutoActivateId, testCallbackToUIThread, testPreRegister, testHashId,testTransportConfig); -//// assertNotNull("SdlProxyALM should not be null", testALM); -//// assertEquals("App name did not match expected value.", testAppName, testALM.getAppName()); -//// assertEquals("Media app name did not match expected value.", testMediaName, testALM.getNgnAppName()); -//// assertEquals("Sdl message version did not match expected values.", testMessageVersion, testALM.getSdlMsgVersion()); -//// assertEquals("Language did not match expected value.", testLanguageDesired, testALM.getSdlLanguage()); -//// assertEquals("Language did not match expected value.", testHmiDisplayLanguage, testALM.getHmiDisplayLanguage()); -//// assertEquals("App id did not match expected value.", testAppId, testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -//// -//// try { -//// testALM = new SdlProxyALM(null, testListener, null, null, null, null, null, testIsMediaApp, null, null, null, null, null, null, false, true, null, null); -//// assertNull("App name did not match expected value.", testALM.getAppName()); -//// assertNull("Media app name did not match expected value.", testALM.getNgnAppName()); -//// assertNull("Sdl message version did not match expected values.", testALM.getSdlMsgVersion()); -//// assertNull("Language did not match expected value.", testALM.getSdlLanguage()); -//// assertNull("Language did not match expected value.", testALM.getHmiDisplayLanguage()); -//// assertNull("App id did not match expected value.", testALM.getAppID()); -//// } catch (SdlException e) { -//// fail("SdlException was thrown"); -//// } catch (IllegalArgumentException e) { -//// fail("IProxyListenerALM or IsMediaApp was null"); -//// } -// } -//} -// -//class MockListener implements IProxyListenerALM { -// -// IProxyListenerALM listener = null; -// public MockListener (IProxyListenerALM listener) { -// this.listener = listener; -// } -// -// public MockListener () { -// listener = null; -// } -// -// @Override public void onOnHMIStatus(OnHMIStatus notification) {} -// @Override public void onProxyClosed(String info, Exception e, SdlDisconnectedReason reason) {} -// @Override public void onError(String info, Exception e) {} -// @Override public void onGenericResponse(GenericResponse response) {} -// @Override public void onOnCommand(OnCommand notification) {} -// @Override public void onAddCommandResponse(AddCommandResponse response) {} -// @Override public void onAddSubMenuResponse(AddSubMenuResponse response) {} -// @Override public void onCreateInteractionChoiceSetResponse(CreateInteractionChoiceSetResponse response) {} -// @Override public void onAlertResponse(AlertResponse response) {} -// @Override public void onDeleteCommandResponse(DeleteCommandResponse response) {} -// @Override public void onDeleteInteractionChoiceSetResponse(DeleteInteractionChoiceSetResponse response) {} -// @Override public void onDeleteSubMenuResponse(DeleteSubMenuResponse response) {} -// @Override public void onPerformInteractionResponse(PerformInteractionResponse response) {} -// @Override public void onResetGlobalPropertiesResponse(ResetGlobalPropertiesResponse response) {} -// @Override public void onSetGlobalPropertiesResponse(SetGlobalPropertiesResponse response) {} -// @Override public void onSetMediaClockTimerResponse(SetMediaClockTimerResponse response) {} -// @Override public void onShowResponse(ShowResponse response) {} -// @Override public void onSpeakResponse(SpeakResponse response) {} -// @Override public void onOnButtonEvent(OnButtonEvent notification) {} -// @Override public void onOnButtonPress(OnButtonPress notification) {} -// @Override public void onSubscribeButtonResponse(SubscribeButtonResponse response) {} -// @Override public void onUnsubscribeButtonResponse(UnsubscribeButtonResponse response) {} -// @Override public void onOnPermissionsChange(OnPermissionsChange notification) {} -// @Override public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response) {} -// @Override public void onUnsubscribeVehicleDataResponse(UnsubscribeVehicleDataResponse response) {} -// @Override public void onGetVehicleDataResponse(GetVehicleDataResponse response) {} -// @Override public void onOnVehicleData(OnVehicleData notification) {} -// @Override public void onPerformAudioPassThruResponse(PerformAudioPassThruResponse response) {} -// @Override public void onEndAudioPassThruResponse(EndAudioPassThruResponse response) {} -// @Override public void onOnAudioPassThru(OnAudioPassThru notification) {} -// @Override public void onPutFileResponse(PutFileResponse response) {} -// @Override public void onDeleteFileResponse(DeleteFileResponse response) {} -// @Override public void onListFilesResponse(ListFilesResponse response) {} -// @Override public void onSetAppIconResponse(SetAppIconResponse response) {} -// @Override public void onScrollableMessageResponse(ScrollableMessageResponse response) {} -// @Override public void onChangeRegistrationResponse(ChangeRegistrationResponse response) {} -// @Override public void onSetDisplayLayoutResponse(SetDisplayLayoutResponse response) {} -// @Override public void onOnLanguageChange(OnLanguageChange notification) {} -// @Override public void onOnHashChange(OnHashChange notification) {} -// @Override public void onSliderResponse(SliderResponse response) {} -// @Override public void onOnDriverDistraction(OnDriverDistraction notification) {} -// @Override public void onOnTBTClientState(OnTBTClientState notification) {} -// @Override public void onOnSystemRequest(OnSystemRequest notification) {} -// @Override public void onSystemRequestResponse(SystemRequestResponse response) {} -// @Override public void onOnKeyboardInput(OnKeyboardInput notification) {} -// @Override public void onOnTouchEvent(OnTouchEvent notification) {} -// @Override public void onDiagnosticMessageResponse(DiagnosticMessageResponse response) {} -// @Override public void onReadDIDResponse(ReadDIDResponse response) {} -// @Override public void onGetDTCsResponse(GetDTCsResponse response) {} -// @Override public void onOnLockScreenNotification(OnLockScreenStatus notification) {} -//}
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java deleted file mode 100644 index d9dd31f3d..000000000 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java +++ /dev/null @@ -1,16 +0,0 @@ -//package com.smartdevicelink.test.proxy; -// -//import junit.framework.TestCase; -// -//public class SdlProxyBaseTests extends TestCase { -// -// // Need to test a service with an interface -// // ServiceTestCase -// // - The class itself does not extend service though -// -// // _appService is set in SdlProxyALM -// -// // _proxyListener can only be tested for null -// // as it is a service created and provided by the user -// -//} // See SdlProxyALMTests and SdlProxyConfigurationResourcesTests
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyConfigurationResourcesTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyConfigurationResourcesTests.java deleted file mode 100644 index 675c8e966..000000000 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/SdlProxyConfigurationResourcesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -//package com.smartdevicelink.test.proxy; -// -//import com.smartdevicelink.proxy.SdlProxyConfigurationResources; -// -//import android.content.Context; -//import android.telephony.TelephonyManager; -//import android.test.AndroidTestCase; -// -//public class SdlProxyConfigurationResourcesTests extends AndroidTestCase { -// -// // Note: Used the AndroidTestCase extension for the ability to mock context, -// // which was needed to test for a TelephonyManager. -// -// public void testData () { -// -// String testPath = "sdlConfigurationFilePath"; -// TelephonyManager testTM = (TelephonyManager) getContext() -// .getSystemService(Context.TELEPHONY_SERVICE); -// -// SdlProxyConfigurationResources testSPCR = null; -// -// testSPCR = new SdlProxyConfigurationResources(testPath, testTM); -// assertEquals("File path did not match expected value", testPath, -// testSPCR.getSdlConfigurationFilePath()); -// assertEquals("TelephonyManager did not match expected value", testTM, -// testSPCR.getTelephonyManager()); -// -// testSPCR = new SdlProxyConfigurationResources(null, null); -// assertNull("File path was not null", testSPCR.getSdlConfigurationFilePath()); -// assertNull("TelephonyManager was not null", testSPCR.getTelephonyManager()); -// -// testSPCR.setSdlConfigurationFilePath(testPath); -// assertEquals("File path did not match expected value", testPath, -// testSPCR.getSdlConfigurationFilePath()); -// testSPCR.setSdlConfigurationFilePath(null); -// assertNull("File path was not null", testSPCR.getSdlConfigurationFilePath()); -// -// testSPCR.setTelephonyManager(testTM); -// assertEquals("TelephonyManager did not match expected value", testTM, -// testSPCR.getTelephonyManager()); -// testSPCR.setTelephonyManager(null); -// assertNull("TelephonyManager was not null", testSPCR.getTelephonyManager()); -// } -//}
\ No newline at end of file diff --git a/sdl_android_tests/src/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java b/sdl_android_tests/src/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java index f37ed4da6..222ab5bbc 100644 --- a/sdl_android_tests/src/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java +++ b/sdl_android_tests/src/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java @@ -5,74 +5,96 @@ import java.util.Vector; import com.smartdevicelink.proxy.TTSChunkFactory; import com.smartdevicelink.proxy.rpc.TTSChunk; import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities; +import com.smartdevicelink.test.Test; import junit.framework.TestCase; +/** + * This is a unit test class for the SmartDeviceLink library project class : + * {@link com.smartdevicelink.proxy.TTSChunkFactory} + */ public class TTSChunkFactoryTests extends TestCase { - private final String MSG = "Value did not match expected value."; - private final String TEST = "test"; private TTSChunk testChunk; + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.TTSChunkFactory#createChunk(SpeechCapabilities, String)} + */ public void testCreateChunk () { - - // Test -- createChunk(SpeechCapabilities type, String text) + // Valid Tests SpeechCapabilities testType = SpeechCapabilities.TEXT; - testChunk = TTSChunkFactory.createChunk(testType, TEST); - assertNotNull(MSG, testChunk); - assertEquals(MSG, testType, testChunk.getType()); - assertEquals(MSG, TEST, testChunk.getText()); + testChunk = TTSChunkFactory.createChunk(testType, Test.GENERAL_STRING); + assertNotNull(Test.NOT_NULL, testChunk); + assertEquals(Test.MATCH, testType, testChunk.getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunk.getText()); testType = SpeechCapabilities.SILENCE; - testChunk = TTSChunkFactory.createChunk(testType, TEST); - assertNotNull(MSG, testChunk); - assertEquals(MSG, testType, testChunk.getType()); - assertEquals(MSG, TEST, testChunk.getText()); + testChunk = TTSChunkFactory.createChunk(testType, Test.GENERAL_STRING); + assertNotNull(Test.NOT_NULL, testChunk); + assertEquals(Test.MATCH, testType, testChunk.getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunk.getText()); testType = SpeechCapabilities.SAPI_PHONEMES; - testChunk = TTSChunkFactory.createChunk(testType, TEST); - assertNotNull(MSG, testChunk); - assertEquals(MSG, testType, testChunk.getType()); - assertEquals(MSG, TEST, testChunk.getText()); + testChunk = TTSChunkFactory.createChunk(testType, Test.GENERAL_STRING); + assertNotNull(Test.NOT_NULL, testChunk); + assertEquals(Test.MATCH, testType, testChunk.getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunk.getText()); testType = SpeechCapabilities.PRE_RECORDED; - testChunk = TTSChunkFactory.createChunk(testType, TEST); - assertNotNull(MSG, testChunk); - assertEquals(MSG, testType, testChunk.getType()); - assertEquals(MSG, TEST, testChunk.getText()); + testChunk = TTSChunkFactory.createChunk(testType, Test.GENERAL_STRING); + assertNotNull(Test.NOT_NULL, testChunk); + assertEquals(Test.MATCH, testType, testChunk.getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunk.getText()); testType = SpeechCapabilities.LHPLUS_PHONEMES; - testChunk = TTSChunkFactory.createChunk(testType, TEST); - assertNotNull(MSG, testChunk); - assertEquals(MSG, testType, testChunk.getType()); - assertEquals(MSG, TEST, testChunk.getText()); + testChunk = TTSChunkFactory.createChunk(testType, Test.GENERAL_STRING); + assertNotNull(Test.NOT_NULL, testChunk); + assertEquals(Test.MATCH, testType, testChunk.getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunk.getText()); + // Invalid/Null Tests testChunk = TTSChunkFactory.createChunk(null, null); - assertNotNull(MSG, testChunk); - assertNull(MSG, testChunk.getType()); - assertNull(MSG, testChunk.getText()); - + assertNotNull(Test.NOT_NULL, testChunk); + assertNull(Test.NULL, testChunk.getType()); + assertNull(Test.NULL, testChunk.getText()); } + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.TTSChunkFactory#createSimpleTTSChunks(String)} + */ public void testCreateSimpleTTSChunks () { - + // Test Values Vector<TTSChunk> testChunks; - // Test -- createSimpleTTSChunks(String simple) - testChunks = TTSChunkFactory.createSimpleTTSChunks(TEST); - assertNotNull(MSG, testChunks); - assertEquals(MSG, SpeechCapabilities.TEXT, testChunks.get(0).getType()); - assertEquals(MSG, TEST, testChunks.get(0).getText()); + testChunks = TTSChunkFactory.createSimpleTTSChunks(Test.GENERAL_STRING); + + // Valid Tests + assertNotNull(Test.NOT_NULL, testChunks); + assertEquals(Test.MATCH, SpeechCapabilities.TEXT, testChunks.get(0).getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunks.get(0).getText()); + // Invalid/Null Tests + testChunks = TTSChunkFactory.createSimpleTTSChunks(null); + assertNull(Test.NULL, testChunks); } - + + /** + * This is a unit test for the following methods : + * {@link com.smartdevicelink.proxy.TTSChunkFactory#createPrerecordedTTSChunks(String)} + */ public void testCreatePrerecordedTTSChunks () { - + // Test Values Vector<TTSChunk> testChunks; - // Test -- createPrerecorededTTSChunks(String prerecorded) - testChunks = TTSChunkFactory.createPrerecordedTTSChunks(TEST); - assertNotNull(MSG, testChunks); - assertEquals(MSG, SpeechCapabilities.PRE_RECORDED, testChunks.get(0).getType()); - assertEquals(MSG, TEST, testChunks.get(0).getText()); + testChunks = TTSChunkFactory.createPrerecordedTTSChunks(Test.GENERAL_STRING); + + // Valid Tests + assertNotNull(Test.NOT_NULL, testChunks); + assertEquals(Test.MATCH, SpeechCapabilities.PRE_RECORDED, testChunks.get(0).getType()); + assertEquals(Test.MATCH, Test.GENERAL_STRING, testChunks.get(0).getText()); + // Invalid/Null Tests + testChunks = TTSChunkFactory.createPrerecordedTTSChunks(null); + assertNull(Test.NULL, testChunks); } }
\ No newline at end of file |