Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'com.google.truth:truth:1.4.4'
testImplementation 'com.team2813:testing'

implementation 'com.team2813:lib2813'
implementation 'com.team2813:limelight'
Expand All @@ -154,7 +155,9 @@ test {
// Simulation configuration (e.g. environment variables).
wpi.sim.addGui().defaultEnabled = true
wpi.sim.addDriverstation()

downloadDepsPreemptively.dependsOn gradle.includedBuild('lib2813').task(':lib:jar')
downloadDepsPreemptively.dependsOn gradle.includedBuild('lib2813').task(':testing:jar')
downloadDepsPreemptively.dependsOn gradle.includedBuild('lib2813').task(':limelight:jar')

// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ includeBuild('lib2813') {
dependencySubstitution {
substitute module('com.team2813:lib2813') using project(':lib')
substitute module('com.team2813:limelight') using project(':limelight')
substitute module('com.team2813:testing') using project(':testing')
}
}
14 changes: 0 additions & 14 deletions src/test/java/com/team2813/CommandTester.java

This file was deleted.

85 changes: 0 additions & 85 deletions src/test/java/com/team2813/CommandTesterExtension.java

This file was deleted.

6 changes: 3 additions & 3 deletions src/test/java/com/team2813/subsystems/IntakeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;

import com.team2813.CommandTester;
import com.team2813.CommandTesterExtension;
import com.team2813.IsolatedNetworkTablesExtension;
import com.team2813.lib2813.testing.junit.jupiter.CommandTester;
import com.team2813.lib2813.testing.junit.jupiter.WPILibExtension;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj2.command.Command;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Answers;

@ExtendWith({IsolatedNetworkTablesExtension.class, CommandTesterExtension.class})
@ExtendWith({IsolatedNetworkTablesExtension.class, WPILibExtension.class})
public final class IntakeTest {
final FakePIDMotor fakeMotor = mock(FakePIDMotor.class, Answers.CALLS_REAL_METHODS);
final DigitalInput mockBeamBreak = mock(DigitalInput.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyNoInteractions;

import com.team2813.CommandTester;
import com.team2813.CommandTesterExtension;
import com.team2813.lib2813.control.ControlMode;
import com.team2813.lib2813.control.PIDMotor;
import com.team2813.lib2813.testing.junit.jupiter.CommandTester;
import com.team2813.lib2813.testing.junit.jupiter.WPILibExtension;
import edu.wpi.first.wpilibj2.command.Command;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand All @@ -17,7 +17,7 @@

@ParameterizedClass
@EnumSource(ControlMode.class)
@ExtendWith(CommandTesterExtension.class)
@ExtendWith(WPILibExtension.class)
public final class ParameterizedIntakeSubsystemTest {

private static class ConcreteParameterizedIntakeSubsystem extends ParameterizedIntakeSubsystem {
Expand Down