Exemplo n.º 1
0
        public void Register()
        {
            var account = new AuthInfo("test", "pass");
            var result  = server.Register(springieAuth, account, "Core", null);

            Assert.IsTrue(result.StartsWith("Welcome to PlanetWars! Your planet is"));
            Assert.IsTrue(server.ValidateLogin(account));
            Assert.AreEqual("Core", server.Galaxy.GetPlayer("test").FactionName);
            var planet = server.Galaxy.Planets.First(p => p.OwnerName == "test");

            Assert.IsTrue(
                server.Galaxy.Events.Any(
                    p => p.IsPlanetRelated(planet.ID) && p.IsPlayerRelated("test") && p.IsFactionRelated("Core")));
        }