public void TestInsufficentWordsResultsInEmptyEvent() { var called = false; var protocol = new SecondGame(); protocol.ProtocolEvent += (protocol1, args) => { called = true; }; var request = new FrostbitePacket(); var response = new FrostbitePacket(); protocol.BanListListDispatchHandler(request, response); Assert.IsFalse(called); }
public void TestBanlistWithIpBanPassedAndIgnored() { var protocol = new SecondGame(); var request = new FrostbitePacket() { Packet = new Packet() { Words = new List<String>() { "banList.list" } } }; var response = new FrostbitePacket() { Packet = new Packet() { Words = new List<String>() { "OK", "name", "Phil_k", "perm", "0", "0", "Geoff", "ip", "127.0.0.1", "perm", "0", "0", "Geoff", "guid", "EA_12345678901234567890123456789012", "perm", "0", "0", "Geoff" } } }; protocol.BanListListDispatchHandler(request, response); Assert.AreEqual(2, protocol.State.Bans.Count); }