Skip to content

Commit a8d0bdd

Browse files
test fixes
1 parent 690115a commit a8d0bdd

File tree

7 files changed

+51
-51
lines changed

7 files changed

+51
-51
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
.DS_Store
33
.vscode/
44
.idea/
5-
test/
5+
./test/
66
/demo/app/bin
77
/demo/gradle

apigear/goldenmaster.solution.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ targets:
1414
- ../test-apis/testbed.same2.module.yaml
1515
- ../test-apis/testbed.simple.module.yaml
1616
- ../test-apis/testbed.struct.module.yaml
17-
output: ../test
17+
output: ../test2
1818
template: ..
1919
force: true
2020
features: ["all"]

goldenmaster/tbSimple/tbSimple_android_client/src/test/java/tbSimple/tbSimple_android_client/SimpleInterfaceClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public void onReceivepropBoolPropertyChangeTest() throws RemoteException {
178178
msg.setData(data);
179179
mClientMessenger.send(msg);
180180
Robolectric.flushForegroundThreadScheduler();
181-
inOrderEventListener.verify(listenerMock,times(7)).onPropBoolChanged(testpropBool);
181+
inOrderEventListener.verify(listenerMock,times(1)).onPropBoolChanged(testpropBool);
182182
}
183183

184184
@Test
@@ -210,7 +210,7 @@ public void onReceivepropIntPropertyChangeTest() throws RemoteException {
210210
msg.setData(data);
211211
mClientMessenger.send(msg);
212212
Robolectric.flushForegroundThreadScheduler();
213-
inOrderEventListener.verify(listenerMock,times(7)).onPropIntChanged(3);
213+
inOrderEventListener.verify(listenerMock,times(1)).onPropIntChanged(testpropInt);
214214
}
215215

216216
@Test

goldenmaster/testbed1/testbed1_android_client/src/test/java/testbed1/testbed1_android_client/StructArrayInterfaceClientTest.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,16 @@ public void onInitReceive() throws RemoteException
144144

145145
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.INIT.getValue());
146146
Bundle data = new Bundle();
147-
StructBoolArray testpropBool = new StructBoolArray[1];
147+
StructBool[] testpropBool = new StructBool[1];
148148
testpropBool[0] = Testbed1TestHelper.makeTestStructBool();
149149
data.putParcelableArray("propBool", StructBoolParcelable.wrapArray(testpropBool));
150-
StructIntArray testpropInt = new StructIntArray[1];
150+
StructInt[] testpropInt = new StructInt[1];
151151
testpropInt[0] = Testbed1TestHelper.makeTestStructInt();
152152
data.putParcelableArray("propInt", StructIntParcelable.wrapArray(testpropInt));
153-
StructFloatArray testpropFloat = new StructFloatArray[1];
153+
StructFloat[] testpropFloat = new StructFloat[1];
154154
testpropFloat[0] = Testbed1TestHelper.makeTestStructFloat();
155155
data.putParcelableArray("propFloat", StructFloatParcelable.wrapArray(testpropFloat));
156-
StructStringArray testpropString = new StructStringArray[1];
156+
StructString[] testpropString = new StructString[1];
157157
testpropString[0] = Testbed1TestHelper.makeTestStructString();
158158
data.putParcelableArray("propString", StructStringParcelable.wrapArray(testpropString));
159159

@@ -172,7 +172,7 @@ public void onReceivepropBoolPropertyChangeTest() throws RemoteException {
172172
// Create and send message
173173
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SET_PropBool.getValue());
174174
Bundle data = new Bundle();
175-
StructBoolArray testpropBool = new StructBoolArray[1];
175+
StructBool[] testpropBool = new StructBool[1];
176176
testpropBool[0] = Testbed1TestHelper.makeTestStructBool();
177177
data.putParcelableArray("propBool", StructBoolParcelable.wrapArray(testpropBool));
178178

