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
  • Element Details

    • waitForListenerQueueSeconds

      double waitForListenerQueueSeconds
      How long to wait for the listener queue to empty before destroying the temporary network table instance.
      Default:
      0.6
    • replacePreferencesNetworkTable

      boolean replacePreferencesNetworkTable
      Whether to call Preferences.setNetworkTableInstance(edu.wpi.first.networktables.NetworkTableInstance) with the temporary network table instance before starting each test.
      Default:
      false