mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
SCRIPT: Spotless Apply
This commit is contained in:
committed by
Peter Johnson
parent
c89910b7c6
commit
c48b722dac
@@ -4,11 +4,11 @@
|
||||
|
||||
package org.wpilib;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.junit.jupiter.api.extension.BeforeAllCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
|
||||
public final class MockHardwareExtension implements BeforeAllCallback {
|
||||
private static ExtensionContext getRoot(ExtensionContext context) {
|
||||
|
||||
@@ -9,12 +9,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class CommandDecoratorTest extends CommandTestBase {
|
||||
@Test
|
||||
|
||||
@@ -11,9 +11,9 @@ import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class CommandScheduleTest extends CommandTestBase {
|
||||
@Test
|
||||
|
||||
@@ -8,13 +8,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.networktables.BooleanPublisher;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.networktables.BooleanPublisher;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
|
||||
class CommandSendableButtonTest extends CommandTestBase {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.command2;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
import java.util.Set;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
|
||||
/** Basic setup for all {@link Command tests}. */
|
||||
public class CommandTestBase {
|
||||
|
||||
@@ -10,13 +10,13 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
|
||||
class ConditionalCommandTest extends CommandTestBase {
|
||||
@Test
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
|
||||
abstract class MultiCompositionTestBase<T extends Command> extends SingleCompositionTestBase<T> {
|
||||
abstract T compose(Command... members);
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.command2;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class NotifierCommandTest extends CommandTestBase {
|
||||
@BeforeEach
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
package org.wpilib.command2;
|
||||
|
||||
import static org.wpilib.command2.Commands.parallel;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.wpilib.command2.Commands.parallel;
|
||||
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -9,12 +9,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.command2.Command.InterruptionBehavior;
|
||||
|
||||
class SchedulingRecursionTest extends CommandTestBase {
|
||||
/**
|
||||
|
||||
@@ -12,12 +12,12 @@ import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class WaitCommandTest extends CommandTestBase {
|
||||
@BeforeEach
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.wpilib.command2.button;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
import org.wpilib.command2.CommandTestBase;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
import org.wpilib.command2.CommandTestBase;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
|
||||
class NetworkButtonTest extends CommandTestBase {
|
||||
NetworkTableInstance m_inst;
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.command2.button;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.command2.CommandTestBase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.command2.CommandTestBase;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
|
||||
class RobotModeTriggersTest extends CommandTestBase {
|
||||
@Test
|
||||
|
||||
@@ -10,7 +10,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.CommandScheduler;
|
||||
import org.wpilib.command2.CommandTestBase;
|
||||
@@ -18,10 +21,7 @@ import org.wpilib.command2.FunctionalCommand;
|
||||
import org.wpilib.command2.RunCommand;
|
||||
import org.wpilib.command2.StartEndCommand;
|
||||
import org.wpilib.command2.WaitUntilCommand;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class TriggerTest extends CommandTestBase {
|
||||
@Test
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package org.wpilib.command2.sysid;
|
||||
|
||||
import static org.wpilib.units.Units.Volts;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.atLeastOnce;
|
||||
import static org.mockito.Mockito.clearInvocations;
|
||||
@@ -12,16 +11,17 @@ import static org.mockito.Mockito.inOrder;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.wpilib.units.Units.Volts;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.units.measure.Voltage;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.wpilib.sysid.SysIdRoutineLog;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.Subsystem;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.command2.Command;
|
||||
import org.wpilib.command2.Subsystem;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.wpilib.sysid.SysIdRoutineLog;
|
||||
import org.wpilib.units.measure.Voltage;
|
||||
|
||||
class SysIdRoutineTest {
|
||||
interface Mechanism extends Subsystem {
|
||||
|
||||
Reference in New Issue
Block a user