public void ReleaseBay_ThrowsException_ForVehicleIsNotInCarPark()
        {
            // Arrange
            var         vehicle = Substitute.For <IVehicle>();
            BaysManager sut     = CreateSut(3);

            // Act
            // Assert
            Assert.Throws <NoVehicleFoundInBaysException>(() => sut.ReleaseBay(vehicle));
        }
        public void ReleaseBay_ReleasesBayFromVehicle_ForVehicle()
        {
            // Arrange
            var         vehicle = Substitute.For <IVehicle>();
            BaysManager sut     = CreateSut(3);

            sut.AssignBay(vehicle);

            // Act
            sut.ReleaseBay(vehicle);

            // Assert
            Assert.Throws <NoVehicleFoundInBaysException>(() => sut.FindVehicleBayId(vehicle));
        }
        public void ReleaseBay_MarksBayAsEmpty_ForVehicle()
        {
            // Arrange
            var         vehicle = Substitute.For <IVehicle>();
            BaysManager sut     = CreateSut(3);

            sut.AssignBay(vehicle);

            // Act
            sut.ReleaseBay(vehicle);

            // Assert
            Assert.AreEqual(3,
                            sut.NumberOfEmptyBays);
        }