Search in sources :

Example 1 with NoOpRunnable

use of org.springframework.core.task.NoOpRunnable in project spring-framework by spring-projects.

the class ConcurrentTaskExecutorTests method passingNullExecutorToSetterResultsInDefaultTaskExecutorBeingUsed.

@Test
void passingNullExecutorToSetterResultsInDefaultTaskExecutorBeingUsed() {
    ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor();
    executor.setConcurrentExecutor(null);
    assertThatCode(() -> executor.execute(new NoOpRunnable())).doesNotThrowAnyException();
}
Also used : NoOpRunnable(org.springframework.core.task.NoOpRunnable) Test(org.junit.jupiter.api.Test)

Example 2 with NoOpRunnable

use of org.springframework.core.task.NoOpRunnable in project spring-framework by spring-projects.

the class ConcurrentTaskExecutorTests method zeroArgCtorResultsInDefaultTaskExecutorBeingUsed.

@Test
void zeroArgCtorResultsInDefaultTaskExecutorBeingUsed() {
    ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor();
    assertThatCode(() -> executor.execute(new NoOpRunnable())).doesNotThrowAnyException();
}
Also used : NoOpRunnable(org.springframework.core.task.NoOpRunnable) Test(org.junit.jupiter.api.Test)

Example 3 with NoOpRunnable

use of org.springframework.core.task.NoOpRunnable in project spring-framework by spring-projects.

the class ConcurrentTaskExecutorTests method passingNullExecutorToCtorResultsInDefaultTaskExecutorBeingUsed.

@Test
void passingNullExecutorToCtorResultsInDefaultTaskExecutorBeingUsed() {
    ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor(null);
    assertThatCode(() -> executor.execute(new NoOpRunnable())).doesNotThrowAnyException();
}
Also used : NoOpRunnable(org.springframework.core.task.NoOpRunnable) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)3 NoOpRunnable (org.springframework.core.task.NoOpRunnable)3