예제 #1
0
        public void ShouldMapShotResult()
        {
            var shotResult  = new ShotResult();
            var boardDouble = CreateBoardDouble();

            A.CallTo(() => boardDouble.Check(A <Coordinates> ._)).Returns(shotResult);
            StubBoardIsConquered(boardDouble);

            _subject.Start();

            A.CallTo(() => _shotResultMapperDouble.Map(shotResult)).MustHaveHappened();
        }
예제 #2
0
        public void WhenResultIsHit_ShouldReturnMessageWithShipName()
        {
            var ship = new Destroyer();

            _subject.Map(new ShotResult(ship)).Should().Be($"You hit a {ship.Name}!");
        }