Example #1
0
        private IList <IPark> GenerateParkingLot(int slotCount)
        {
            parkOperationService.CreateParkingLot(slotCount);
            var ParkingLot = (IList <IPark>)privateObject.GetFieldOrProperty("ParkingLot");

            return(ParkingLot);
        }
        private IList <IPark> GenerateParkingLot(int slotCount)
        {
            parkOperationService.CreateParkingLot(slotCount);
            Type         parkOperationType = parkOperationService.GetType();
            PropertyInfo property          = parkOperationType.GetProperty("ParkingLot", BindingFlags.NonPublic | BindingFlags.Instance);
            var          ParkingLot        = (IList <IPark>)property.GetValue(parkOperationService);

            return(ParkingLot);
        }