Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*
* @author Oliver Gierke
* @author Phillip Webb
* @author Thomas Darimont
*/
public class PartTreeUnitTests {

Expand Down Expand Up @@ -357,6 +358,22 @@ public void resolvesPropertyPathFromGettersOnInterfaces() {
assertThat(new PartTree("findByCategoryId", Product.class), is(notNullValue()));
}

/**
* @see DATACMNS-368
*/
@Test
public void detectPropertyWithOrKeywordPart() {
assertThat(new PartTree("findByOrder", Product.class), is(notNullValue()));
}

/**
* @see DATACMNS-368
*/
@Test
public void detectPropertyWithAndKeywordPart() {
assertThat(new PartTree("findByAnders", Product.class), is(notNullValue()));
}

private static void assertType(Iterable<String> sources, Type type, String property) {
assertType(sources, type, property, 1, true);
}
Expand Down Expand Up @@ -434,15 +451,33 @@ class Organization {
class DomainObjectWithSpecialChars {
String øre;
String år;

public Order getOrder() {
return null;
}
}

interface Product {

Order getOrder(); // contains Or keyword

Anders getAnders(); // constains And keyword

Category getCategory();
}

interface Category {

Long getId();
}

interface Order {

Long getId();
}

interface Anders {

Long getId();
}
}