SGF-156 fix

This commit is contained in:
David Turanski
2013-02-23 10:26:10 -05:00
parent 822b2b9f52
commit 0be937c557
4 changed files with 15 additions and 11 deletions

View File

@@ -49,6 +49,16 @@ public class QueryStringUnitTests {
when(region.getName()).thenReturn("foo");
assertThat(query.forRegion(Person.class, region).toString(), is("SELECT * FROM /foo p WHERE p.firstname = $1"));
}
//SGF-156
@Test
public void replacesDomainObjectWithPluralRegionNameCorrectly() {
QueryString query = new QueryString("SELECT * FROM /Persons p WHERE p.firstname = $1");
when(region.getName()).thenReturn("Persons");
assertThat(query.forRegion(Person.class, region).toString(), is("SELECT * FROM /Persons p WHERE p.firstname = $1"));
}
@Test
public void bindsInValuesCorrectly() {

View File

@@ -79,13 +79,9 @@ public abstract class AbstractGemfireRepositoryFactoryIntegrationTests {
protected abstract PersonRepository getRepository(Regions regions);
@Test
public void foo() {
assertResultsFound(repository.findByFirstnameAnnotated("Dave"), dave);
}
@Test
public void executesAnnotatedInQueryMethodCorrectly() {
assertResultsFound(repository.findByFirstnameAnnotated("Dave"), dave);
assertResultsFound(repository.findByFirstnamesAnnotated(Arrays.asList("Carter", "Dave")), carter, dave);
}