@Test public void shouldfindOneAbstractMethod() { PojoClass pojoClass = PojoClassFactory.getPojoClass(AnAbstractClassWithOneAbstractMethod.class); for (PojoMethod pojoMethod : pojoClass.getPojoMethods()) { if (!pojoMethod.isConstructor()) Assert.assertTrue(pojoMethod.isAbstract()); } Assert.assertEquals(1 + 1 /* constructor */, pojoClass.getPojoMethods().size()); }
@Test public void shouldFindNoAbstractMethods() { PojoClass pojoClass = PojoClassFactory.getPojoClass(AnAbstractClassEmpty.class); for (PojoMethod pojoMethod : pojoClass.getPojoMethods()) { Assert.assertTrue(pojoMethod.isConstructor()); Assert.assertFalse(pojoMethod.isAbstract()); } Assert.assertEquals(1, pojoClass.getPojoMethods().size()); }