コード例 #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());
  }
コード例 #2
0
  @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());
  }
コード例 #3
0
  @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());
  }
コード例 #4
0
 public boolean include(final PojoClass pojoClass) {
   return pojoClass.isConcrete();
 }