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()); }
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()); }