assertThat(javaFile.getLongName(), is("foo.bar.MyFile"));
assertThat(javaFile.getName(), is("MyFile"));
assertThat(javaFile.getParent().getKey(), is("foo.bar"));
}
@Test
<BUG>public void shouldResolveFromAbsolutePathEvenIfDefaultPackage() throws IOException {
List<File> sources = Arrays.asList(newDir("source1"), newDir("source2"));
JavaFile javaClass = JavaFile.fromAbsolutePath(absPath("source1/MyClass.java"), sources, false);
</BUG>
assertEquals(JavaPackage.DEFAULT_PACKAGE_NAME + ".MyClass", javaClass.getKey());

assertThat(javaFile.getLongName(), is("foo.bar.MyFile"));
assertThat(javaFile.getName(), is("MyFile"));
assertThat(javaFile.getParent().getKey(), is("foo.bar"));
}
@Test
public void shouldResolveFromAbsolutePathEvenIfDefaultPackage() throws IOException {
File source1 = newDir("source1");
File source2 = newDir("source2");
List<File> sources = Arrays.asList(source1, source2);
JavaFile javaClass = JavaFile.fromAbsolutePath(absPath(source1, "MyClass.java"), sources, false);
assertEquals(JavaPackage.DEFAULT_PACKAGE_NAME + ".MyClass", javaClass.getKey());
