示例#1
0
        public void WhenGetLocationWithWestDirection()
        {
            var mockLocationCalc = new Mock <ILocationCalculator>();
            var westBound        = new WestBound(mockLocationCalc.Object);
            var result           = westBound.GetLocation(new Position(new Location(1, 1), Direction.West), 1);

            Assert.Equal(0, result.location.X);
            Assert.Equal(1, result.location.Y);
        }
示例#2
0
        public void WhenGetLocationSouthDirection()
        {
            var mockLocationCalc = new Mock <ILocationCalculator>();
            var westBound        = new WestBound(mockLocationCalc.Object);
            var result           = westBound.GetLocation(new Position(new Location(1, 1), Direction.South), 1);

            Assert.Equal(1, result.location.X);
            Assert.Equal(1, result.location.Y);
            Assert.False(result.found);
        }