public void SaveToXLSXTestWhenGroupSessionsResultsReport(string groupName, int sessionNumber, bool descending) { //Arrange var location = System.Reflection.Assembly.GetExecutingAssembly().Location; var path = Path.GetDirectoryName(location); IReport report = new GroupSessionsResultsReport(groupName, sessionNumber, x => x.FirstName, descending); bool fileIsExist = false; //Act Excel excel = new Excel(path + "\\Excel\\", "GroupSessions"); excel.SaveToXLSX(report); if (File.Exists(path + "\\Excel\\" + "GroupSessions.xlsx")) { fileIsExist = true; } //Assert Assert.IsTrue(fileIsExist); }