Пример #1
0
        public void Geven_ParkingDetailsFor1Car()
        {
            //Given:
            VehicleDetailsModel[] parlingDetails = new VehicleDetailsModel[1];
            parlingDetails[0] = new VehicleDetailsModel
            {
                RegistrationNumber = "KA-01-HH-1111",
                Color = "Black"
            };
            //When: I call StatusOutput object
            string result = _statusOutput.Build(parlingDetails);
            //Then:
            StringBuilder expected = new StringBuilder();

            expected.AppendLine("Slot No.   Registration No   Colour");
            expected.AppendLine("1   KA-01-HH-1111   Black");
            Assert.AreEqual(expected.ToString(), result);
        }
Пример #2
0
        public string ExecuteCommand(string command)
        {
            string message = string.Empty;

            try
            {
                VehicleDetailsModel[] parlingDetails = _parkingRepository.GetParkingDetails();
                message = _statusOutput.Build(parlingDetails);
                return(message);
            }
            catch (Exception ex)
            {
                throw;
            }
        }