示例#1
0
  private final void checkReturnedFacade(final Class<?> expected, final String... facades) {
    final PojoClass facade = FacadeFactory.getLoadedFacadePojoClass(facades);
    Affirm.affirmNotNull(
        String.format(
            "Failed to load from the valid list of facades [%s]?!", Arrays.toString(facades)),
        facade);

    Affirm.affirmEquals("Wrong facade returned!!", expected, facade.getClazz());
  }
  @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());
  }
 public boolean include(final PojoClass pojoClass) {
   return pojoClass.isConcrete();
 }