コード例 #1
0
        public void TestNewTileIsPlaced()
        {
            var target = new Quarry();
            Tile tile = new MockTile();
            Space space = _control.GetPlacableSpaces(tile).First();

            target.Transition(null);
            target.Transition(tile);
            target.Transition(space);

            Assert.AreEqual(tile, space.Tile);
        }
コード例 #2
0
        public void TransitionTest()
        {
            var target = new Quarry();
            Tile tile = new MockTile();

            Selection actual = target.Transition(null);
            Assert.AreEqual(Selection.TileFromHand, actual);

            actual = target.Transition(tile);
            Assert.AreEqual(Selection.PlayableSpace, actual);

            target.Transition(_control.GetPlacableSpaces(tile).First());
            Assert.AreEqual(tile, _control.ActiveTile);
        }
コード例 #3
0
        public void TestTileIsRemoved()
        {
            var target = new Quarry();

            Selection actual = target.Transition(null);
            Assert.AreEqual(Selection.TileFromHand, actual);

            Player player = _control.ActivePlayer;
            Tile tile = player.Hand.First();
            actual = target.Transition(tile);
            Assert.AreEqual(Selection.PlayableSpace, actual);

            target.Transition(_control.GetPlacableSpaces(tile).First());
            Assert.AreEqual(tile, _control.ActiveTile);

            Assert.IsFalse(player.Hand.Contains(tile));
        }