use of org.springframework.data.repository.sample.User in project spring-data-commons by spring-projects.
the class RepositoryFactorySupportUnitTests method wrapsExecutionResultIntoListenableFutureIfConfigured.
// DATACMNS-714
@Test
public void wrapsExecutionResultIntoListenableFutureIfConfigured() throws Exception {
assumeThat(SPRING_VERSION.isGreaterThanOrEqualTo(FOUR_DOT_TWO), is(true));
User reference = new User();
expect(prepareConvertingRepository(reference).findOneByLastname("Foo"), reference);
}
use of org.springframework.data.repository.sample.User in project spring-data-commons by spring-projects.
the class RepositoryFactorySupportUnitTests method wrapsExecutionResultIntoCompletableFutureIfConfigured.
// DATACMNS-714
@Test
public void wrapsExecutionResultIntoCompletableFutureIfConfigured() throws Exception {
assumeThat(SPRING_VERSION.isGreaterThanOrEqualTo(FOUR_DOT_TWO), is(true));
User reference = new User();
expect(prepareConvertingRepository(reference).findOneByFirstname("Foo"), reference);
}
use of org.springframework.data.repository.sample.User in project spring-data-commons by spring-projects.
the class ResourceReaderRepositoryInitializerUnitTests method emitsRepositoriesPopulatedEventIfPublisherConfigured.
// DATACMNS-224
@Test
public void emitsRepositoriesPopulatedEventIfPublisherConfigured() throws Exception {
RepositoryPopulator populator = setUpReferenceAndInititalize(new User(), publisher);
ApplicationEvent event = new RepositoriesPopulatedEvent(populator, repositories);
verify(publisher, times(1)).publishEvent(event);
}
use of org.springframework.data.repository.sample.User in project spring-data-commons by spring-projects.
the class RepositoriesIntegrationTests method returnsPersistentEntityForProxiedClass.
// DATACMNS-376
@Test
public void returnsPersistentEntityForProxiedClass() {
User user = mock(User.class);
assertThat(repositories.getPersistentEntity(user.getClass())).isNotNull();
}
use of org.springframework.data.repository.sample.User in project spring-data-commons by spring-projects.
the class RepositoryFactorySupportUnitTests method wrapsExecutionResultIntoListenableFutureWithEntityCollectionIfConfigured.
// DATACMNS-714
@Test
public void wrapsExecutionResultIntoListenableFutureWithEntityCollectionIfConfigured() throws Exception {
List<User> reference = Collections.singletonList(new User());
expect(prepareConvertingRepository(reference).readAllByLastname("Foo"), reference);
}
Aggregations