use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method doesNotRejectCompletableFutureQueryForSingleEntity.
// DATACMNS-716
@Test
public void doesNotRejectCompletableFutureQueryForSingleEntity() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsCompletableFutureForSingleEntity");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isFalse();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method doesNotRejectCompletableFutureQueryForEntityCollection.
// DATACMNS-716
@Test
public void doesNotRejectCompletableFutureQueryForEntityCollection() throws Exception {
assumeThat(SPRING_VERSION.isGreaterThanOrEqualTo(FOUR_DOT_TWO), is(true));
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsCompletableFutureForEntityCollection");
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 detectsCustomCollectionReturnType.
/**
* @see DATACMNS-940
*/
@Test
public void detectsCustomCollectionReturnType() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsSeq");
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 doesNotRejectFutureQueryForSingleEntity.
// DATACMNS-716
@Test
public void doesNotRejectFutureQueryForSingleEntity() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsFutureForSingleEntity");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isFalse();
}
use of org.springframework.data.repository.core.RepositoryMetadata in project spring-data-commons by spring-projects.
the class QueryMethodUnitTests method detectsSinglValueWrapperWithinWrapper.
/**
* @see DATACMNS-940
*/
@Test
public void detectsSinglValueWrapperWithinWrapper() throws Exception {
RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(SampleRepository.class);
Method method = SampleRepository.class.getMethod("returnsFutureOfOption");
assertThat(new QueryMethod(method, repositoryMetadata, factory).isCollectionQuery()).isFalse();
}
Aggregations