SGF-576 - Adapt API in GemfireRepositoryFactoryBean.

Related ticket: DATACMNS-891.
This commit is contained in:
Oliver Gierke
2016-12-15 21:56:34 +01:00
parent c982d6ee74
commit fe4527a45a
3 changed files with 17 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012 the original author or authors.
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,11 @@
package org.springframework.data.gemfire.cache;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.*;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import java.io.Serializable;
import java.util.List;
@@ -51,10 +55,6 @@ import org.springframework.stereotype.Service;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
/**
* Integration tests testing the contractual behavior and combination of using Spring'a {@link CachePut} annotation
* followed by a {@link CacheEvict} annotation on an application {@link @Service} component.
@@ -182,10 +182,9 @@ public class CompoundCachePutCacheEvictIntegrationTests {
@Bean
GemfireRepositoryFactoryBean<PersonRepository, Person, Long> personRepository() {
GemfireRepositoryFactoryBean<PersonRepository, Person, Long> personRepository =
new GemfireRepositoryFactoryBean<PersonRepository, Person, Long>();
new GemfireRepositoryFactoryBean<PersonRepository, Person, Long>(PersonRepository.class);
personRepository.setGemfireMappingContext(new GemfireMappingContext());
personRepository.setRepositoryInterface(PersonRepository.class);
return personRepository;
}

View File

@@ -55,7 +55,7 @@ public class GemfireRepositoryFactoryBeanTest {
@Before
public void setup() {
repositoryFactoryBean = new GemfireRepositoryFactoryBean();
repositoryFactoryBean = new GemfireRepositoryFactoryBean(PersonRepository.class);
}
@Test
@@ -82,7 +82,6 @@ public class GemfireRepositoryFactoryBeanTest {
doReturn(Collections.singletonMap("simple", region)).when(applicationContext).getBeansOfType(Region.class);
repositoryFactoryBean.setApplicationContext(applicationContext);
repositoryFactoryBean.setRepositoryInterface(PersonRepository.class);
repositoryFactoryBean.setGemfireMappingContext(new GemfireMappingContext());
repositoryFactoryBean.afterPropertiesSet();