frc6377 / crescendo_2024

Other
5 stars 2 forks source link

Command Factory JUnit tests #220

Closed azvanderpas closed 7 months ago

azvanderpas commented 8 months ago

Justification

Seen issues crop up from the subsystem disable/enable feature, mixing proxy and non-proxy subsystem Commands, and Commands missing subsystem requirements all together.

217

Implementaion

Added JUnit testing to try to ensure that:

Added a getCommands() method to each CommandFactory which should return an array of all Commands created by the public factory methods with default parameters.

Tried to do this with Reflection to avoid the overhead, but it didn't appear maintainable, especially with generic typed parameters.

Testing Done

Caught some issues of each type and fixed them in this PR as well