use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method detectsCollectionMethodForArrayRetrunType.
// DATACMNS-471
@Test
public void detectsCollectionMethodForArrayRetrunType() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("arrayOfUsers");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isTrue();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method detectsWrapperWithinWrapper.
/**
* @see DATACMNS-940
*/
@Test
public void detectsWrapperWithinWrapper() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsFutureOfSeq");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isTrue();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method doesNotRejectSeqForPagination.
// DATACMNS-1005
@Test
public void doesNotRejectSeqForPagination() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsSeq", Pageable.class);
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isTrue();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method considersMethodReturningAStreamStreaming.
// DATACMNS-650
@Test
public void considersMethodReturningAStreamStreaming() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("streaming");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isStreamQuery()).isTrue();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method doesNotRejectFutureQueryForEntityCollection.
// DATACMNS-716
@Test
public void doesNotRejectFutureQueryForEntityCollection() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsFutureForEntityCollection");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isTrue();
}
Aggregations