Ejemplo n.º 1
0
TEST(MessageTest, Quit) {
	CQuitMessage msg;
	msg.Parse(":nick QUIT :reason");
	EXPECT_EQ("nick", msg.GetNick().GetNick());
	EXPECT_EQ("QUIT", msg.GetCommand());
	EXPECT_EQ("reason", msg.GetReason());
	EXPECT_EQ(CMessage::Type::Quit, msg.GetType());

	msg.SetReason("test");
	EXPECT_EQ("test", msg.GetReason());
	EXPECT_EQ(":nick QUIT :test", msg.ToString());
}
Ejemplo n.º 2
0
	void OnQuitMessage(CQuitMessage& msg, const std::vector<CChan*>& vChans) override { vsHooks.push_back("OnQuitMessage"); vsMessages.push_back(msg.ToString()); vNetworks.push_back(msg.GetNetwork()); vChannels.push_back(msg.GetChan()); }