Use Spring Java Format Checkstyle

Closes gh-1113
This commit is contained in:
Vedran Pavic
2018-07-23 15:16:35 +02:00
parent 7ac6e458e0
commit 3d2a742328
32 changed files with 116 additions and 270 deletions

View File

@@ -133,7 +133,7 @@ public class ReactiveRedisOperationsSessionRepositoryTests {
@Test
public void createSessionDefaultMaxInactiveInterval() {
StepVerifier.create(this.repository.createSession()).consumeNextWith(
session -> assertThat(session.getMaxInactiveInterval()).isEqualTo(Duration
(session) -> assertThat(session.getMaxInactiveInterval()).isEqualTo(Duration
.ofSeconds(MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS)))
.verifyComplete();
}
@@ -143,7 +143,7 @@ public class ReactiveRedisOperationsSessionRepositoryTests {
this.repository.setDefaultMaxInactiveInterval(600);
StepVerifier.create(this.repository.createSession())
.consumeNextWith(session -> assertThat(session.getMaxInactiveInterval())
.consumeNextWith((session) -> assertThat(session.getMaxInactiveInterval())
.isEqualTo(Duration.ofSeconds(600)))
.verifyComplete();
}
@@ -157,7 +157,7 @@ public class ReactiveRedisOperationsSessionRepositoryTests {
StepVerifier
.create(this.repository.createSession().doOnNext(this.repository::save))
.consumeNextWith(session -> {
.consumeNextWith((session) -> {
verify(this.redisOperations).opsForHash();
verify(this.hashOperations).putAll(anyString(), this.delta.capture());
verify(this.redisOperations).expire(anyString(), any());
@@ -325,7 +325,7 @@ public class ReactiveRedisOperationsSessionRepositoryTests {
given(this.hashOperations.entries(anyString()))
.willReturn(Flux.fromIterable(map.entrySet()));
StepVerifier.create(this.repository.findById("test")).consumeNextWith(session -> {
StepVerifier.create(this.repository.findById("test")).consumeNextWith((session) -> {
verify(this.redisOperations).opsForHash();
verify(this.hashOperations).entries(anyString());
verifyZeroInteractions(this.redisOperations);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2018 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.
@@ -43,10 +43,10 @@ import static org.mockito.Mockito.verify;
@RunWith(MockitoJUnitRunner.class)
public class RedisSessionExpirationPolicyTests {
// Wed Apr 15 10:28:32 CDT 2015
final static Long NOW = 1429111712346L;
static final Long NOW = 1429111712346L;
// Wed Apr 15 10:27:32 CDT 2015
final static Long ONE_MINUTE_AGO = 1429111652346L;
static final Long ONE_MINUTE_AGO = 1429111652346L;
@Mock
RedisOperations<Object, Object> sessionRedisOperations;