RhSolutions-AddIn/RhSolutions.Tests/RhSolutionsCheckTest.cs
2023-03-23 17:13:48 +03:00

31 lines
923 B
C#

namespace RhSolutions.Tests
{
[ExcelTestSettings(AddIn = @"..\..\..\..\RhSolutions.AddIn\bin\Debug\net472\RhSolutions-AddIn", OutOfProcess = true)]
public class WorkbookCheck : IDisposable
{
public WorkbookCheck()
{
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.ActiveWorkbook.Close(SaveChanges: false);
}
}
}