Пример #1
0
        public GarageItem Find(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                throw new ArgumentNullException("id");
            }

            return(_repository.Find(id));
        }
Пример #2
0
        public void TestIfFindByLicenseReturnsCorrectVeichle()
        {
            //Arrange

            foreach (var vehicle in list)
            {
                garageRepository.Add(vehicle);
            }

            string expectedLicense = "NOP456";

            //Act

            Vehicle veichle = garageRepository.Find(expectedLicense);

            //Assert
            Assert.IsNotNull(veichle);
            Assert.AreEqual(expectedLicense, veichle.LicensePlate);
        }