Exemplo n.º 1
0
        public void ShouldBeCreatedCorrectly()
        {
            //arange & act
            Components.Point point = new Components.Point(2, 3, 'a');

            //assert
            Assert.Equal(2, point.X);
            Assert.Equal(3, point.Y);
            Assert.Equal('a', point.Symbol);
        }
Exemplo n.º 2
0
        public void ShouldClearSymbol()
        {
            //arange
            Components.Point point = new Components.Point(2, 3, 'a');

            //act
            point.Clear();

            //assert
            Assert.Equal(' ', point.Symbol);
        }
Exemplo n.º 3
0
        public void ShouldReturnTrueWithDifferentSymbol()
        {
            //arange
            Components.Point point      = new Components.Point(2, 3, 'a');
            Components.Point isHitPoint = new Components.Point(2, 3, 'b');

            //act
            bool result = point.IsHit(isHitPoint);

            //assert
            Assert.True(result);
        }
Exemplo n.º 4
0
        public void ShouldReturnFalse()
        {
            //arange
            Components.Point point      = new Components.Point(2, 2, 'a');
            Components.Point isHitPoint = new Components.Point(2, 3, 'b');

            //act
            bool result = point.IsHit(isHitPoint);

            //assert
            Assert.False(result);
        }
Exemplo n.º 5
0
        public void ShouldReturnTrue()
        {
            //arange
            Components.Walls walls = Components.Walls.Instance;
            Components.Point point = new Components.Point(78, 23, 'd');

            // act
            bool result = walls.IsHit(point);

            //assert
            Assert.True(result);
        }