@Test public void testIsInterface() throws IOException { File java = getSampleDataJavaSource("SampleInterface.java"); JavaSourceAssert.assertIsInterface(java); }
public static JavaClass assertIsInterface(File java) throws IOException { JavaDocBuilder builder = new JavaDocBuilder(); JavaSource src = builder.addSource(java); JavaClass jc = getClassName(src, java); Assert.assertThat("Failed to parse java source: " + java.getAbsolutePath(), jc, notNullValue()); String msg = String.format("JavaSource: (%s) should be an interface: %s", jc.getName(), java); Assert.assertThat(msg, jc.isInterface(), is(true)); return jc; }
JavaSourceAssert { public static JavaClass assertIsInterface(File java) throws IOException { JavaDocBuilder builder = new JavaDocBuilder(); JavaSource src = builder.addSource(java); JavaClass jc = getClassName(src, java); Assert.assertThat("Failed to parse java source: " + java.getAbsolutePath(), jc, notNullValue()); String msg = String.format("JavaSource: (%s) should be an interface: %s", jc.getName(), java); Assert.assertThat(msg, jc.isInterface(), is(true)); return jc; } }
JavaSourceAssert { public static JavaClass assertIsInterface(File java) throws IOException { JavaDocBuilder builder = new JavaDocBuilder(); JavaSource src = builder.addSource(java); JavaClass jc = getClassName(src, java); Assert.assertThat("Failed to parse java source: " + java.getAbsolutePath(), jc, notNullValue()); String msg = String.format("JavaSource: (%s) should be an interface: %s", jc.getName(), java); Assert.assertThat(msg, jc.isInterface(), is(true)); return jc; }  }
JavaSourceAssert { public static JavaClass assertIsInterface(File java) throws IOException { JavaDocBuilder builder = new JavaDocBuilder(); JavaSource src = builder.addSource(java); JavaClass jc = getClassName(src, java); Assert.assertThat("Failed to parse java source: " + java.getAbsolutePath(), jc, notNullValue()); String msg = String.format("JavaSource: (%s) should be an interface: %s", jc.getName(), java); Assert.assertThat(msg, jc.isInterface(), is(true)); return jc; }  static JavaClass assertIsInterface(File java); static void assertBodyContains(AbstractJavaEntity entity, CharSequence expectedContents); static void assertMethodsEqual(JavaMethod expectedMethod, JavaMethod actualMethod); static void assertMethodsEqual(File expectedJava, File actualJava, String signature); static JavaMethod assertConstructorExists(File java, CharSequence signature); static JavaMethod assertMethodExists(File java, CharSequence methodSignature); }
JavaSourceAssert { public static JavaClass assertIsInterface(File java) throws IOException { JavaDocBuilder builder = new JavaDocBuilder(); JavaSource src = builder.addSource(java); JavaClass jc = getClassName(src, java); Assert.assertThat("Failed to parse java source: " + java.getAbsolutePath(), jc, notNullValue()); String msg = String.format("JavaSource: (%s) should be an interface: %s", jc.getName(), java); Assert.assertThat(msg, jc.isInterface(), is(true)); return jc; }  static JavaClass assertIsInterface(File java); static void assertBodyContains(AbstractJavaEntity entity, CharSequence expectedContents); static void assertMethodsEqual(JavaMethod expectedMethod, JavaMethod actualMethod); static void assertMethodsEqual(File expectedJava, File actualJava, String signature); static JavaMethod assertConstructorExists(File java, CharSequence signature); static JavaMethod assertMethodExists(File java, CharSequence methodSignature);  }