Skip to content

Commit

Permalink
fix warnings/release notes for Weekdays setting
Browse files Browse the repository at this point in the history
addendum to PR connamara#864 on issue connamara#844
  • Loading branch information
gbirchmeier committed May 29, 2024
1 parent c609125 commit c9d51d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions QuickFIXn/SessionSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ public SessionSchedule(SettingsDictionary settings)

_weekdays = settings.GetDays(SessionSettings.WEEKDAYS);
}
else {
_weekdays = new();
}

if (!settings.Has(SessionSettings.START_DAY) && settings.Has(SessionSettings.END_DAY))
throw new QuickFix.ConfigError("EndDay used without StartDay");
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ What's New
* Also refactor the heck out of DateTimeConverter & tests: many functions renamed/deprecated
* #847 - remove setting MillisecondsInTimeStamp (gbirchmeier)
* Use TimestampPrecision instead (same as QF/j)
* #844 - implement "Weekdays" setting (MichalUssuri/gbirchmeier)

**Non-breaking changes**
* #400 - added DDTool, a C#-based codegen, and deleted Ruby-based generator (gbirchmeier)
Expand All @@ -83,6 +82,7 @@ What's New
Programming Model (APM), in order to catch unobserved SocketExceptions (nmandzyk)
* Cleanup/nullable-ize SocketInitiatorThread (gbirchmeier)
* #839 - change ScreenLog to output FIX messages with "|" instead of non-visible SOH (gbirchmeier)
* #844 - implement "Weekdays" setting (MichalUssuri/gbirchmeier)

### v1.11.2:
* same as v1.11.1, but I fixed the readme in the pushed nuget packages
Expand Down
4 changes: 2 additions & 2 deletions UnitTests/SettingsDictionaryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void TestGetDay()

d.SetString("DAY_X", "invalid");
var ex = Assert.Throws(typeof(ArgumentException), delegate { d.GetDay("DAY_X"); });
StringAssert.Contains("Cannot recognize this day: 'invalid'", ex.Message);
StringAssert.Contains("Cannot recognize this day: 'invalid'", ex!.Message);
}

[Test]
Expand All @@ -130,7 +130,7 @@ public void TestSetDay() {
Assert.That(d.GetString("DAY4"), Is.EqualTo("Thursday"));

var ex = Assert.Throws(typeof(ArgumentException), delegate { d.SetDay("X", (DayOfWeek)9); });
StringAssert.Contains("Not a valid DayOfWeek value", ex.Message);
StringAssert.Contains("Not a valid DayOfWeek value", ex!.Message);
}

[Test]
Expand Down

0 comments on commit c9d51d9

Please sign in to comment.