Fix 4/4 of CA2201 warnings (#8103)

* Fix 4/4 of CA2201

* Remove warnings
This commit is contained in:
Ricardo Andrés Marino Rojas
2024-06-25 09:13:32 -05:00
committed by GitHub
parent aa5ab68b47
commit 5699fa48fd
80 changed files with 273 additions and 273 deletions
@@ -72,7 +72,7 @@ namespace QuantConnect.Algorithm.CSharp
if (security.HasData && (security.Price < minExpectedPrice || security.Price > maxExpectedPrice))
{
throw new Exception($"{security.Symbol}: Price {security.Price} is out of expected range [{minExpectedPrice}, {maxExpectedPrice}]");
throw new RegressionTestException($"{security.Symbol}: Price {security.Price} is out of expected range [{minExpectedPrice}, {maxExpectedPrice}]");
}
}
}
@@ -82,7 +82,7 @@ namespace QuantConnect.Algorithm.CSharp
var subscriptions = SubscriptionManager.Subscriptions.Where(x => x.Symbol == security.Symbol);
if (subscriptions.Any(x => x.DataNormalizationMode != expectedNormalizationMode))
{
throw new Exception($"Expected {security.Symbol} to have data normalization mode {expectedNormalizationMode} but was {subscriptions.First().DataNormalizationMode}");
throw new RegressionTestException($"Expected {security.Symbol} to have data normalization mode {expectedNormalizationMode} but was {subscriptions.First().DataNormalizationMode}");
}
}