public class TypeExposerTest extends InterpTestCase {
public void testMakeBuilder() throws Exception {
ExposedTypeProcessor etp = new ExposedTypeProcessor(getClass().getClassLoader()
.getResourceAsStream("org/python/expose/generate/SimpleExposed.class"));
TypeBuilder t = etp.getTypeExposer().makeBuilder();
assertEquals("simpleexposed", t.getName());
assertEquals(SimpleExposed.class, t.getTypeClass());
assertEquals(false, t.getIsBaseType());
assertEquals("Docstring", t.getDoc());
PyType type = PyType.fromClass(SimpleExposed.class);
PyObject dict = t.getDict(type);
assertNotNull(dict.__finditem__("simple_method"));
assertNotNull(dict.__finditem__("prefixed"));
assertNotNull(dict.__finditem__("__str__"));
assertNotNull(dict.__finditem__("__repr__"));
assertNotNull(dict.__finditem__("tostring"));