Move mocks to their own interface (#4645)

This commit is contained in:
pajlada
2023-05-20 12:54:50 +02:00
committed by GitHub
parent 5d0bdc195e
commit e1a6c24cf3
12 changed files with 564 additions and 501 deletions
+3 -50
View File
@@ -1,11 +1,12 @@
#include "Application.hpp"
#include "singletons/Settings.hpp"
#include "common/Channel.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/highlights/HighlightController.hpp"
#include "controllers/highlights/HighlightPhrase.hpp"
#include "messages/Message.hpp"
#include "messages/SharedMessageBuilder.hpp"
#include "mocks/EmptyApplication.hpp"
#include "singletons/Settings.hpp"
#include "util/Helpers.hpp"
#include <benchmark/benchmark.h>
@@ -45,65 +46,17 @@ public:
}
};
class MockApplication : IApplication
class MockApplication : mock::EmptyApplication
{
public:
Theme *getThemes() override
{
return nullptr;
}
Fonts *getFonts() override
{
return nullptr;
}
IEmotes *getEmotes() override
{
return nullptr;
}
AccountController *getAccounts() override
{
return &this->accounts;
}
HotkeyController *getHotkeys() override
{
return nullptr;
}
WindowManager *getWindows() override
{
return nullptr;
}
Toasts *getToasts() override
{
return nullptr;
}
CommandController *getCommands() override
{
return nullptr;
}
NotificationController *getNotifications() override
{
return nullptr;
}
HighlightController *getHighlights() override
{
return &this->highlights;
}
TwitchIrcServer *getTwitch() override
{
return nullptr;
}
ChatterinoBadges *getChatterinoBadges() override
{
return nullptr;
}
FfzBadges *getFfzBadges() override
{
return nullptr;
}
IUserDataController *getUserData() override
{
return nullptr;
}
AccountController accounts;
HighlightController highlights;