From 7d9955fa7c0de9c99dd45c2e8f3a995f4097a63d Mon Sep 17 00:00:00 2001 From: Ishan <98932677+Ishan1522@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:02:03 -0500 Subject: [PATCH] remove a couple getters --- src/test/java/SwerveDriveTest.java | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/test/java/SwerveDriveTest.java b/src/test/java/SwerveDriveTest.java index 63437ea..718fa7f 100644 --- a/src/test/java/SwerveDriveTest.java +++ b/src/test/java/SwerveDriveTest.java @@ -51,16 +51,6 @@ void setUp() { swerveDrive.setKinematics(swerveDriveKinematics); } - @Test - void testGetGyroRate() { - // Mock gyro inputs - when(swerveDrive.getGyroRate()).thenReturn(0.5); - - // Test the getGyroRate method - double gyroRate = swerveDrive.getGyroRate(); - assertEquals(0.5, gyroRate, 0.001); - } - @Test void testDrive() { // Prepare mock module states @@ -81,19 +71,6 @@ void testDrive() { verify(swerveDrive.getKinematics()).toSwerveModuleStates(any(ChassisSpeeds.class)); } - @Test - void testGetPose() { - // Mock the pose estimator to return a specific pose - Pose2d mockPose = new Pose2d(1.0, 2.0, new Rotation2d(Math.toRadians(45))); - when(swerveDrive.getPose()).thenReturn(mockPose); - - // Call the getPose method and verify the returned pose - Pose2d pose = swerveDrive.getPose(); - assertEquals(1.0, pose.getX(), 0.001); - assertEquals(2.0, pose.getY(), 0.001); - assertEquals(Math.toRadians(45), pose.getRotation().getRadians(), 0.001); - } - @Test void testSetPose() { // Mock pose setter