[commands] Refactor ProxyScheduleCommand, SelectCommand into ProxyCommand (#4534)

This commit is contained in:
Starlight220
2022-11-29 00:43:10 +02:00
committed by GitHub
parent e82cd5147b
commit 70080457d5
16 changed files with 214 additions and 43 deletions

View File

@@ -11,14 +11,14 @@ import static org.mockito.Mockito.verify;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.jupiter.api.Test;
class ProxyScheduleCommandTest extends CommandTestBase {
class ProxyCommandTest extends CommandTestBase {
@Test
void proxyScheduleCommandScheduleTest() {
void proxyCommandScheduleTest() {
try (CommandScheduler scheduler = new CommandScheduler()) {
MockCommandHolder command1Holder = new MockCommandHolder(true);
Command command1 = command1Holder.getMock();
ProxyScheduleCommand scheduleCommand = new ProxyScheduleCommand(command1);
ProxyCommand scheduleCommand = new ProxyCommand(command1);
scheduler.schedule(scheduleCommand);
@@ -27,13 +27,13 @@ class ProxyScheduleCommandTest extends CommandTestBase {
}
@Test
void proxyScheduleCommandEndTest() {
void proxyCommandEndTest() {
try (CommandScheduler scheduler = CommandScheduler.getInstance()) {
AtomicBoolean cond = new AtomicBoolean();
WaitUntilCommand command = new WaitUntilCommand(cond::get);
ProxyScheduleCommand scheduleCommand = new ProxyScheduleCommand(command);
ProxyCommand scheduleCommand = new ProxyCommand(command);
scheduler.schedule(scheduleCommand);