public void Msg_Success() { fclient.SkipFirstMessages(); string name1 = server.userList[0].name; FakeClient fclient2 = new FakeClient(); fclient2.Connect(); fclient2.SkipFirstMessages(); string name2 = server.userList[1].name; fclient.RecieveMessage(); fclient.RecieveMessage(); string sendMSG = "MSG привет всем!"; string recMSG = "MSG " + name1 + ": привет всем!"; fclient.SendAndRecieve(sendMSG, recMSG); string msg = fclient2.RecieveMessage(); Assert.AreEqual(recMSG, msg); }
public void Registration_Success() { server.register.RemoveAll(); fclient.SkipFirstMessages(); fclient.SendAndRecieve("REG myUser 56789", "ERROR 053"); Assert.IsTrue(server.register.Check("myUser", "56789")); }