public void TestExcelExporting(string path, string groupName, int mark, string subject, string studentFullName) { ExamResults examResults = new ExamResults() { ExamDate = DateTime.Now, GroupName = groupName, Mark = mark, SubjectName = subject, SessionStartDate = DateTime.Now, SessionEndDate = DateTime.Now, StudentFullName = studentFullName }; var examContext = _context.GetExamResultsDataLayer(); _context.SetFilePath(path); examContext.CreateSheet(); examContext.Insert(examResults); Assert.IsTrue(File.Exists(path)); File.Delete(path); }
/// <summary> /// Prepares the file. /// </summary> /// <param name="path">The path.</param> private void PrepareFile(string path) { FileDelete(path); _excelContext.SetFilePath(path); }