Continue renaming SessionIdGenerationStrategy to SessionIdGenerator

This commit is contained in:
Yanming Zhou
2023-08-07 13:13:44 +08:00
committed by Marcus Hert Da Coregio
parent b4e9af9ca4
commit f7662b03b3
15 changed files with 71 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2023 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.
@@ -44,7 +44,7 @@ class MapSessionTests {
}
@Test
void constructorWhenSessionIdGenerationStrategyThenUsesStrategy() {
void constructorWhenSessionIdGeneratorThenUsesStrategy() {
MapSession session = new MapSession(new FixedSessionIdGenerator("my-id"));
assertThat(session.getId()).isEqualTo("my-id");
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 the original author or authors.
* Copyright 2014-2023 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.
@@ -153,7 +153,7 @@ class ReactiveMapSessionRepositoryTests {
}
@Test
void createSessionWhenSessionIdGenerationStrategyThenUses() {
void createSessionWhenSessionIdGeneratorThenUses() {
this.repository.setSessionIdGenerator(() -> "test");
MapSession session = this.repository.createSession().block();
assertThat(session.getId()).isEqualTo("test");
@@ -161,13 +161,13 @@ class ReactiveMapSessionRepositoryTests {
}
@Test
void setSessionIdGenerationStrategyWhenNullThenThrowsException() {
void setSessionIdGeneratorWhenNullThenThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> this.repository.setSessionIdGenerator(null))
.withMessage("sessionIdGenerator cannot be null");
}
@Test
void findByIdWhenChangeSessionIdThenUsesSessionIdGenerationStrategy() {
void findByIdWhenChangeSessionIdThenUsesSessionIdGenerator() {
this.repository.setSessionIdGenerator(() -> "test");
MapSession session = this.repository.createSession().block();