~aleteoryx/muditaos

ref: a4406ec5a70b9e0f0eb8243c432e4bc0a89c5845 muditaos/module-apps/application-music-player/tests/MockSongsRepository.hpp -rw-r--r-- 1.3 KiB
a4406ec5 — Bartosz [MOS-783] Fixed tests and simulator for Harmony 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <gtest/gtest.h>
#include <gmock/gmock.h>

#include <models/SongsRepository.hpp>

#include <optional>
#include <string>
#include <vector>

namespace testing::app::music
{
    class MockSongsRepository : public ::app::music::AbstractSongsRepository
    {
      public:
        MOCK_METHOD(void,
                    getMusicFilesList,
                    (std::uint32_t offset, std::uint32_t limit, const OnGetMusicFilesListCallback &callback),
                    (override));
        MOCK_METHOD(void, initCache, (), (override));
        MOCK_METHOD(std::size_t, getFileIndex, (const std::string &filePath), (const override));
        MOCK_METHOD(std::string, getNextFilePath, (const std::string &filePath), (const override));
        MOCK_METHOD(std::string, getPreviousFilePath, (const std::string &filePath), (const override));
        MOCK_METHOD(std::optional<db::multimedia_files::MultimediaFilesRecord>,
                    getRecord,
                    (const std::string &filePath),
                    (const override));
        MOCK_METHOD(void, updateRepository, (const std::string &filePath), (override));
    };
}; // namespace testing::app::music