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); }
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()); }