runGenericTests: Run generic tests.

View source: R/generic_tests.R

runGenericTestsR Documentation

Run generic tests.

Description

This function must be used in tests on all connector classes, before any specific tests.

Usage

runGenericTests(
  conn,
  pkgName,
  testRefFolder = NULL,
  opt = NULL,
  short = TRUE,
  long = FALSE,
  maxShortTestRefEntries = 1
)

Arguments

conn

A valid biodb connector.

pkgName

The name of your package.

testRefFolder

The folder where to find test reference files.

opt

A set of options to pass to the test functions.

short

Run short tests.

long

Run long tests.

maxShortTestRefEntries

The maximum number of reference entries to use in short tests.

Value

Nothing.

Examples

# Instantiate a Biodb instance for testing
biodb <- biodb::createBiodbTestInstance()

# Create a connector instance
lcmsdb <- system.file("extdata", "massbank_extract.tsv", package="biodb")
conn <- biodb$getFactory()$createConn('mass.csv.file', lcmsdb)

# Run generic tests

biodb::runGenericTests(conn)


# Terminate the instance
biodb$terminate()


pkrog/biodb documentation built on Nov. 29, 2022, 4:24 a.m.