DATACOUCH-75 - Trim off find on custom repository finder.

This commit is contained in:
Michael Nitschinger
2014-03-12 13:13:02 +01:00
parent 9e1f730f66
commit b3a4069696
3 changed files with 11 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.InvalidDataAccessResourceUsageException;
import org.springframework.data.couchbase.TestApplicationConfig;
import org.springframework.data.couchbase.core.CouchbaseTemplate;
import org.springframework.data.couchbase.repository.support.CouchbaseRepositoryFactory;
@@ -72,4 +73,9 @@ public class CouchbaseRepositoryViewTests {
assertThat(value, is(100L));
}
@Test(expected = InvalidDataAccessResourceUsageException.class)
public void shouldTrimOffFindOnCustomFinder() {
repository.findAllSomething();
}
}

View File

@@ -31,4 +31,6 @@ public interface CustomUserRepository extends CouchbaseRepository<User, String>
@View(designDocument = "userCustom", viewName = "customCountView")
long count();
Iterable<User> findAllSomething();
}