public void SaveServerInfo() { handler.PutServer(server); var savedData = db.GetServerInfo(server.endpoint); savedData.ShouldBeEquivalentTo(server); }
private Task <HttpStatusCode> AddServerAsync(GameServer server) { var task = new Task <HttpStatusCode>(() => { try { handler.PutServer(server); } catch (Exception e) { logger.Error(e.Message); return(HttpStatusCode.InternalServerError); } return(HttpStatusCode.OK); }); task.Start(); return(task); }