Expose max activity data from activity list model in TestingALM

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-03-01 16:33:24 +01:00
parent b3f209e6fe
commit 6d3bbe828f
No known key found for this signature in database
GPG key ID: C839200C384636B0
2 changed files with 14 additions and 6 deletions

View file

@ -444,6 +444,14 @@ int FakeRemoteActivityStorage::startingIdLast() const
return _startingId;
}
int FakeRemoteActivityStorage::numItemsToInsert() const {
return _numItemsToInsert;
}
int FakeRemoteActivityStorage::totalNumActivites() const {
return _activityData.count();
}
void TestingALM::startFetchJobWithNumActivities(const int numActivities)
{

View file

@ -50,16 +50,16 @@ class FakeRemoteActivityStorage
public:
static FakeRemoteActivityStorage *instance();
static void destroy();
void init();
void initActivityData();
[[nodiscard]] QByteArray activityJsonData(const int sinceId, const int limit);
[[nodiscard]] QJsonValue activityById(const int id) const;
[[nodiscard]] int startingIdLast() const;
[[nodiscard]] int numItemsToInsert() const;
[[nodiscard]] int totalNumActivites() const;
static void destroy();
void init();
void initActivityData();
private:
QJsonArray _activityData;