wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.04k stars 606 forks source link

[cmd] Use command factories and decorators in command tests #6652

Open KangarooKoala opened 1 month ago

KangarooKoala commented 1 month ago

Currently, tests use command class constructors to make commands (e.g., new RunCommand(() -> {})). This deviates from the recommended coding style and is not as readable. The tests should be updated to use command factories and decorators instead where applicable. The list below has every spot I noticed that should be changed (excluding spots where the class itself is being tested, such as the class-specific tests (e.g., ConditionalCommandTest) and RobotDisabledCommandTest).

Spots to change (in Java, haven't checked C++ yet):

Other notes: