Beispiel #1
0
        private static void Given_A_Landing_Strategy_And_A_Position_Out_Of_The_Landing_Platform_When_Checking_A_Landing_Position(int positionXRocketTwo, int positionYRocketTwo)
        {
            // Arrange
            const int positionXRocketOne             = 10;
            const int positionYRocketOne             = 10;
            const ApproachCheckResult expectedResult = ApproachCheckResult.Out;

            var rocketOneId       = GuidGenerator.Create(1);
            var positionRocketOne = new Position(positionXRocketOne, positionYRocketOne);

            var rocketTwoId       = GuidGenerator.Create(2);
            var positionRocketTwo = new Position(positionXRocketTwo, positionYRocketTwo);

            var platformDimension = new Dimension(10, 10, 2, 2);
            var sut = new ZartisExerciseStrategy();

            sut.CheckApproach(rocketOneId, positionRocketOne, platformDimension);

            // Act
            var result = sut.CheckApproach(rocketTwoId, positionRocketTwo, platformDimension);

            // Assert
            result.Should().Be(expectedResult);
        }
Beispiel #2
0
 protected override void When()
 {
     _expectedException = Record.Exception(
         () => _sut.CheckApproach(_rocketId, _position, _platformDimension));
 }