2023-03-24 06:22:40 +03:00
|
|
|
|
namespace RhSolutions.Tests;
|
|
|
|
|
|
|
|
|
|
[ExcelTestSettings(OutOfProcess = true)]
|
|
|
|
|
public class WorkbookCheck : IDisposable
|
2023-03-23 07:18:11 +03:00
|
|
|
|
{
|
2023-03-24 06:22:40 +03:00
|
|
|
|
public WorkbookCheck()
|
2023-03-23 07:18:11 +03:00
|
|
|
|
{
|
2023-03-24 06:22:40 +03:00
|
|
|
|
Util.Application.Workbooks.Add();
|
|
|
|
|
}
|
2023-03-23 07:18:11 +03:00
|
|
|
|
|
2023-03-24 06:22:40 +03:00
|
|
|
|
[ExcelFact(Workbook = @"TestWorkbooks\EmptyTestTable.xlsx")]
|
|
|
|
|
public void WorksheetIsCorrect()
|
|
|
|
|
{
|
|
|
|
|
Worksheet worksheet= Util.Workbook.Sheets[1];
|
|
|
|
|
Assert.True(worksheet.IsRehauSource());
|
|
|
|
|
}
|
2023-03-23 07:18:11 +03:00
|
|
|
|
|
2023-03-24 06:22:40 +03:00
|
|
|
|
[ExcelFact(Workbook = @"TestWorkbooks\EmptyWorkbook.xlsx")]
|
|
|
|
|
public void EmptyWorkbookIsNotCorrect()
|
|
|
|
|
{
|
|
|
|
|
Worksheet worksheet = Util.Workbook.Sheets[1];
|
|
|
|
|
Assert.False(worksheet.IsRehauSource());
|
|
|
|
|
}
|
2023-03-23 07:18:11 +03:00
|
|
|
|
|
2023-03-24 06:22:40 +03:00
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
Util.Application.ActiveWorkbook.Close(SaveChanges: false);
|
2023-03-23 07:18:11 +03:00
|
|
|
|
}
|
|
|
|
|
}
|