DP-3T / dp3t-sdk-backend

The backend implementation for DP3T
Mozilla Public License 2.0
198 stars 88 forks source link

Refactor GaenControllerTest #219

Closed ineiti closed 4 years ago

ineiti commented 4 years ago

The test-helper method insertNKeysPerDayInIntervalWithDebugFlag is difficult to understand. Together with @martinalig we propose the following signature:

/**
 * Creates keysPerDay for every day: lastDay, lastDay-1, ..., lastDay - daysBack + 1
 *
 * @param lastDay of the created keys
 * @param daysBack of the key creation, counted including the lastDay
 * @param keysPerDay that will be created for every day
 * @param receivedAt as sent to the DB
 * @param debug generates more output in `upsertExposees`
*/
private void insertNKeysPerDayInIntervalWithDebugFlag(UTCInstant lastDay, int daysBack, int keysPerDay,
 UTCInstant receivedAt, boolean debug){}

Also adapt all dependant tests: