Ejemplo n.º 1
0
        public void IfPositionIsValid()
        {
            var dimensions = new Dimensions
            {
                Width  = 10,
                Height = 100
            };
            var arena = new Arena(dimensions);

            Assert.True(arena.CheckPosition(0, 0));
            Assert.True(arena.CheckPosition(9, 99));
            Assert.True(arena.CheckPosition(10, 100));
            Assert.False(arena.CheckPosition(-1, 2));
            Assert.False(arena.CheckPosition(1, -2));
            Assert.False(arena.CheckPosition(-1, -2));
            Assert.False(arena.CheckPosition(9, 101));
            Assert.False(arena.CheckPosition(11, 10));
            Assert.False(arena.CheckPosition(11, 102));
        }