-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test filters context map & message builder (#4886)
- Loading branch information
Showing
17 changed files
with
345 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include "common/Channel.hpp" | ||
|
||
namespace chatterino::mock { | ||
|
||
class MockChannel : public Channel | ||
{ | ||
public: | ||
MockChannel(const QString &name) | ||
: Channel(name, Channel::Type::Twitch) | ||
{ | ||
} | ||
}; | ||
|
||
} // namespace chatterino::mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma once | ||
|
||
#include "mocks/Channel.hpp" | ||
#include "providers/twitch/TwitchIrcServer.hpp" | ||
|
||
namespace chatterino::mock { | ||
|
||
class MockTwitchIrcServer : public ITwitchIrcServer | ||
{ | ||
public: | ||
MockTwitchIrcServer() | ||
: watchingChannelInner( | ||
std::shared_ptr<Channel>(new MockChannel("testaccount_420"))) | ||
, watchingChannel(this->watchingChannelInner, | ||
Channel::Type::TwitchWatching) | ||
{ | ||
} | ||
|
||
const BttvEmotes &getBttvEmotes() const override | ||
{ | ||
return this->bttv; | ||
} | ||
|
||
const FfzEmotes &getFfzEmotes() const override | ||
{ | ||
return this->ffz; | ||
} | ||
|
||
const SeventvEmotes &getSeventvEmotes() const override | ||
{ | ||
return this->seventv; | ||
} | ||
|
||
const IndirectChannel &getWatchingChannel() const override | ||
{ | ||
return this->watchingChannel; | ||
} | ||
|
||
BttvEmotes bttv; | ||
FfzEmotes ffz; | ||
SeventvEmotes seventv; | ||
ChannelPtr watchingChannelInner; | ||
IndirectChannel watchingChannel; | ||
}; | ||
|
||
} // namespace chatterino::mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.