@@ -185,7 +185,7 @@ public void onReceivepropBoolPropertyChangeTest() throws RemoteException {
185185
@Test
186186
public void setPropertyRequestpropBool()
187187
{
188-
StructBoolArray testpropBool = new StructBoolArray[1];
188+
StructBool[] testpropBool = new StructBool[1];
189189
testpropBool[0] = Testbed1TestHelper.makeTestStructBool();
190190

191191
testedClient.setPropBool(testpropBool);
@@ -207,7 +207,7 @@ public void onReceivepropIntPropertyChangeTest() throws RemoteException {
207207
// Create and send message
208208
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SET_PropInt.getValue());
209209
Bundle data = new Bundle();
210-
StructIntArray testpropInt = new StructIntArray[1];
210+
StructInt[] testpropInt = new StructInt[1];
211211
testpropInt[0] = Testbed1TestHelper.makeTestStructInt();
212212
data.putParcelableArray("propInt", StructIntParcelable.wrapArray(testpropInt));
213213

@@ -220,7 +220,7 @@ public void onReceivepropIntPropertyChangeTest() throws RemoteException {
220220
@Test
221221
public void setPropertyRequestpropInt()
222222
{
223-
StructIntArray testpropInt = new StructIntArray[1];
223+
StructInt[] testpropInt = new StructInt[1];
224224
testpropInt[0] = Testbed1TestHelper.makeTestStructInt();
225225

226226
testedClient.setPropInt(testpropInt);
@@ -242,7 +242,7 @@ public void onReceivepropFloatPropertyChangeTest() throws RemoteException {
242242
// Create and send message
243243
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SET_PropFloat.getValue());
244244
Bundle data = new Bundle();
245-
StructFloatArray testpropFloat = new StructFloatArray[1];
245+
StructFloat[] testpropFloat = new StructFloat[1];
246246
testpropFloat[0] = Testbed1TestHelper.makeTestStructFloat();
247247
data.putParcelableArray("propFloat", StructFloatParcelable.wrapArray(testpropFloat));
248248

@@ -255,7 +255,7 @@ public void onReceivepropFloatPropertyChangeTest() throws RemoteException {
255255
@Test
256256
public void setPropertyRequestpropFloat()
257257
{
258-
StructFloatArray testpropFloat = new StructFloatArray[1];
258+
StructFloat[] testpropFloat = new StructFloat[1];
259259
testpropFloat[0] = Testbed1TestHelper.makeTestStructFloat();
260260

261261
testedClient.setPropFloat(testpropFloat);
@@ -277,7 +277,7 @@ public void onReceivepropStringPropertyChangeTest() throws RemoteException {
277277
// Create and send message
278278
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SET_PropString.getValue());
279279
Bundle data = new Bundle();
280-
StructStringArray testpropString = new StructStringArray[1];
280+
StructString[] testpropString = new StructString[1];
281281
testpropString[0] = Testbed1TestHelper.makeTestStructString();
282282
data.putParcelableArray("propString", StructStringParcelable.wrapArray(testpropString));
283283

@@ -290,7 +290,7 @@ public void onReceivepropStringPropertyChangeTest() throws RemoteException {
290290
@Test
291291
public void setPropertyRequestpropString()
292292
{
293-
StructStringArray testpropString = new StructStringArray[1];
293+
StructString[] testpropString = new StructString[1];
294294
testpropString[0] = Testbed1TestHelper.makeTestStructString();
295295

296296
testedClient.setPropString(testpropString);
@@ -312,7 +312,7 @@ public void whenNotifiedsigBool() throws RemoteException
312312

313313
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SIG_SigBool.getValue());
314314
Bundle data = new Bundle();
315-
StructBoolArray testparamBool = new StructBoolArray[1];
315+
StructBool[] testparamBool = new StructBool[1];
316316
testparamBool[0] = Testbed1TestHelper.makeTestStructBool();
317317
data.putParcelableArray("paramBool", StructBoolParcelable.wrapArray(testparamBool));
318318

@@ -329,7 +329,7 @@ public void whenNotifiedsigInt() throws RemoteException
329329

330330
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SIG_SigInt.getValue());
331331
Bundle data = new Bundle();
332-
StructIntArray testparamInt = new StructIntArray[1];
332+
StructInt[] testparamInt = new StructInt[1];
333333
testparamInt[0] = Testbed1TestHelper.makeTestStructInt();
334334
data.putParcelableArray("paramInt", StructIntParcelable.wrapArray(testparamInt));
335335

@@ -346,7 +346,7 @@ public void whenNotifiedsigFloat() throws RemoteException
346346

347347
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SIG_SigFloat.getValue());
348348
Bundle data = new Bundle();
349-
StructFloatArray testparamFloat = new StructFloatArray[1];
349+
StructFloat[] testparamFloat = new StructFloat[1];
350350
testparamFloat[0] = Testbed1TestHelper.makeTestStructFloat();
351351
data.putParcelableArray("paramFloat", StructFloatParcelable.wrapArray(testparamFloat));
352352

@@ -363,7 +363,7 @@ public void whenNotifiedsigString() throws RemoteException
363363

364364
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.SIG_SigString.getValue());
365365
Bundle data = new Bundle();
366-
StructStringArray testparamString = new StructStringArray[1];
366+
StructString[] testparamString = new StructString[1];
367367
testparamString[0] = Testbed1TestHelper.makeTestStructString();
368368
data.putParcelableArray("paramString", StructStringParcelable.wrapArray(testparamString));
369369

@@ -379,9 +379,9 @@ public void whenNotifiedsigString() throws RemoteException
379379
public void onfuncBoolRequest() throws RemoteException {
380380

381381
// Execute method
382-
StructBoolArray testparamBool = new StructBoolArray[1];
382+
StructBool[] testparamBool = new StructBool[1];
383383
testparamBool[0] = Testbed1TestHelper.makeTestStructBool();
384-
StructBoolArray expectedResult = new StructBoolArray[1];
384+
StructBool[] expectedResult = new StructBool[1];
385385
expectedResult[0] = Testbed1TestHelper.makeTestStructBool();
386386

387387
AtomicBoolean receivedResp = new AtomicBoolean(false);
@@ -426,9 +426,9 @@ public void onfuncBoolRequest() throws RemoteException {
426426
public void onfuncIntRequest() throws RemoteException {
427427

428428
// Execute method
429-
StructIntArray testparamInt = new StructIntArray[1];
429+
StructInt[] testparamInt = new StructInt[1];
430430
testparamInt[0] = Testbed1TestHelper.makeTestStructInt();
431-
StructIntArray expectedResult = new StructIntArray[1];
431+
StructInt[] expectedResult = new StructInt[1];
432432
expectedResult[0] = Testbed1TestHelper.makeTestStructInt();
433433

434434
AtomicBoolean receivedResp = new AtomicBoolean(false);
@@ -473,9 +473,9 @@ public void onfuncIntRequest() throws RemoteException {
473473
public void onfuncFloatRequest() throws RemoteException {
474474

475475
// Execute method
476-
StructFloatArray testparamFloat = new StructFloatArray[1];
476+
StructFloat[] testparamFloat = new StructFloat[1];
477477
testparamFloat[0] = Testbed1TestHelper.makeTestStructFloat();
478-
StructFloatArray expectedResult = new StructFloatArray[1];
478+
StructFloat[] expectedResult = new StructFloat[1];
479479
expectedResult[0] = Testbed1TestHelper.makeTestStructFloat();
480480

481481
AtomicBoolean receivedResp = new AtomicBoolean(false);
@@ -520,9 +520,9 @@ public void onfuncFloatRequest() throws RemoteException {
520520
public void onfuncStringRequest() throws RemoteException {
521521

522522
// Execute method
523-
StructStringArray testparamString = new StructStringArray[1];
523+
StructString[] testparamString = new StructString[1];
524524
testparamString[0] = Testbed1TestHelper.makeTestStructString();
525-
StructStringArray expectedResult = new StructStringArray[1];
525+
StructString[] expectedResult = new StructString[1];
526526
expectedResult[0] = Testbed1TestHelper.makeTestStructString();
527527

528528
AtomicBoolean receivedResp = new AtomicBoolean(false);

goldenmaster/testbed1/testbed1_android_service/src/test/java/testbed1/testbed1_android_service/StructArrayInterfaceServiceAdapterTest.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public void onReceivepropBoolPropertyChangeTest() throws RemoteException {
239239
// Create and send message
240240
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.PROP_PropBool.getValue());
241241
Bundle data = new Bundle();
242-
StructBoolArray testpropBool = new StructBoolArray[1];
242+
StructBool[] testpropBool = new StructBool[1];
243243
testpropBool[0] = Testbed1TestHelper.makeTestStructBool();
244244
data.putParcelableArray("propBool", StructBoolParcelable.wrapArray(testpropBool));
245245

@@ -253,7 +253,7 @@ public void onReceivepropBoolPropertyChangeTest() throws RemoteException {
253253
@Test
254254
public void whenNotifiedpropBool()
255255
{
256-
StructBoolArray testpropBool = new StructBoolArray[1];
256+
StructBool[] testpropBool = new StructBool[1];
257257
testpropBool[0] = Testbed1TestHelper.makeTestStructBool();
258258

259259
testedAdapterAsEventListener.onPropBoolChanged(testpropBool);
@@ -276,7 +276,7 @@ public void onReceivepropIntPropertyChangeTest() throws RemoteException {
276276
// Create and send message
277277
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.PROP_PropInt.getValue());
278278
Bundle data = new Bundle();
279-
StructIntArray testpropInt = new StructIntArray[1];
279+
StructInt[] testpropInt = new StructInt[1];
280280
testpropInt[0] = Testbed1TestHelper.makeTestStructInt();
281281
data.putParcelableArray("propInt", StructIntParcelable.wrapArray(testpropInt));
282282

@@ -290,7 +290,7 @@ public void onReceivepropIntPropertyChangeTest() throws RemoteException {
290290
@Test
291291
public void whenNotifiedpropInt()
292292
{
293-
StructIntArray testpropInt = new StructIntArray[1];
293+
StructInt[] testpropInt = new StructInt[1];
294294
testpropInt[0] = Testbed1TestHelper.makeTestStructInt();
295295

296296
testedAdapterAsEventListener.onPropIntChanged(testpropInt);
@@ -313,7 +313,7 @@ public void onReceivepropFloatPropertyChangeTest() throws RemoteException {
313313
// Create and send message
314314
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.PROP_PropFloat.getValue());
315315
Bundle data = new Bundle();
316-
StructFloatArray testpropFloat = new StructFloatArray[1];
316+
StructFloat[] testpropFloat = new StructFloat[1];
317317
testpropFloat[0] = Testbed1TestHelper.makeTestStructFloat();
318318
data.putParcelableArray("propFloat", StructFloatParcelable.wrapArray(testpropFloat));
319319

@@ -327,7 +327,7 @@ public void onReceivepropFloatPropertyChangeTest() throws RemoteException {
327327
@Test
328328
public void whenNotifiedpropFloat()
329329
{
330-
StructFloatArray testpropFloat = new StructFloatArray[1];
330+
StructFloat[] testpropFloat = new StructFloat[1];
331331
testpropFloat[0] = Testbed1TestHelper.makeTestStructFloat();
332332

333333
testedAdapterAsEventListener.onPropFloatChanged(testpropFloat);
@@ -350,7 +350,7 @@ public void onReceivepropStringPropertyChangeTest() throws RemoteException {
350350
// Create and send message
351351
Message msg = Message.obtain(null, StructArrayInterfaceMessageType.PROP_PropString.getValue());
352352
Bundle data = new Bundle();
353-
StructStringArray testpropString = new StructStringArray[1];
353+
StructString[] testpropString = new StructString[1];
354354
testpropString[0] = Testbed1TestHelper.makeTestStructString();
355355
data.putParcelableArray("propString", StructStringParcelable.wrapArray(testpropString));
356356

@@ -364,7 +364,7 @@ public void onReceivepropStringPropertyChangeTest() throws RemoteException {
364364
@Test
365365
public void whenNotifiedpropString()
366366
{
367-
StructStringArray testpropString = new StructStringArray[1];
367+
StructString[] testpropString = new StructString[1];
368368
testpropString[0] = Testbed1TestHelper.makeTestStructString();
369369

370370
testedAdapterAsEventListener.onPropStringChanged(testpropString);
@@ -384,7 +384,7 @@ public void whenNotifiedpropString()
384384
@Test
385385
public void whenNotifiedsigBool()
386386
{
387-
StructBoolArray testparamBool = new StructBoolArray[1];
387+
StructBool[] testparamBool = new StructBool[1];
388388
testparamBool[0] = Testbed1TestHelper.makeTestStructBool();
389389

390390
testedAdapterAsEventListener.onSigBool(testparamBool);
@@ -403,7 +403,7 @@ public void whenNotifiedsigBool()
403403
@Test
404404
public void whenNotifiedsigInt()
405405
{
406-
StructIntArray testparamInt = new StructIntArray[1];
406+
StructInt[] testparamInt = new StructInt[1];
407407
testparamInt[0] = Testbed1TestHelper.makeTestStructInt();
408408

409409
testedAdapterAsEventListener.onSigInt(testparamInt);
@@ -422,7 +422,7 @@ public void whenNotifiedsigInt()
422422
@Test
423423
public void whenNotifiedsigFloat()
424424
{
425-
StructFloatArray testparamFloat = new StructFloatArray[1];
425+
StructFloat[] testparamFloat = new StructFloat[1];
426426
testparamFloat[0] = Testbed1TestHelper.makeTestStructFloat();
427427

428428
testedAdapterAsEventListener.onSigFloat(testparamFloat);
@@ -441,7 +441,7 @@ public void whenNotifiedsigFloat()
441441
@Test
442442
public void whenNotifiedsigString()
443443
{
444-
StructStringArray testparamString = new StructStringArray[1];
444+
StructString[] testparamString = new StructString[1];
445445
testparamString[0] = Testbed1TestHelper.makeTestStructString();
446446

447447
testedAdapterAsEventListener.onSigString(testparamString);
@@ -466,10 +466,10 @@ public void onfuncBoolRequest() throws RemoteException {
466466

467467
int callId = 99;
468468
data.putInt("callId", callId);
469-
StructBoolArray testparamBool = new StructBoolArray[1];
469+
StructBool[] testparamBool = new StructBool[1];
470470
testparamBool[0] = Testbed1TestHelper.makeTestStructBool();
471471
data.putParcelableArray("paramBool", StructBoolParcelable.wrapArray(testparamBool));
472-
StructBoolArray returnedValue = new StructBoolArray[1];
472+
StructBool[] returnedValue = new StructBool[1];
473473
returnedValue[0] = Testbed1TestHelper.makeTestStructBool();
474474

475475

@@ -502,10 +502,10 @@ public void onfuncIntRequest() throws RemoteException {
502502

503503
int callId = 99;
504504
data.putInt("callId", callId);
505-
StructIntArray testparamInt = new StructIntArray[1];
505+
StructInt[] testparamInt = new StructInt[1];
506506
testparamInt[0] = Testbed1TestHelper.makeTestStructInt();
507507
data.putParcelableArray("paramInt", StructIntParcelable.wrapArray(testparamInt));
508-
StructIntArray returnedValue = new StructIntArray[1];
508+
StructInt[] returnedValue = new StructInt[1];
509509
returnedValue[0] = Testbed1TestHelper.makeTestStructInt();
510510

511511

@@ -538,10 +538,10 @@ public void onfuncFloatRequest() throws RemoteException {
538538

539539
int callId = 99;
540540
data.putInt("callId", callId);
541-
StructFloatArray testparamFloat = new StructFloatArray[1];
541+
StructFloat[] testparamFloat = new StructFloat[1];
542542
testparamFloat[0] = Testbed1TestHelper.makeTestStructFloat();
543543
data.putParcelableArray("paramFloat", StructFloatParcelable.wrapArray(testparamFloat));
544-
StructFloatArray returnedValue = new StructFloatArray[1];
544+
StructFloat[] returnedValue = new StructFloat[1];
545545
returnedValue[0] = Testbed1TestHelper.makeTestStructFloat();
546546

547547

@@ -574,10 +574,10 @@ public void onfuncStringRequest() throws RemoteException {
574574

575575
int callId = 99;
576576
data.putInt("callId", callId);
577-
StructStringArray testparamString = new StructStringArray[1];
577+
StructString[] testparamString = new StructString[1];
578578
testparamString[0] = Testbed1TestHelper.makeTestStructString();
579579
data.putParcelableArray("paramString", StructStringParcelable.wrapArray(testparamString));
580-
StructStringArray returnedValue = new StructStringArray[1];
580+
StructString[] returnedValue = new StructString[1];
581581
returnedValue[0] = Testbed1TestHelper.makeTestStructString();
582582

583583

templates/android/client/clienttest.java.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ interface I{{Camel .Interface.Name }}ClientMessageGetter
8585
{{javaType "" .}} test{{ javaVar .}} = new {{javaElementType "" .}}[1];
8686
test{{ javaVar .}}[0] = {{javaTestValue "" . }};
8787
{{- else }}
88-
{{javaElementType "" .}}Array test{{ javaVar .}} = new {{javaElementType "" .}}Array[1];
88+
{{javaElementType "" .}}[] test{{ javaVar .}} = new {{javaElementType "" .}}[1];
8989
test{{ javaVar .}}[0] = {{Camel .Schema.Module.Name}}TestHelper.makeTest{{Camel (javaElementType "" . )}}();
9090
{{- end}}
9191
{{- else if or (.IsPrimitive) (eq .KindType "enum") }}
@@ -285,7 +285,7 @@ public class {{Camel .Interface.Name }}ClientTest
285285
{{javaType "" .Return }} expectedResult = new {{javaElementType "" .Return }}[1];
286286
expectedResult[0] = {{javaTestValue "" .Return }};
287287
{{- else }}
288-
{{javaElementType "" .Return }}Array expectedResult = new {{javaElementType "" .Return }}Array[1];
288+
{{javaElementType "" .Return }}[] expectedResult = new {{javaElementType "" .Return }}[1];
289289
expectedResult[0] = {{Camel .Return.Schema.Module.Name}}TestHelper.makeTest{{Camel (javaElementType "" .Return )}}();
290290
{{- end}}
291291
{{- else if or ( .Return.IsPrimitive) (eq .Return.KindType "enum") }}

0 commit comments

Comments
 (0)