refactor: turn Emotes into EmoteController (#6516)
* refactor: turn `Emotes` into `EmoteController` * changelog * why does clang-format do this??? * nit: remove unused include from EmoteController.hpp --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "controllers/commands/CommandController.hpp"
|
||||
#include "controllers/commands/common/ChannelAction.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "mocks/Helix.hpp"
|
||||
#include "mocks/Logging.hpp"
|
||||
#include "mocks/TwitchIrcServer.hpp"
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
return &this->commands;
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
AccountController accounts;
|
||||
CommandController commands;
|
||||
mock::MockTwitchIrcServer twitch;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Channel.hpp"
|
||||
#include "mocks/ChatterinoBadges.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "mocks/EmptyApplication.hpp"
|
||||
#include "mocks/Logging.hpp"
|
||||
#include "mocks/TwitchIrcServer.hpp"
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
mock::EmptyLogging logging;
|
||||
AccountController accounts;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
mock::UserDataController userData;
|
||||
mock::MockTwitchIrcServer twitch;
|
||||
mock::ChatterinoBadges chatterinoBadges;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "providers/twitch/TwitchEmotes.hpp"
|
||||
#include "providers/twitch/TwitchIrc.hpp"
|
||||
#include "Test.hpp"
|
||||
|
||||
@@ -15,7 +16,7 @@ class MockApplication : public mock::BaseApplication
|
||||
public:
|
||||
MockApplication() = default;
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -25,7 +26,7 @@ public:
|
||||
return &this->accounts;
|
||||
}
|
||||
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
AccountController accounts;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
#include "messages/Emote.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Channel.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "mocks/Helix.hpp"
|
||||
#include "mocks/Logging.hpp"
|
||||
#include "mocks/TwitchIrcServer.hpp"
|
||||
#include "singletons/Emotes.hpp"
|
||||
#include "singletons/Paths.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "Test.hpp"
|
||||
@@ -52,7 +51,7 @@ public:
|
||||
return &this->twitch;
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -80,7 +79,7 @@ public:
|
||||
mock::EmptyLogging logging;
|
||||
AccountController accounts;
|
||||
mock::MockTwitchIrcServer twitch;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
BttvEmotes bttvEmotes;
|
||||
FfzEmotes ffzEmotes;
|
||||
SeventvEmotes seventvEmotes;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/ChatterinoBadges.hpp"
|
||||
#include "mocks/DisabledStreamerMode.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "mocks/LinkResolver.hpp"
|
||||
#include "mocks/Logging.hpp"
|
||||
#include "mocks/TwitchIrcServer.hpp"
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "providers/twitch/TwitchBadge.hpp"
|
||||
#include "providers/twitch/TwitchBadges.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "singletons/Emotes.hpp"
|
||||
#include "Test.hpp"
|
||||
#include "util/IrcHelpers.hpp"
|
||||
#include "util/VectorMessageSink.hpp"
|
||||
@@ -72,7 +71,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -149,7 +148,7 @@ public:
|
||||
|
||||
mock::EmptyLogging logging;
|
||||
AccountController accounts;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
mock::UserDataController userData;
|
||||
mock::MockTwitchIrcServer twitch;
|
||||
mock::ChatterinoBadges chatterinoBadges;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "singletons/Emotes.hpp"
|
||||
#include "singletons/Fonts.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "messages/Image.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "singletons/Resources.hpp"
|
||||
#include "Test.hpp"
|
||||
|
||||
@@ -19,12 +19,12 @@ class MockApplication : public mock::BaseApplication
|
||||
public:
|
||||
MockApplication() = default;
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
};
|
||||
|
||||
class ModerationActionTest : public ::testing::Test
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# include "messages/Message.hpp"
|
||||
# include "mocks/BaseApplication.hpp"
|
||||
# include "mocks/Channel.hpp"
|
||||
# include "mocks/Emotes.hpp"
|
||||
# include "mocks/EmoteController.hpp"
|
||||
# include "mocks/Logging.hpp"
|
||||
# include "mocks/TwitchIrcServer.hpp"
|
||||
# include "NetworkHelpers.hpp"
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
return &this->commands;
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
PluginController plugins;
|
||||
mock::Logging logging;
|
||||
CommandController commands;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
MockTwitch twitch;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "controllers/commands/CommandController.hpp"
|
||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "singletons/Fonts.hpp"
|
||||
#include "singletons/Paths.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
return &this->commands;
|
||||
}
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
WindowManager windowManager;
|
||||
AccountController accounts;
|
||||
CommandController commands;
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
};
|
||||
|
||||
class SplitInputTest
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "providers/twitch/TwitchIrc.hpp"
|
||||
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "mocks/Emotes.hpp"
|
||||
#include "mocks/EmoteController.hpp"
|
||||
#include "providers/twitch/TwitchBadge.hpp"
|
||||
#include "providers/twitch/TwitchEmotes.hpp"
|
||||
#include "Test.hpp"
|
||||
#include "util/IrcHelpers.hpp"
|
||||
|
||||
@@ -15,12 +16,12 @@ class MockApplication : public mock::BaseApplication
|
||||
public:
|
||||
MockApplication() = default;
|
||||
|
||||
IEmotes *getEmotes() override
|
||||
EmoteController *getEmotes() override
|
||||
{
|
||||
return &this->emotes;
|
||||
}
|
||||
|
||||
mock::Emotes emotes;
|
||||
mock::EmoteController emotes;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user