mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
imported dependencies, mocks gone, code builds
This commit is contained in:
+8
-6
@@ -7,12 +7,14 @@
|
||||
|
||||
package frc4388.robot.subsystems;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
// import static org.junit.Assert.assertEquals;
|
||||
// import static org.mockito.Mockito.mock;
|
||||
// import org.junit.Test;
|
||||
|
||||
import edu.wpi.first.wpilibj.*;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.Spark;
|
||||
import frc4388.robot.Constants.LEDConstants;
|
||||
import frc4388.utility.LEDPatterns;
|
||||
|
||||
@@ -23,7 +25,7 @@ public class LEDSubsystemTest {
|
||||
@Test
|
||||
public void testConstructor() {
|
||||
// Arrange
|
||||
Spark ledController = mock(Spark.class);
|
||||
Spark ledController = new Spark(0);
|
||||
|
||||
// Act
|
||||
LED led = new LED(ledController);
|
||||
@@ -35,7 +37,7 @@ public class LEDSubsystemTest {
|
||||
@Test
|
||||
public void testPatterns() {
|
||||
// Arrange
|
||||
Spark ledController = mock(Spark.class);
|
||||
Spark ledController = new Spark(0);
|
||||
LED led = new LED(ledController);
|
||||
|
||||
// Act
|
||||
+6
-5
@@ -7,13 +7,14 @@
|
||||
|
||||
package frc4388.utility;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
// import static org.junit.Assert.*;
|
||||
// import static org.mockito.Mockito.*;
|
||||
|
||||
import com.kauailabs.navx.frc.AHRS;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
import frc4388.mocks.MockPigeonIMU;
|
||||
import frc4388.robot.Constants.DriveConstants;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class RobotGyroUtilityTest {
|
||||
public void testConstructor() {
|
||||
// Arrange
|
||||
MockPigeonIMU pigeon = new MockPigeonIMU(DriveConstants.DRIVE_PIGEON_ID);
|
||||
AHRS navX = mock(AHRS.class);
|
||||
AHRS navX = new AHRS();
|
||||
gyroPigeon = new RobotGyro(pigeon);
|
||||
gyroNavX = new RobotGyro(navX);
|
||||
|
||||
+3
-2
@@ -7,9 +7,10 @@
|
||||
|
||||
package frc4388.utility;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.*;
|
||||
// import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Add your docs here.
|
||||
Reference in New Issue
Block a user