RhSolutions-AddIn/RhSolutions.Tests/WorkbookValidationTests.cs
2023-03-31 15:27:31 +03:00

29 lines
766 B
C#

namespace RhSolutions.Tests;
[ExcelTestSettings(OutOfProcess = true)]
public class WorkbookValidationTests : IDisposable
{
public WorkbookValidationTests()
{
Util.Application.Workbooks.Add();
}
[ExcelFact(Workbook = @"TestWorkbooks\EmptyTestTable.xlsx")]
public void WorksheetIsCorrect()
{
Worksheet worksheet = Util.Workbook.Sheets[1];
Assert.True(worksheet.IsRehauSource());
}
[ExcelFact(Workbook = @"TestWorkbooks\EmptyWorkbook.xlsx")]
public void EmptyWorkbookIsNotCorrect()
{
Worksheet worksheet = Util.Workbook.Sheets[1];
Assert.False(worksheet.IsRehauSource());
}
public void Dispose()
{
Util.Application.ActiveWindow.Close(SaveChanges: false);
}
}