Esempio n. 1
0
        public async Task Fkti_4_1_Test()
        {
            var parser = new LetiTimetableParser();

            var file = File.OpenRead(@"../../../TestFiles/fkti-4-1.xlsx");

            var result = await parser.ParseTimetable(file);

            Assert.Equal(358, result.Lessons.Count);
        }
Esempio n. 2
0
        public async Task <IActionResult> ParseLetiSchedule(IFormFile excelFile, [FromServices] LetiTimetableParser parser)
        {
            if (excelFile == null || excelFile.Length == 0)
            {
                return(BadRequest());
            }

            var stream = excelFile.OpenReadStream();

            // var parsedResult = parser.ParseTimetable(stream);

            //todo: Парсинг расписания

            return(Ok());
        }