diff options
author | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2020-09-02 17:10:10 -0400 |
---|---|---|
committer | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2020-09-02 17:10:10 -0400 |
commit | efc3a92d92c09182084b72a0ac1dcbbbdb5fd383 (patch) | |
tree | e44c97166c85447383abddef1062af7bc2f0e739 /android/sdl_android/src | |
parent | 797bf0d4299768a55e9de691a52a9a918d05786b (diff) | |
download | sdl_android-efc3a92d92c09182084b72a0ac1dcbbbdb5fd383.tar.gz |
Remove deprecated TTSChunkFactory class
Diffstat (limited to 'android/sdl_android/src')
2 files changed, 3 insertions, 104 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java index bd82d2d5d..b609015b5 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java @@ -16,7 +16,6 @@ import com.smartdevicelink.managers.screen.menu.VoiceCommand; import com.smartdevicelink.managers.screen.menu.VoiceCommandSelectionListener; import com.smartdevicelink.protocol.SdlProtocol; import com.smartdevicelink.protocol.enums.FunctionID; -import com.smartdevicelink.proxy.TTSChunkFactory; import com.smartdevicelink.proxy.rpc.AppInfo; import com.smartdevicelink.proxy.rpc.AppServiceCapability; import com.smartdevicelink.proxy.rpc.AppServiceData; @@ -494,7 +493,7 @@ public class TestValues { public static final List<ClimateControlCapabilities> GENERAL_CLIMATECONTROLCAPABILITIES_LIST = new ArrayList<ClimateControlCapabilities>(1); public static final List<RadioControlCapabilities> GENERAL_RADIOCONTROLCAPABILITIES_LIST = new ArrayList<RadioControlCapabilities>(1); public static final Vector<String> GENERAL_VECTOR_STRING = new Vector<>(Arrays.asList(new String[] { "a", "b"})); - public static final Vector<TTSChunk> GENERAL_VECTOR_TTS_CHUNKS = new Vector<>(Arrays.asList(TTSChunkFactory.createChunk(SpeechCapabilities.TEXT, "Welcome to the jungle"))); + public static final Vector<TTSChunk> GENERAL_VECTOR_TTS_CHUNKS = new Vector<>(Arrays.asList(new TTSChunk("Welcome to the jungle", SpeechCapabilities.TEXT))); public static final List<SeatControlCapabilities> GENERAL_SEATCONTROLCAPABILITIES_LIST = new ArrayList<SeatControlCapabilities>(1); public static final List<EqualizerSettings> GENERAL_EQUALIZERSETTINGS_LIST = new ArrayList<EqualizerSettings>(1); public static final List<LightCapabilities> GENERAL_LIGHTCAPABILITIES_LIST = new ArrayList<LightCapabilities>(1); @@ -794,8 +793,8 @@ public class TestValues { GENERAL_VRHELPITEM.setPosition(100); GENERAL_VRHELPITEM_LIST.add(GENERAL_VRHELPITEM); - GENERAL_TTSCHUNK_LIST.add(TTSChunkFactory.createChunk(SpeechCapabilities.TEXT, "Welcome to the jungle")); - GENERAL_TTSCHUNK_LIST.add(TTSChunkFactory.createChunk(SpeechCapabilities.TEXT, "Say a command")); + GENERAL_TTSCHUNK_LIST.add(new TTSChunk("Welcome to the jungle", SpeechCapabilities.TEXT)); + GENERAL_TTSCHUNK_LIST.add(new TTSChunk("Say a command", SpeechCapabilities.TEXT)); GENERAL_KEYBOARDPROPERTIES.setAutoCompleteText(GENERAL_STRING); GENERAL_KEYBOARDPROPERTIES.setKeypressMode(KeypressMode.SINGLE_KEYPRESS); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java deleted file mode 100644 index ad1976cb1..000000000 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/TTSChunkFactoryTests.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.smartdevicelink.test.proxy; - -import com.smartdevicelink.proxy.TTSChunkFactory; -import com.smartdevicelink.proxy.rpc.TTSChunk; -import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities; -import com.smartdevicelink.test.TestValues; - -import junit.framework.TestCase; - -import java.util.Vector; - -/** - * This is a unit test class for the SmartDeviceLink library project class : - * {@link com.smartdevicelink.proxy.TTSChunkFactory} - */ -public class TTSChunkFactoryTests extends TestCase { - - private TTSChunk testChunk; - - /** - * This is a unit test for the following methods : - * {@link com.smartdevicelink.proxy.TTSChunkFactory#createChunk(SpeechCapabilities, String)} - */ - public void testCreateChunk () { - // Valid Tests - SpeechCapabilities testType = SpeechCapabilities.TEXT; - testChunk = TTSChunkFactory.createChunk(testType, TestValues.GENERAL_STRING); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertEquals(TestValues.MATCH, testType, testChunk.getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunk.getText()); - - testType = SpeechCapabilities.SILENCE; - testChunk = TTSChunkFactory.createChunk(testType, TestValues.GENERAL_STRING); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertEquals(TestValues.MATCH, testType, testChunk.getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunk.getText()); - - testType = SpeechCapabilities.SAPI_PHONEMES; - testChunk = TTSChunkFactory.createChunk(testType, TestValues.GENERAL_STRING); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertEquals(TestValues.MATCH, testType, testChunk.getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunk.getText()); - - testType = SpeechCapabilities.PRE_RECORDED; - testChunk = TTSChunkFactory.createChunk(testType, TestValues.GENERAL_STRING); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertEquals(TestValues.MATCH, testType, testChunk.getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunk.getText()); - - testType = SpeechCapabilities.LHPLUS_PHONEMES; - testChunk = TTSChunkFactory.createChunk(testType, TestValues.GENERAL_STRING); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertEquals(TestValues.MATCH, testType, testChunk.getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunk.getText()); - - // Invalid/Null Tests - testChunk = TTSChunkFactory.createChunk(null, null); - assertNotNull(TestValues.NOT_NULL, testChunk); - assertNull(TestValues.NULL, testChunk.getType()); - assertNull(TestValues.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; - testChunks = TTSChunkFactory.createSimpleTTSChunks(TestValues.GENERAL_STRING); - - // Valid Tests - assertNotNull(TestValues.NOT_NULL, testChunks); - assertEquals(TestValues.MATCH, SpeechCapabilities.TEXT, testChunks.get(0).getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunks.get(0).getText()); - - // Invalid/Null Tests - testChunks = TTSChunkFactory.createSimpleTTSChunks(null); - assertNull(TestValues.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; - testChunks = TTSChunkFactory.createPrerecordedTTSChunks(TestValues.GENERAL_STRING); - - // Valid Tests - assertNotNull(TestValues.NOT_NULL, testChunks); - assertEquals(TestValues.MATCH, SpeechCapabilities.PRE_RECORDED, testChunks.get(0).getType()); - assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testChunks.get(0).getText()); - - // Invalid/Null Tests - testChunks = TTSChunkFactory.createPrerecordedTTSChunks(null); - assertNull(TestValues.NULL, testChunks); - } -}
\ No newline at end of file |