Align after merge from 6.1.x
This commit is contained in:
@@ -679,6 +679,32 @@ class ScheduledAnnotationBeanPostProcessorTests {
|
||||
}
|
||||
|
||||
|
||||
static ScheduledMethodRunnableAssert assertThatScheduledRunnable(Runnable runnable) {
|
||||
return new ScheduledMethodRunnableAssert(runnable);
|
||||
}
|
||||
|
||||
|
||||
static class ScheduledMethodRunnableAssert extends AbstractAssert<ScheduledMethodRunnableAssert, Runnable> {
|
||||
|
||||
public ScheduledMethodRunnableAssert(Runnable actual) {
|
||||
super(actual, ScheduledMethodRunnableAssert.class);
|
||||
assertThat(actual).extracting("runnable").isInstanceOf(ScheduledMethodRunnable.class);
|
||||
}
|
||||
|
||||
public ScheduledMethodRunnableAssert hasTarget(Object target) {
|
||||
isNotNull();
|
||||
assertThat(actual).extracting("runnable.target").isEqualTo(target);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScheduledMethodRunnableAssert hasMethodName(String name) {
|
||||
isNotNull();
|
||||
assertThat(actual).extracting("runnable.method.name").isEqualTo(name);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static class FixedDelay {
|
||||
|
||||
@Scheduled(fixedDelay = 5_000)
|
||||
@@ -1019,29 +1045,4 @@ class ScheduledAnnotationBeanPostProcessorTests {
|
||||
}
|
||||
}
|
||||
|
||||
static ScheduledMethodRunnableAssert assertThatScheduledRunnable(Runnable runnable) {
|
||||
return new ScheduledMethodRunnableAssert(runnable);
|
||||
}
|
||||
|
||||
static class ScheduledMethodRunnableAssert extends AbstractAssert<ScheduledMethodRunnableAssert, Runnable> {
|
||||
|
||||
public ScheduledMethodRunnableAssert(Runnable actual) {
|
||||
super(actual, ScheduledMethodRunnableAssert.class);
|
||||
assertThat(actual).extracting("runnable").isInstanceOf(ScheduledMethodRunnable.class);
|
||||
}
|
||||
|
||||
public ScheduledMethodRunnableAssert hasTarget(Object target) {
|
||||
isNotNull();
|
||||
assertThat(actual).extracting("runnable.target").isEqualTo(target);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScheduledMethodRunnableAssert hasMethodName(String name) {
|
||||
isNotNull();
|
||||
assertThat(actual).extracting("runnable.method.name").isEqualTo(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user