Esempio n. 1
0
  @Test
  public void testAssocBeanDepth() {

    Finder finder = new Finder();
    QOrder qOrder = finder.orderQuery();

    assertNotNull(qOrder.id);
    assertNotNull(qOrder.details.product);
  }
Esempio n. 2
0
  @Test
  public void test() {

    Finder finder = new Finder();
    QAddress qAddress = finder.simpleFind();

    assertNotNull(qAddress.version);
    assertNotNull(qAddress.country);
    assertNotNull(qAddress.city);
  }
  @BeforeClass
  public static void findDependencies() throws Exception {
    Path path = Paths.get("target/classes");
    Archive archive = new Archive(path, ClassFileReader.newInstance(path)) {};
    Finder finder = Dependencies.getClassDependencyFinder();

    archive
        .reader()
        .getClassFiles()
        .forEach(
            classFile ->
                StreamSupport.stream(finder.findDependencies(classFile).spliterator(), false)
                    .filter(dependency -> !isAnnotation(dependency))
                    .filter(dependency -> !self(dependency))
                    .forEach(
                        dependency ->
                            packageDependencies
                                .computeIfAbsent(
                                    dependency.getOrigin().getPackageName(), key -> new TreeSet<>())
                                .add(dependency.getTarget().getPackageName())));
  }