public void ReturnStoredGameServer() { db.UpsertServerInfo(server); var result = handler.GetGameServer(server.endpoint); result.ShouldBeEquivalentTo(server.info); }
private Task <Response> GetServerAsync(string endpoint) { var task = new Task <Response>(() => { ServerInfo server; try { server = handler.GetGameServer(endpoint); } catch (Exception e) { logger.Error(e.Message); return(HttpStatusCode.InternalServerError); } return(server != null ? Response.AsJson(server) : HttpStatusCode.NotFound); }); task.Start(); return(task); }