Class AbstractTest

java.lang.Object
de.bwaldvogel.mongo.backend.AbstractTest
Direct Known Subclasses:
AbstractAggregationTest, AbstractBackendTest, AbstractOplogTest, AbstractPerformanceTest

public abstract class AbstractTest extends Object
  • Field Details

    • ADMIN_DB_NAME

      protected static final String ADMIN_DB_NAME
      See Also:
    • TEST_DATABASE_NAME

      protected static final String TEST_DATABASE_NAME
      See Also:
    • clock

      protected static final TestClock clock
    • syncClient

      protected static com.mongodb.client.MongoClient syncClient
    • db

      protected static com.mongodb.client.MongoDatabase db
    • collection

      protected static com.mongodb.client.MongoCollection<org.bson.Document> collection
    • connectionString

      protected static com.mongodb.ConnectionString connectionString
    • backend

      protected static de.bwaldvogel.mongo.MongoBackend backend
  • Constructor Details

    • AbstractTest

      public AbstractTest()
  • Method Details

    • createBackend

      protected abstract de.bwaldvogel.mongo.MongoBackend createBackend() throws Exception
      Throws:
      Exception
    • setUp

      @BeforeEach public void setUp() throws Exception
      Throws:
      Exception
    • dropAllDatabases

      protected void dropAllDatabases()
    • killCursors

      protected void killCursors(List<Long> cursorIds)
    • tearDown

      @AfterAll public static void tearDown()
    • setUpBackend

      protected void setUpBackend() throws Exception
      Throws:
      Exception
    • restart

      protected void restart() throws Exception
      Throws:
      Exception
    • assertThat

      protected static org.assertj.core.api.MapAssert<String,Object> assertThat(org.bson.Document actual)
    • assertThat

      protected static org.assertj.core.api.AbstractLongAssert<?> assertThat(Long actual)
    • assertThat

      protected static org.assertj.core.api.AbstractDoubleAssert<?> assertThat(Double actual)
    • assertThat

      protected static org.assertj.core.api.AbstractStringAssert<?> assertThat(String actual)
    • assertThat

      protected static <T> org.assertj.core.api.ObjectAssert<T> assertThat(T actual)
    • assertThat

      protected static org.assertj.core.api.AbstractIntegerAssert<?> assertThat(Integer actual)
    • assertThat

      protected static org.assertj.core.api.AbstractBooleanAssert<?> assertThat(Boolean actual)
    • assertThat

      protected static org.assertj.core.api.AbstractInstantAssert<?> assertThat(Instant actual)
    • assertThat

      protected static org.assertj.core.api.AbstractDateAssert<?> assertThat(Date actual)
    • assertThat

      protected static <T> org.assertj.core.api.IterableAssert<T> assertThat(Iterable<T> actual)
    • assertThat

      protected static org.assertj.core.api.AbstractThrowableAssert<?,? extends Throwable> assertThat(Throwable actual)
    • listDatabaseNames

      protected List<String> listDatabaseNames()
    • runCommand

      protected org.bson.Document runCommand(String commandName)
    • runCommand

      protected org.bson.Document runCommand(org.bson.Document command)
    • getAdminDb

      protected com.mongodb.client.MongoDatabase getAdminDb()
    • getNumberOfOpenCursors

      protected long getNumberOfOpenCursors()
    • awaitNumberOfOpenCursors

      protected void awaitNumberOfOpenCursors(long expectedNumberOfOpenCursors) throws Exception
      Throws:
      Exception