Beispiel #1
0
        public void AfterClientSendingGetServerInfoRequest()
        {
            var response = client.SendRequest().GetServerInfo(Test.Server1Endpoint);

            server.ClearDatabaseAndCache();
            var info = JsonConvert.DeserializeObject <GameServerInfo>(response.Message);

            info.ShouldBeEquivalentTo(Test.CreateGameServer1Info());
        }
Beispiel #2
0
        public void AfterClientSendingGetAllServersInfoRequest()
        {
            SendServer2Info();
            SendServer3Info();
            var response = client.SendRequest().GetAllServersInfo();

            server.ClearDatabaseAndCache();
            var result  = JsonConvert.DeserializeObject <GameServerInfoResponse[]>(response.Message);
            var servers = new[] { new GameServerInfoResponse(Test.Server1Endpoint, Test.CreateGameServer1Info()),
                                  new GameServerInfoResponse(Test.Server2Endpoint, Test.CreateGameServer2Info()),
                                  new GameServerInfoResponse(Test.Server3Endpoint, Test.CreateGameServer3Info()) };

            new HashSet <GameServerInfoResponse>(result).ShouldBeEquivalentTo(new HashSet <GameServerInfoResponse>(servers));
        }
Beispiel #3
0
        private void SendServer1Info()
        {
            var info = Test.CreateGameServer1Info();

            client.SendRequest().PutServerInfo(info, Test.Server1Endpoint);
        }