Skip to content

Commit

Permalink
added exampleSybsystem test (i'll add comments later)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigalrmp committed Aug 21, 2023
1 parent 9094dbe commit eef1503
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import java.lang.AutoCloseable;

public class ExampleSubsystem extends SubsystemBase {
public class ExampleSubsystem extends SubsystemBase implements AutoCloseable {
/** Creates a new ExampleSubsystem. */
public ExampleSubsystem() {}

Expand Down Expand Up @@ -44,4 +45,6 @@ public void periodic() {
public void simulationPeriodic() {
// This method will be called once per scheduler run during simulation
}

public void close() {}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
package org.sciborgs1155.robot.subsystems;

public class ExampleSubsystemTest {}
import org.junit.jupiter.api.*;
import org.sciborgs1155.robot.testingUtil.BasicPackage;

public class ExampleSubsystemTest {

ExampleSubsystem exampleSubsystem;

@BeforeEach
void setup() {
BasicPackage.setupHAL();
exampleSubsystem = new ExampleSubsystem();
}

@Test
void test() {}

@AfterEach
void reset() throws Exception {
BasicPackage.closeSubsystem(exampleSubsystem);
}
}

0 comments on commit eef1503

Please sign in to comment.