Skip to content

Commit 76e226f

Browse files
author
Mihail Slavchev
committed
1 parent d910935 commit 76e226f

File tree

7 files changed

+37
-0
lines changed

7 files changed

+37
-0
lines changed

test-app/assets/app/tests/testMetadata.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,21 @@ describe("Tests metadata", function () {
44
var accountType = android.provider.ContactsContract.SyncColumns.ACCOUNT_TYPE;
55
expect(accountType).toBeTruthy(accountType !== undefined);
66
});
7+
8+
it("should access public methods of non-public base classes", function () {
9+
var c = new com.tns.tests.MyTestDerivedClass();
10+
var exceptionCaught = false;
11+
try {
12+
var v1 = c.getValue1();
13+
expect(v1).toBe(1);
14+
var v2 = c.getValue2();
15+
expect(v2).toBe(2);
16+
var v3 = c.getValue3();
17+
expect(v3).toBe(3);
18+
} catch (e) {
19+
exceptionCaught = true;
20+
}
21+
expect(exceptionCaught).toBe(false);
22+
});
723

824
});
3.04 KB
Binary file not shown.
19.3 KB
Binary file not shown.
662 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.tns.tests;
2+
3+
class MyTestBaseClass1 {
4+
public int getValue1() {
5+
return 1;
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.tns.tests;
2+
3+
public class MyTestBaseClass2 extends MyTestBaseClass1 {
4+
public int getValue2() {
5+
return 2;
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.tns.tests;
2+
3+
public class MyTestDerivedClass extends MyTestBaseClass2 {
4+
public int getValue3() {
5+
return 3;
6+
}
7+
}

0 commit comments

Comments
 (0)