mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-30 16:52:13 +00:00
Adjust Test Names
Issue gh-9514
This commit is contained in:
parent
e1e31939a3
commit
7ed38f1a26
@ -80,12 +80,12 @@ public class DelegatingSecurityContextTaskSchedulerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchedulerIsNotNull() {
|
||||
public void constructorWhenNullThenException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new DelegatingSecurityContextTaskScheduler(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchedulerCurrentSecurityContext() throws Exception {
|
||||
public void scheduleWhenDefaultThenCurrentSecurityContextPropagated() throws Exception {
|
||||
willAnswer((invocation) -> {
|
||||
assertThat(SecurityContextHolder.getContext()).isEqualTo(this.originalSecurityContext);
|
||||
return null;
|
||||
@ -96,7 +96,7 @@ public class DelegatingSecurityContextTaskSchedulerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchedulerExplicitSecurityContext() throws Exception {
|
||||
public void scheduleWhenSecurityContextThenSecurityContextPropagated() throws Exception {
|
||||
willAnswer((invocation) -> {
|
||||
assertThat(SecurityContextHolder.getContext()).isEqualTo(this.securityContext);
|
||||
return null;
|
||||
@ -115,27 +115,27 @@ public class DelegatingSecurityContextTaskSchedulerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchedulerWithRunnableAndTrigger() {
|
||||
public void scheduleWhenRunnableTriggerThenDelegates() {
|
||||
this.delegatingSecurityContextTaskScheduler.schedule(this.runnable, this.trigger);
|
||||
verify(this.scheduler).schedule(any(Runnable.class), any(Trigger.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSchedulerWithRunnableAndInstant() {
|
||||
public void scheduleWhenRunnableDateThenDelegates() {
|
||||
Instant date = Instant.now();
|
||||
this.delegatingSecurityContextTaskScheduler.schedule(this.runnable, date);
|
||||
verify(this.scheduler).schedule(any(Runnable.class), any(Date.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScheduleAtFixedRateWithRunnableAndDate() {
|
||||
public void scheduleAtFixedRateWhenRunnableDateLongThenDelegates() {
|
||||
Date date = new Date(1544751374L);
|
||||
this.delegatingSecurityContextTaskScheduler.scheduleAtFixedRate(this.runnable, date, 1000L);
|
||||
verify(this.scheduler).scheduleAtFixedRate(isA(Runnable.class), isA(Date.class), eq(1000L));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScheduleAtFixedRateWithRunnableAndLong() {
|
||||
public void scheduleAtFixedRateWhenRunnableLongThenDelegates() {
|
||||
this.delegatingSecurityContextTaskScheduler.scheduleAtFixedRate(this.runnable, 1000L);
|
||||
verify(this.scheduler).scheduleAtFixedRate(isA(Runnable.class), eq(1000L));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user