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 14:31:22 +00:00
|
|
|
import unittest
|
2012-08-14 13:09:48 +00:00
|
|
|
from jnius.reflect import autoclass
|
|
|
|
|
2012-08-15 14:31:22 +00:00
|
|
|
class ReflectTest(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_stack(self):
|
|
|
|
Stack = autoclass('java.util.Stack')
|
|
|
|
stack = Stack()
|
|
|
|
self.assertIsInstance(stack, Stack)
|
|
|
|
stack.push('hello')
|
|
|
|
stack.push('world')
|
|
|
|
self.assertEqual(stack.pop(), 'world')
|
|
|
|
self.assertEqual(stack.pop(), 'hello')
|