mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[commands] Refactor ProxyScheduleCommand, SelectCommand into ProxyCommand (#4534)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user