Add RhSolutions formula test
This commit is contained in:
parent
6497738c2d
commit
2cef4d1d9f
30
RhSolutions.Tests/RhSolutionsCheckTest.cs
Normal file
30
RhSolutions.Tests/RhSolutionsCheckTest.cs
Normal file
@ -0,0 +1,30 @@
|
||||
namespace RhSolutions.Tests;
|
||||
|
||||
[ExcelTestSettings(AddIn = @"..\..\..\..\RhSolutions.AddIn\bin\Debug\net6.0-windows\RhSolutions-AddIn")]
|
||||
public class RhSolutionsCheckTest : IDisposable
|
||||
{
|
||||
private Workbook workbook;
|
||||
|
||||
public RhSolutionsCheckTest()
|
||||
{
|
||||
workbook = Util.Application.Workbooks.Add();
|
||||
}
|
||||
|
||||
[ExcelFact]
|
||||
public void RhSolutionsFunctionWorks()
|
||||
{
|
||||
var ws = workbook.Sheets[1];
|
||||
|
||||
ws.Range["A1"].Formula = "=RHSOLUTIONS(\"гильза 16\")";
|
||||
Util.Application.CalculateFull();
|
||||
|
||||
var result = ws.Range["A1"].Value;
|
||||
|
||||
Assert.Equal("Загрузка...", result);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Util.Application.ActiveWorkbook.Close(SaveChanges: false);
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
namespace RhSolutions.Tests;
|
||||
//namespace RhSolutions.Tests;
|
||||
|
||||
[ExcelTestSettings(AddIn = @"..\..\..\..\RhSolutions.AddIn\bin\Debug\net6.0-windows\RhSolutions-AddIn")]
|
||||
public class WorkbookCheckTests : IDisposable
|
||||
{
|
||||
[ExcelFact(Workbook = @".\Workbooks\EmptyTestTable.xlsx")]
|
||||
public void WorksheetIsCorrect()
|
||||
{
|
||||
Assert.True(true);
|
||||
}
|
||||
//[ExcelTestSettings(AddIn = @"..\..\..\..\RhSolutions.AddIn\bin\Debug\net6.0-windows\RhSolutions-AddIn")]
|
||||
//public class WorkbookCheckTests : IDisposable
|
||||
//{
|
||||
// [ExcelFact(Workbook = @".\Workbooks\EmptyTestTable.xlsx")]
|
||||
// public void WorksheetIsCorrect()
|
||||
// {
|
||||
// Assert.True(true);
|
||||
// }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Util.Application.ActiveWorkbook.Close(SaveChanges: false);
|
||||
}
|
||||
}
|
||||
// public void Dispose()
|
||||
// {
|
||||
// Util.Application.ActiveWorkbook.Close(SaveChanges: false);
|
||||
// }
|
||||
//}
|
Loading…
Reference in New Issue
Block a user