Skip to content

Commit

Permalink
Remove associated tests for negative time rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbroad committed Feb 10, 2017
1 parent 6043d40 commit 77a511f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
5 changes: 0 additions & 5 deletions Common/Scheduling/TimeRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ where security.Exchange.DateIsOpen(date)
/// <returns>A time rule that fires the specified number of minutes before the symbol's market close</returns>
public ITimeRule BeforeMarketClose(Symbol symbol, double minutesBeforeClose = 0, bool extendedMarketClose = false)
{
if (minutesBeforeClose < 0)
{
throw new ArgumentException("The time before market close is negative. Please make sure it is a non-negative value", "minutesBeforeClose");
}

var security = GetSecurity(symbol);

var type = extendedMarketClose ? "ExtendedMarketClose" : "MarketClose";
Expand Down
14 changes: 0 additions & 14 deletions Tests/Common/Scheduling/TimeRulesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,6 @@ public void ExtendedMarketOpenWithDelta()
Assert.AreEqual(1, count);
}

[Test]
public void RegularMarketOpenWithNegativeDelta()
{
var rules = GetTimeRules(TimeZones.Utc);
Assert.Throws<ArgumentException>(() => rules.AfterMarketOpen(Symbols.SPY, -30));
}

[Test]
public void RegularMarketCloseNoDelta()
{
Expand Down Expand Up @@ -163,13 +156,6 @@ public void RegularMarketCloseWithDelta()
Assert.AreEqual(1, count);
}

[Test]
public void RegularMarketCloseWithNegativeDelta()
{
var rules = GetTimeRules(TimeZones.Utc);
Assert.Throws<ArgumentException>(() => rules.BeforeMarketClose(Symbols.SPY, -30));
}

[Test]
public void ExtendedMarketCloseNoDelta()
{
Expand Down

0 comments on commit 77a511f

Please sign in to comment.