DATAJPA-324 - Test case to show property lookup on interface methods work.

This commit is contained in:
Oliver Gierke
2013-04-05 20:44:40 +02:00
parent a7820c8cc6
commit 59af5770dd

View File

@@ -349,6 +349,14 @@ public class PartTreeUnitTests {
assertThat(tree.isDistinct(), is(true));
}
/**
* @see DATAJPA-324
*/
@Test
public void resolvesPropertyPathFromGettersOnInterfaces() {
assertThat(new PartTree("findByCategoryId", Product.class), is(notNullValue()));
}
private static void assertType(Iterable<String> sources, Type type, String property) {
assertType(sources, type, property, 1, true);
}
@@ -427,4 +435,14 @@ public class PartTreeUnitTests {
String øre;
String år;
}
interface Product {
Category getCategory();
}
interface Category {
Long getId();
}
}