Fixt testing environment variable
This commit is contained in:
parent
f448cccbeb
commit
a8c192848d
@ -55,15 +55,9 @@ public sealed class RhSolutionsAddIn : IExcelAddIn
|
||||
|
||||
EventsUtil.Initialize();
|
||||
|
||||
bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch
|
||||
if (Environment.GetEnvironmentVariable("ISTESTING") == "false")
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
//IntelliSenseServer.Install();
|
||||
IntelliSenseServer.Install();
|
||||
}
|
||||
|
||||
ServicePointManager.SecurityProtocol =
|
||||
@ -74,15 +68,9 @@ public sealed class RhSolutionsAddIn : IExcelAddIn
|
||||
{
|
||||
EventsUtil.Uninitialize();
|
||||
|
||||
bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch
|
||||
if (Environment.GetEnvironmentVariable("ISTESTING") == "false")
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
//IntelliSenseServer.Uninstall();
|
||||
IntelliSenseServer.Uninstall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,10 @@
|
||||
"Excel": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE",
|
||||
"commandLineArgs": "RhSolutions-AddIn64.xll"
|
||||
"commandLineArgs": "RhSolutions-AddIn64.xll",
|
||||
"environmentVariables": {
|
||||
"ISTESTING": "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<RunSettings>
|
||||
<RunConfiguration>
|
||||
<EnvironmentVariables>
|
||||
<ISTESTING>true</ISTESTING>
|
||||
</EnvironmentVariables>
|
||||
</RunConfiguration>
|
||||
</RunSettings>
|
@ -13,6 +13,7 @@ public class CanDoGuess : IDisposable
|
||||
|
||||
public CanDoGuess()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_guessReader = new GuessReader(Util.Application);
|
||||
|
@ -13,6 +13,7 @@ public class CanFillCouplings : IDisposable
|
||||
|
||||
public CanFillCouplings()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_calculator = new CouplingsCalculator();
|
||||
|
@ -13,6 +13,7 @@ public class CanFillSleeves : IDisposable
|
||||
|
||||
public CanFillSleeves()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_calculator = new SleevesCalculator();
|
||||
|
@ -12,6 +12,7 @@ public class CanReadProducts : IDisposable
|
||||
|
||||
public CanReadProducts()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_testWorkbook = Util.Application.Workbooks.Add();
|
||||
_addIn.AutoOpen();
|
||||
|
@ -12,6 +12,7 @@ public class CanWriteProducts : IDisposable
|
||||
|
||||
public CanWriteProducts()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_reader = new ExcelReader(Util.Application, RhSolutionsAddIn.Configuration);
|
||||
|
@ -12,6 +12,7 @@ public class RealPricelistTest : IDisposable
|
||||
|
||||
public RealPricelistTest()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_reader = new ExcelReader(Util.Application, RhSolutionsAddIn.Configuration);
|
||||
|
@ -10,6 +10,7 @@ public class WorkbookValidationTests : IDisposable
|
||||
|
||||
public WorkbookValidationTests()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new RhSolutionsAddIn();
|
||||
_addIn.AutoOpen();
|
||||
Util.Application.Workbooks.Add();
|
||||
|
Loading…
Reference in New Issue
Block a user