Add utility class tests (#871)

Checks for classes that only have static methods.
This commit is contained in:
Austin Shalit
2018-05-24 20:39:15 -04:00
committed by Peter Johnson
parent 863cfde394
commit 2e5fece594
7 changed files with 128 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ import edu.wpi.first.wpilibj.hal.PowerJNI;
*/
public final class RobotController {
private RobotController() {
throw new UnsupportedOperationException("This is a utility class!");
}
/**

View File

@@ -45,6 +45,10 @@ public class LiveWindow {
private static boolean liveWindowEnabled = false;
private static boolean telemetryEnabled = true;
private LiveWindow() {
throw new UnsupportedOperationException("This is a utility class!");
}
public static synchronized boolean isEnabled() {
return liveWindowEnabled;
}

View File

@@ -51,6 +51,10 @@ public class SmartDashboard {
HLUsageReporting.reportSmartDashboard();
}
private SmartDashboard() {
throw new UnsupportedOperationException("This is a utility class!");
}
/**
* Maps the specified key to the specified value in this table. The key can not be null. The value
* can be retrieved by calling the get method with a key that is equal to the original key.