2015-05-01 21:57:22 +00:00
|
|
|
from __future__ import print_function
|
|
|
|
from __future__ import division
|
|
|
|
from __future__ import absolute_import
|
2012-08-15 22:16:17 +00:00
|
|
|
import unittest
|
|
|
|
from jnius.reflect import autoclass
|
|
|
|
from jnius import cast
|
|
|
|
|
2012-08-18 10:59:15 +00:00
|
|
|
class MultipleSignatureTest(unittest.TestCase):
|
2012-08-15 22:16:17 +00:00
|
|
|
|
|
|
|
def test_multiple_constructors(self):
|
|
|
|
String = autoclass('java.lang.String')
|
|
|
|
s = String('hello world')
|
|
|
|
self.assertEquals(s.__javaclass__, 'java/lang/String')
|
|
|
|
o = cast('java.lang.Object', s)
|
|
|
|
self.assertEquals(o.__javaclass__, 'java/lang/Object')
|
|
|
|
|