Skip to content

Commit c564973

Browse files
committed
Refactor sdl Test file to not shadow junit import
1 parent 31e1138 commit c564973

312 files changed

Lines changed: 7481 additions & 7472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
import com.smartdevicelink.proxy.rpc.enums.Result;
2121
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
2222
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
23-
import com.smartdevicelink.test.Test;
23+
import com.smartdevicelink.test.TestValues;
2424
import com.smartdevicelink.transport.BaseTransportConfig;
2525
import com.smartdevicelink.transport.TCPTransportConfig;
2626

2727
import org.junit.Before;
28+
import org.junit.Test;
2829
import org.junit.runner.RunWith;
2930
import org.mockito.Mockito;
3031
import org.mockito.invocation.InvocationOnMock;
@@ -76,11 +77,11 @@ public void setUp() throws Exception{
7677

7778
// Color Scheme
7879
templateColorScheme = new TemplateColorScheme();
79-
templateColorScheme.setBackgroundColor(Test.GENERAL_RGBCOLOR);
80-
templateColorScheme.setPrimaryColor(Test.GENERAL_RGBCOLOR);
81-
templateColorScheme.setSecondaryColor(Test.GENERAL_RGBCOLOR);
80+
templateColorScheme.setBackgroundColor(TestValues.GENERAL_RGBCOLOR);
81+
templateColorScheme.setPrimaryColor(TestValues.GENERAL_RGBCOLOR);
82+
templateColorScheme.setSecondaryColor(TestValues.GENERAL_RGBCOLOR);
8283

83-
sdlManager = createSampleManager("heyApp", "123456", Test.GENERAL_LOCKSCREENCONFIG);
84+
sdlManager = createSampleManager("heyApp", "123456", TestValues.GENERAL_LOCKSCREENCONFIG);
8485
}
8586

8687
// SETUP / HELPERS
@@ -127,11 +128,11 @@ public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language langua
127128
builder.setLanguage(Language.EN_US);
128129
builder.setDayColorScheme(templateColorScheme);
129130
builder.setNightColorScheme(templateColorScheme);
130-
builder.setVrSynonyms(Test.GENERAL_VECTOR_STRING);
131-
builder.setTtsName(Test.GENERAL_VECTOR_TTS_CHUNKS);
131+
builder.setVrSynonyms(TestValues.GENERAL_VECTOR_STRING);
132+
builder.setTtsName(TestValues.GENERAL_VECTOR_TTS_CHUNKS);
132133
builder.setLockScreenConfig(lockScreenConfig);
133-
builder.setMinimumProtocolVersion(Test.GENERAL_VERSION);
134-
builder.setMinimumRPCVersion(Test.GENERAL_VERSION);
134+
builder.setMinimumProtocolVersion(TestValues.GENERAL_VERSION);
135+
builder.setMinimumRPCVersion(TestValues.GENERAL_VERSION);
135136
builder.setContext(mTestContext);
136137
manager = builder.build();
137138

@@ -144,30 +145,30 @@ public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language langua
144145

145146
// TESTS
146147

147-
@org.junit.Test
148+
@Test
148149
public void testNotNull(){
149-
assertNotNull(createSampleManager("app","123456", Test.GENERAL_LOCKSCREENCONFIG));
150+
assertNotNull(createSampleManager("app","123456", TestValues.GENERAL_LOCKSCREENCONFIG));
150151
}
151152

152-
@org.junit.Test
153+
@Test
153154
public void testMissingAppName() {
154155
try {
155-
createSampleManager(null,"123456", Test.GENERAL_LOCKSCREENCONFIG);
156+
createSampleManager(null,"123456", TestValues.GENERAL_LOCKSCREENCONFIG);
156157
} catch (IllegalArgumentException ex) {
157158
assertSame(ex.getMessage(), "You must specify an app name by calling setAppName");
158159
}
159160
}
160161

161-
@org.junit.Test
162+
@Test
162163
public void testMissingAppId() {
163164
try {
164-
createSampleManager("app",null, Test.GENERAL_LOCKSCREENCONFIG);
165+
createSampleManager("app",null, TestValues.GENERAL_LOCKSCREENCONFIG);
165166
} catch (IllegalArgumentException ex) {
166167
assertSame(ex.getMessage(), "You must specify an app ID by calling setAppId");
167168
}
168169
}
169170

170-
@org.junit.Test
171+
@Test
171172
public void testManagerSetters() {
172173
assertEquals("123456", sdlManager.getAppId());
173174
assertEquals("heyApp", sdlManager.getAppName());
@@ -178,14 +179,14 @@ public void testManagerSetters() {
178179
assertEquals(transport, sdlManager.getTransport());
179180
assertEquals(templateColorScheme, sdlManager.getDayColorScheme());
180181
assertEquals(templateColorScheme, sdlManager.getNightColorScheme());
181-
assertEquals(Test.GENERAL_VECTOR_STRING, sdlManager.getVrSynonyms());
182-
assertEquals(Test.GENERAL_VECTOR_TTS_CHUNKS, sdlManager.getTtsChunks());
183-
assertEquals(Test.GENERAL_LOCKSCREENCONFIG, sdlManager.getLockScreenConfig());
184-
assertEquals(Test.GENERAL_VERSION, sdlManager.getMinimumProtocolVersion());
185-
assertEquals(Test.GENERAL_VERSION, sdlManager.getMinimumRPCVersion());
182+
assertEquals(TestValues.GENERAL_VECTOR_STRING, sdlManager.getVrSynonyms());
183+
assertEquals(TestValues.GENERAL_VECTOR_TTS_CHUNKS, sdlManager.getTtsChunks());
184+
assertEquals(TestValues.GENERAL_LOCKSCREENCONFIG, sdlManager.getLockScreenConfig());
185+
assertEquals(TestValues.GENERAL_VERSION, sdlManager.getMinimumProtocolVersion());
186+
assertEquals(TestValues.GENERAL_VERSION, sdlManager.getMinimumRPCVersion());
186187
}
187188

188-
@org.junit.Test
189+
@Test
189190
public void testStartingManager(){
190191
listenerCalledCounter = 0;
191192

@@ -208,7 +209,7 @@ public void testStartingManager(){
208209
assertEquals("Listener was not called or called more/less frequently than expected", 1, listenerCalledCounter);
209210
}
210211

211-
@org.junit.Test
212+
@Test
212213
public void testManagerStates() {
213214
SdlManager sdlManager = createSampleManager("test", "00000", new LockScreenConfig());
214215
sdlManager.initialize();
@@ -319,7 +320,7 @@ public void testManagerStates() {
319320
assertEquals(BaseSubManager.SHUTDOWN, sdlManager.getState());
320321
}
321322

322-
@org.junit.Test
323+
@Test
323324
public void testSendRPC(){
324325
listenerCalledCounter = 0;
325326

@@ -355,12 +356,12 @@ public void onResponse(int correlationId, RPCResponse response) {
355356
assertEquals("Listener was not called or called more/less frequently than expected", 1, listenerCalledCounter);
356357
}
357358

358-
@org.junit.Test
359+
@Test
359360
public void testSendRPCs(){
360361
testSendMultipleRPCs(false);
361362
}
362363

363-
@org.junit.Test
364+
@Test
364365
public void testSendSequentialRPCs(){
365366
testSendMultipleRPCs(true);
366367
}

0 commit comments

Comments
 (0)