Skip to content

Commit

Permalink
#64 Get interface via javaProjectBuilder.getClassByName
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Jan 8, 2020
1 parent 026b1ba commit 8a65af1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,18 @@ public void testInnerClassInterfaces()
assertTrue( classA.getImplements().equals( Arrays.asList( builder.getClassByName( "Itf2" ) ) ) );
}

// Github #64
public void testGetInterface()
{
JavaProjectBuilder javaProjectBuilder = new JavaProjectBuilder();
javaProjectBuilder.addSourceTree( new File( "src/main/java" ) );
JavaClass intrfc = javaProjectBuilder.getClassByName( "org.thoughtworks.qdox.Searcher" );
assertNotNull(intrfc);

JavaClass clss = javaProjectBuilder.getClassByName( "org.thoughtworks.qdox.JavaProjectBuilder" );
assertNotNull(clss);
}

public void testGenericEnumMethod() throws Exception {
String source = "package java.time.temporal;\r\n" +
"public final class IsoFields {\r\n" +
Expand Down

0 comments on commit 8a65af1

Please # to comment.