Skip to content

Commit 1e06f95

Browse files
committed
add tests for fix
1 parent fe2d4cc commit 1e06f95

6 files changed

Lines changed: 30 additions & 0 deletions

File tree

test-app/app/src/main/assets/app/tests/testsForRuntimeBindingGenerator.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,27 @@ describe("Tests for runtime binding generator", function () {
4848
var isInstanceOf = dummyObject instanceof com.tns.tests.DummyClass;
4949
expect(isInstanceOf).toEqual(true);
5050
});
51+
52+
it("When_implementing_interface_and_its_implemented_interfaces", function() {
53+
var impl = new com.tns.tests.MyDerivedPublicInterface({
54+
methodOfMyDerivedPublicInterface: function(input) {
55+
return "Le java " + input;
56+
},
57+
methodOfMyPublicInterface: function(input) {
58+
return "Le java " + input;
59+
}
60+
});
61+
62+
try {
63+
var C = java.lang.Class.forName("com.tns.gen.com.tns.tests.MyDerivedPublicInterface");
64+
expect(C).not.toBe(null);
65+
66+
var expected = "Le java test derived method";
67+
var actual = impl.methodOfMyPublicInterface("test derived method");
68+
expect(actual).toBe(expected);
69+
} catch (e) {
70+
//fail("class was not found");
71+
expect(true).toBe(false);
72+
}
73+
});
5174
});
9.06 KB
Binary file not shown.
74.1 KB
Binary file not shown.
110 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.tns.tests;
2+
3+
public interface MyDerivedPublicInterface extends MyPublicInterface {
4+
String methodOfMyDerivedPublicInterface(String in);
5+
}

test-app/app/src/main/java/com/tns/tests/MyPublicInterface.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
public interface MyPublicInterface {
44
public final String Name = "My Public Interface";
5+
6+
String methodOfMyPublicInterface(String in);
57
}

0 commit comments

Comments
 (0)