Annotation Interface ProvideUniqueNetworkTableInstance
@Target(TYPE)
@Retention(RUNTIME)
@ExtendWith(com.team2813.lib2813.testing.junit.jupiter.ProvideUniqueNetworkTableInstanceExtension.class)
public @interface ProvideUniqueNetworkTableInstance
JUnit Jupiter annotation used to signal tests that need an isolated NetworkTableInstance.
Example use:
@ProvideUniqueNetworkTableInstance
public final class IntakeTest {
@Test
public void intakeCoral(NetworkTableInstance ntInstance) {
// Do something with ntInstance
}
}
- Since:
- 2.0.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to callPreferences.setNetworkTableInstance(edu.wpi.first.networktables.NetworkTableInstance)with the temporary network table instance before starting each test.doubleHow long to wait for the listener queue to empty before destroying the temporary network table instance.
-
Element Details
-
waitForListenerQueueSeconds
double waitForListenerQueueSecondsHow long to wait for the listener queue to empty before destroying the temporary network table instance.- Default:
0.6
-
replacePreferencesNetworkTable
boolean replacePreferencesNetworkTableWhether to callPreferences.setNetworkTableInstance(edu.wpi.first.networktables.NetworkTableInstance)with the temporary network table instance before starting each test.- Default:
false
-