예제 #1
0
        public void FjerneBilenFraParkeringspladsen_Ved_ForladPladsen()
        {
            var regNr      = "12345678";
            var car        = A.Fake <ICar>();
            var parkingLot = A.Fake <IParkingLot>();

            A.CallTo(() => car.RegistrationNumber).Returns(regNr);
            A.CallTo(() => parkingLot.Cars).Returns(new List <ICar>
            {
                car
            });


            var sut = new ParkingLotService(parkingLot);

            sut.Leave(car);

            Assert.DoesNotContain(parkingLot.Cars, a => a.RegistrationNumber == regNr);
        }