示例#1
0
 public void Can_Not_Initialize_Game_In_Progress()
 {
     var g = Build.Game();
     g.Start(g.Owner);
     var board = new GameBoard(g);
     Expect.Exception<InvalidGameStateException>(board.Initialize);
 }
示例#2
0
        public void Set_ControlledBy_State_For_All_Non_Neutral_Territories()
        {
            var g = Build.Game();
            var board = new GameBoard(g);
            board.Initialize();

            var landTerritories = from t in Territory.GetAllTerritories()
                                  where t is LandTerritory && !(t is NeutralTerritory)
                                  select t;
            foreach (Territory t in landTerritories)
            {
                Assert.That(g.GetTerritory(t).ControlledBy, Is.Not.EqualTo(Nationality.None),
                    "Territory wasn't assigned Control: " + t.Name);
            }
        }
示例#3
0
 public void Can_Not_Initialize_Game_Not_Ready_To_Start()
 {
     var board = new GameBoard(new Game());
     Expect.Exception<InvalidGameStateException>(board.Initialize);
 }
示例#4
0
 public void Can_Initialize_When_Game_Is_Ready_To_Start()
 {
     var board = new GameBoard(Build.Game());
     board.Initialize();
 }