Skip to content

Commit caab1c5

Browse files
committed
added tests for MotorControllerFactory
1 parent e7fe9f9 commit caab1c5

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/test/java/org/carlmontrobotics/lib199/MotorControllerFactoryTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ public class MotorControllerFactoryTest extends ErrStreamTest {
2020
public void testCreateNoErrors() throws Exception {
2121
// Call close to free PWM ports
2222
((AutoCloseable)MotorControllerFactory.createTalon(0)).close();
23+
2324
MotorControllerFactory.createSparkMax(2, MotorConfig.NEO);
25+
MotorControllerFactory.createSparkMax(3, MotorConfig.NEO, MotorControllerFactory.sparkConfig(MotorConfig.NEO));
26+
27+
MotorControllerFactory.createSparkFlex(10);
28+
MotorControllerFactory.createSparkFlex(10, MotorConfig.NEO_VORTEX, MotorControllerFactory.sparkConfig(MotorConfig.NEO_VORTEX));
29+
30+
MotorControllerFactory.createSpark(20, MotorConfig.NEO);
31+
MotorControllerFactory.createSpark(21, MotorConfig.NEO_2);
32+
MotorControllerFactory.createSpark(22, MotorConfig.NEO_VORTEX);
33+
MotorControllerFactory.createSpark(23, MotorConfig.NEO, MotorControllerFactory.sparkConfig(MotorConfig.NEO_VORTEX));
34+
MotorControllerFactory.createSpark(24, MotorConfig.NEO_2, MotorControllerFactory.sparkConfig(MotorConfig.NEO_VORTEX));
35+
MotorControllerFactory.createSpark(25, MotorConfig.NEO_VORTEX, MotorControllerFactory.sparkConfig(MotorConfig.NEO_VORTEX));
36+
2437
assertEquals(0, errStream.toByteArray().length);
2538
}
2639

0 commit comments

Comments
 (0)