Exemplo n.º 1
0
        public void Setup()
        {
            EffortConnectionFactory.ResetDb();
            var server = new GameServer
            {
                Endpoint  = "test.com",
                Name      = "] My P3rfect Server [",
                GameModes = new GameMode[0]
            };

            using (var db = new ServerDatabase())
            {
                db.GameServers.Add(server);
                for (var i = 0; i < 90; i++)
                {
                    var match = new GameMatch
                    {
                        GameMode     = "DM",
                        FragLimit    = 0,
                        Map          = "Dust",
                        Timestamp    = DateTime.MaxValue,
                        TimeLimit    = 0,
                        TotalPlayers = 1,
                        Scoreboard   = new List <PlayerScore>
                        {
                            new PlayerScore
                            {
                                Deaths = 0,
                                Frags  = 0,
                                Kills  = 42,
                                Name   = "Vasya",
                                Place  = 1
                            }
                        },
                        Server = server
                    };
                    db.GameMatches.Add(match);
                }
                db.SaveChanges();
            }
        }
 public void Setup()
 {
     EffortConnectionFactory.ResetDb();
 }