Exemplo n.º 1
0
        public void TileOutOfRange(int x, int y)
        {
            b.Info.Flow();

            var mp = new MockBd2Map();

            mp.Test_SetDimensions(10, 100);


            var excpt = Assert.Throws <BdBaseException>(() => {
                mp.GetTileAtPosition(new Point(x, y));
            });

            Assert.Contains("range", excpt.Message);
        }
Exemplo n.º 2
0
        public void EveryTile_RetursnDefault()
        {
            b.Info.Flow();

            var mp = new MockBd2Map();

            mp.Test_SetDimensions(100, 100);

            for (int x = 1; x <= 100; x++)
            {
                for (int y = 1; y <= 100; y++)
                {
                    var mt = mp.GetTileAtPosition(new Point(x, y));
                    Assert.Equal <MapTile>(MapTile.DefaultGround, mt);
                }
            }
        }