2015-05-01 21:57:22 +00:00
|
|
|
from __future__ import print_function
|
|
|
|
from __future__ import division
|
|
|
|
from __future__ import absolute_import
|
2012-10-11 23:10:30 +00:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
from jnius import autoclass, JavaException
|
|
|
|
|
|
|
|
|
|
|
|
class Interface(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_reflect_interface(self):
|
|
|
|
Interface = autoclass('org.jnius.InterfaceWithPublicEnum')
|
|
|
|
self.assertTrue(Interface)
|
|
|
|
|
|
|
|
def test_reflect_enum_in_interface(self):
|
|
|
|
ATTITUDE = autoclass('org.jnius.InterfaceWithPublicEnum$ATTITUDE')
|
|
|
|
self.assertTrue(ATTITUDE)
|
|
|
|
self.assertTrue(ATTITUDE.GOOD)
|
|
|
|
self.assertTrue(ATTITUDE.BAD)
|
|
|
|
self.assertTrue(ATTITUDE.UGLY)
|