Test edit

This commit is contained in:
Sergey Chebotar 2023-03-24 06:22:40 +03:00
parent 3c93c978d4
commit 2cb7cd0377

View File

@ -1,30 +1,29 @@
namespace RhSolutions.Tests namespace RhSolutions.Tests;
[ExcelTestSettings(OutOfProcess = true)]
public class WorkbookCheck : IDisposable
{ {
[ExcelTestSettings(AddIn = @"..\..\..\..\RhSolutions.AddIn\bin\Debug\net472\RhSolutions-AddIn", OutOfProcess = true)] public WorkbookCheck()
public class WorkbookCheck : IDisposable
{ {
public WorkbookCheck() Util.Application.Workbooks.Add();
{ }
Util.Application.Workbooks.Add();
}
[ExcelFact(Workbook = @"TestWorkbooks\EmptyTestTable.xlsx")] [ExcelFact(Workbook = @"TestWorkbooks\EmptyTestTable.xlsx")]
public void WorksheetIsCorrect() public void WorksheetIsCorrect()
{ {
Worksheet worksheet= Util.Workbook.Sheets[1]; Worksheet worksheet= Util.Workbook.Sheets[1];
Assert.True(worksheet.IsRehauSource()); Assert.True(worksheet.IsRehauSource());
} }
[ExcelFact(Workbook = @"TestWorkbooks\EmptyWorkbook.xlsx")] [ExcelFact(Workbook = @"TestWorkbooks\EmptyWorkbook.xlsx")]
public void EmptyWorkbookIsNotCorrect() public void EmptyWorkbookIsNotCorrect()
{ {
Worksheet worksheet = Util.Workbook.Sheets[1]; Worksheet worksheet = Util.Workbook.Sheets[1];
Assert.False(worksheet.IsRehauSource()); Assert.False(worksheet.IsRehauSource());
} }
public void Dispose() public void Dispose()
{ {
Util.Application.ActiveWorkbook.Close(SaveChanges: false); Util.Application.ActiveWorkbook.Close(SaveChanges: false);
}
} }
} }