Esempio n. 1
0
        public void WhenParameterCountIs3_And_ParametersAreValid__ResponseShouldNotBeNull(string arg,
                                                                                          int expectedX, int expectedY, CompassDirections expectedDirection)
        {
            var sut = new RoverBuilder();

            Vehicle vehicle = sut.Build(arg);

            Assert.NotNull(vehicle);

            Assert.Equal(expectedX, vehicle.CurrentPoint.X);
            Assert.Equal(expectedY, vehicle.CurrentPoint.Y);
            Assert.Equal(expectedDirection, vehicle.Facade);
        }
Esempio n. 2
0
        public void WhenParameterIsNotValid__VehicleBuilderParameterNotValidExceptionOccurs(string arg)
        {
            var sut = new RoverBuilder();

            Assert.Throws <VehicleBuilderParameterNotValidException>(() => sut.Build(arg));
        }
Esempio n. 3
0
        public void WhenParameterIsNull__VehicleBuilderParameterNotValidExceptionOccurs()
        {
            var sut = new RoverBuilder();

            Assert.Throws <VehicleBuilderParameterNotValidException>(() => sut.Build(null));
        }