Class AbstractFirestoreConnectJunit

java.lang.Object
net.officefloor.nosql.firestore.test.AbstractFirestoreConnectJunit
Direct Known Subclasses:
AbstractFirestoreJunit, FirestoreConnectExtension, FirestoreConnectRule

public class AbstractFirestoreConnectJunit extends Object
Abstract JUnit connect Firestore functionality.
Author:
Daniel Sagenschneider
  • Field Details

    • DEFAULT_LOCAL_FIRESTORE_PORT

      public static final int DEFAULT_LOCAL_FIRESTORE_PORT
      Default local Firestore port.
      See Also:
    • DEFAULT_EMULATOR_START_TIMEOUT

      public static final int DEFAULT_EMULATOR_START_TIMEOUT
      Default timeout for starting the emulator.
      See Also:
    • DEFAULT_PROJECT_ID

      public static final String DEFAULT_PROJECT_ID
      Default project id.
      See Also:
  • Constructor Details

  • Method Details

    • getFirestorePort

      protected int getFirestorePort()
      Obtains port Firestore running on.
      Returns:
      Port Firestore running on.
    • getFirestore

      public com.google.cloud.firestore.Firestore getFirestore()
      Obtains the Firestore.
      Returns:
      Firestore.
    • startFirestore

      protected void startFirestore() throws Exception
      Start Firestore connection.
      Throws:
      Exception - If fails to start.
    • extendStart

      protected void extendStart() throws Exception
      Extends starting Firestore.
      Throws:
      Exception - If fails extending start.
    • stopFirestore

      protected void stopFirestore() throws Exception
      Stops connection to Firestore.
      Throws:
      Exception - If fails to stop.
    • extendStop

      protected void extendStop() throws Exception
      Extends stopping Firestore.
      Throws:
      Exception - If fails extending stop.