Fix 4/4 of CA2201 warnings (#8103)
* Fix 4/4 of CA2201 * Remove warnings
This commit is contained in:
committed by
GitHub
parent
aa5ab68b47
commit
5699fa48fd
@@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user