Compare commits
No commits in common. "2cef4d1d9f95ee358b61963dff1ce71e97e9a03c" and "6484cac4f025bd84f7ffa2b2030d729dafe09d3d" have entirely different histories.
2cef4d1d9f
...
6484cac4f0
@ -1,30 +0,0 @@
|
|||||||
namespace RhSolutions.Tests;
|
|
||||||
|
|
||||||
public class CalculationTests : IDisposable
|
|
||||||
{
|
|
||||||
private Workbook workbook;
|
|
||||||
|
|
||||||
public CalculationTests()
|
|
||||||
{
|
|
||||||
workbook = Util.Application.Workbooks.Add();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
workbook.Close(SaveChanges: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ExcelFact]
|
|
||||||
public void NumbersAddCorrectly()
|
|
||||||
{
|
|
||||||
var ws = workbook.Sheets[1];
|
|
||||||
|
|
||||||
ws.Range["A1"].Value = 2.0;
|
|
||||||
ws.Range["A2"].Value = 3.0;
|
|
||||||
ws.Range["A3"].Formula = "= A1 + A2";
|
|
||||||
|
|
||||||
var result = ws.Range["A3"].Value;
|
|
||||||
|
|
||||||
Assert.Equal(5.0, result);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="ExcelDna.Testing" Version="1.6.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,30 +0,0 @@
|
|||||||
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,3 +0,0 @@
|
|||||||
global using Xunit;
|
|
||||||
global using Microsoft.Office.Interop.Excel;
|
|
||||||
global using ExcelDna.Testing;
|
|
@ -1,16 +0,0 @@
|
|||||||
//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);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void Dispose()
|
|
||||||
// {
|
|
||||||
// Util.Application.ActiveWorkbook.Close(SaveChanges: false);
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.0.32112.339
|
VisualStudioVersion = 17.0.32112.339
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RhSolutions.AddIn", "RhSolutions.AddIn\RhSolutions.AddIn.csproj", "{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RhSolutions", "src\RhSolutions.csproj", "{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}"
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RhSolutions.Tests", "RhSolutions.Tests\RhSolutions.Tests.csproj", "{6EECCDDB-741C-404A-874F-BB8656265162}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -17,10 +15,6 @@ Global
|
|||||||
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Release|Any CPU.Build.0 = Release|Any CPU
|
{18A2FF67-0E46-4A86-B872-29F2B3F23ADF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{6EECCDDB-741C-404A-874F-BB8656265162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{6EECCDDB-741C-404A-874F-BB8656265162}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{6EECCDDB-741C-404A-874F-BB8656265162}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{6EECCDDB-741C-404A-874F-BB8656265162}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -13,11 +13,10 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ExcelDna.AddIn" Version="1.6.0" />
|
<PackageReference Include="ExcelDna.AddIn" Version="1.6.0" />
|
||||||
<PackageReference Include="ExcelDna.Integration" Version="1.6.0" />
|
|
||||||
<PackageReference Include="ExcelDna.IntelliSense" Version="1.6.0" />
|
<PackageReference Include="ExcelDna.IntelliSense" Version="1.6.0" />
|
||||||
<PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
|
<PackageReference Include="ExcelDna.Interop" Version="15.0.0" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="RhSolutions.Sku" Version="0.1.1" />
|
<PackageReference Include="RhSolutions.Sku" Version="0.1.1" />
|
||||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
Loading…
x
Reference in New Issue
Block a user