chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/SharedMessageBuilder.hpp"
|
||||
#include "mocks/EmptyApplication.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
|
||||
@@ -47,9 +47,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class MockApplication : mock::EmptyApplication
|
||||
class MockApplication : public mock::BaseApplication
|
||||
{
|
||||
public:
|
||||
MockApplication()
|
||||
: highlights(this->settings, &this->accounts)
|
||||
{
|
||||
}
|
||||
|
||||
AccountController *getAccounts() override
|
||||
{
|
||||
return &this->accounts;
|
||||
@@ -61,7 +66,6 @@ public:
|
||||
|
||||
AccountController accounts;
|
||||
HighlightController highlights;
|
||||
// TODO: Figure this out
|
||||
};
|
||||
|
||||
static void BM_HighlightTest(benchmark::State &state)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/highlights/HighlightController.hpp"
|
||||
#include "messages/Emote.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/DisabledStreamerMode.hpp"
|
||||
#include "mocks/EmptyApplication.hpp"
|
||||
#include "mocks/LinkResolver.hpp"
|
||||
#include "mocks/TwitchIrcServer.hpp"
|
||||
#include "mocks/UserData.hpp"
|
||||
@@ -32,9 +32,14 @@ using namespace literals;
|
||||
|
||||
namespace {
|
||||
|
||||
class MockApplication : mock::EmptyApplication
|
||||
class MockApplication : public mock::BaseApplication
|
||||
{
|
||||
public:
|
||||
MockApplication()
|
||||
: highlights(this->settings, &this->accounts)
|
||||
{
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
|
||||
Reference in New Issue
Block a user