Пример #1
0
        public void Tiles_SetNotSquare_ThrowsArgumentException()
        {
            var tiles  = Mock.Of <ITileSlice>(t => t.Width == 1 && t.Height == 2);
            var packet = new TileSquare();

            Assert.Throws <ArgumentException>(() => packet.Tiles = tiles);
        }
Пример #2
0
        public void Tiles_GetNullValue()
        {
            var packet = new TileSquare();

            Assert.Equal(0, packet.Tiles.Width);
            Assert.Equal(0, packet.Tiles.Height);
        }
Пример #3
0
        public void Y_Set_Get()
        {
            var packet = new TileSquare();

            packet.Y = 256;

            Assert.Equal(256, packet.Y);
        }
Пример #4
0
        public void X_Set_Get()
        {
            var packet = new TileSquare();

            packet.X = 100;

            Assert.Equal(100, packet.X);
        }
Пример #5
0
        public void Tiles_Set_Get()
        {
            var tiles  = Mock.Of <ITileSlice>(t => t.Width == 1 && t.Height == 1);
            var packet = new TileSquare();

            packet.Tiles = tiles;

            Assert.Same(tiles, packet.Tiles);
        }
Пример #6
0
        public void Tiles_SetNullValue_ThrowsArgumentNullException()
        {
            var packet = new TileSquare();

            Assert.Throws <ArgumentNullException>(() => packet.Tiles = null !);
        }