Refactor Redis configuration
Closes gh-941
This commit is contained in:
@@ -110,27 +110,11 @@ public class RedisOperationsSessionRepositoryTests {
|
||||
this.cached.setLastAccessedTime(Instant.ofEpochMilli(1404360000000L));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void constructorNullConnectionFactory() {
|
||||
new RedisOperationsSessionRepository((RedisConnectionFactory) null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void setApplicationEventPublisherNull() {
|
||||
this.redisRepository.setApplicationEventPublisher(null);
|
||||
}
|
||||
|
||||
// gh-61
|
||||
@Test
|
||||
public void constructorConnectionFactory() {
|
||||
this.redisRepository = new RedisOperationsSessionRepository(this.factory);
|
||||
RedisSession session = this.redisRepository.createSession();
|
||||
|
||||
given(this.factory.getConnection()).willReturn(this.connection);
|
||||
|
||||
this.redisRepository.save(session);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void changeSessionId() {
|
||||
RedisSession createSession = this.redisRepository.createSession();
|
||||
|
||||
Reference in New Issue
Block a user