Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update target to net 8.0 + Replace deprecated US timezone #870

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AcceptanceTest/AcceptanceTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion DDTool/DDTool/DDTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion DDTool/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Executor/Examples.Executor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Executor</RootNamespace>
<AssemblyName>Executor</AssemblyName>
<Copyright>Copyright © Connamara Systems, LLC 2011</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Examples/FixToJson/Examples.FixToJson.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Copyright>Copyright © Connamara Systems, LLC 2022</Copyright>
<Company>Connamara Systems, LLC</Company>
Expand Down
2 changes: 1 addition & 1 deletion Examples/JsonToFix/Examples.JsonToFix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Copyright>Copyright © Connamara Systems, LLC 2022</Copyright>
<Company>Connamara Systems, LLC</Company>
Expand Down
2 changes: 1 addition & 1 deletion Examples/SimpleAcceptor/Examples.SimpleAcceptor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>SimpleAcceptor</RootNamespace>
<AssemblyName>SimpleAcceptor</AssemblyName>
<Copyright>Copyright © Connamara Systems, LLC 2011</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Standalone/SerilogLog/SerilogLog.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Standalone/SerilogLog/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Examples/TradeClient/Examples.TradeClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>TradeClient</RootNamespace>
<AssemblyName>TradeClient</AssemblyName>
<Copyright>Copyright © Connamara Systems, LLC 2011</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX40/QuickFix.FIX40.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX4.0 Messages</Title>
<PackageId>QuickFIXn.FIX4.0</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX41/QuickFix.FIX41.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX4.1 Messages</Title>
<PackageId>QuickFIXn.FIX4.1</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX42/QuickFix.FIX42.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX4.2 Messages</Title>
<PackageId>QuickFIXn.FIX4.2</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX43/QuickFix.FIX43.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX4.3 Messages</Title>
<PackageId>QuickFIXn.FIX4.3</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX44/QuickFix.FIX44.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX4.4 Messages</Title>
<PackageId>QuickFIXn.FIX4.4</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX50/QuickFix.FIX50.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX5.0 Messages</Title>
<PackageId>QuickFIXn.FIX5.0</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX50SP1/QuickFix.FIX50SP1.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX5.0 SP1 Messages</Title>
<PackageId>QuickFIXn.FIX5.0SP1</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIX50SP2/QuickFix.FIX50SP2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIX5.0 SP2 Messages</Title>
<PackageId>QuickFIXn.FIX5.0SP2</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion Messages/FIXT11/QuickFix.FIXT11.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<Title>QuickFIX/n FIXT1.1 Messages</Title>
<PackageId>QuickFIXn.FIXT1.1</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/QuickFix.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<Title>QuickFIX/n</Title>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
Expand Down
22 changes: 12 additions & 10 deletions UnitTests/SessionScheduleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private static string EasternStandardTimeZoneId
{
return TimeZoneInfo.GetSystemTimeZones().Any(x => x.Id == "Eastern Standard Time")
? "Eastern Standard Time"
: "US/Eastern";
: "America/New_York";
}
}

Expand All @@ -33,7 +33,7 @@ private static string PacificStandardTimeZoneId
{
return TimeZoneInfo.GetSystemTimeZones().Any(x => x.Id == "Pacific Standard Time")
? "Pacific Standard Time"
: "US/Pacific";
: "America/Los_Angeles";
}
}
#endregion
Expand Down Expand Up @@ -75,7 +75,8 @@ public void TestCtor_WeeklongSession()
}

[Test]
public void TestCtor_WeekdaysSession() {
public void TestCtor_WeekdaysSession()
{
SettingsDictionary settings = new SettingsDictionary();
settings.SetString(SessionSettings.WEEKDAYS, "Sun,Tue,Fri");

Expand All @@ -92,7 +93,8 @@ public void TestCtor_WeekdaysSession() {
}

[Test]
public void TestCtor_NonStopSession() {
public void TestCtor_NonStopSession()
{
SettingsDictionary settings = new SettingsDictionary();
settings.SetBool(SessionSettings.NON_STOP_SESSION, true);
Assert.DoesNotThrow(delegate { new SessionSchedule(settings); });
Expand Down Expand Up @@ -133,7 +135,7 @@ public void TestWeeklySessionSameDayAllWeek()
settings.SetDay(SessionSettings.START_DAY, DayOfWeek.Monday);
settings.SetDay(SessionSettings.END_DAY, DayOfWeek.Monday);
SessionSchedule sched = new SessionSchedule(settings);

//a sunday
Assert.IsTrue(sched.IsSessionTime(new DateTime(2011, 10, 16, 9, 43, 0, DateTimeKind.Utc)));
Assert.IsTrue(sched.IsSessionTime(new DateTime(2011, 10, 16, 23, 59, 59, DateTimeKind.Utc)));
Expand All @@ -159,7 +161,7 @@ public void TestWeeklySessionSameDayMostWeek()
settings.SetDay(SessionSettings.START_DAY, DayOfWeek.Monday);
settings.SetDay(SessionSettings.END_DAY, DayOfWeek.Monday);
SessionSchedule sched = new SessionSchedule(settings);

//a sunday
Assert.IsTrue(sched.IsSessionTime(new DateTime(2011, 10, 16, 23, 59, 59, DateTimeKind.Utc)));
Assert.IsTrue(sched.IsSessionTime(new DateTime(2011, 10, 16, 0, 0, 0, DateTimeKind.Utc)));
Expand All @@ -184,7 +186,7 @@ public void TestWeeklySessionSameDayOneDay()
settings.SetDay(SessionSettings.START_DAY, DayOfWeek.Monday);
settings.SetDay(SessionSettings.END_DAY, DayOfWeek.Monday);
SessionSchedule sched = new SessionSchedule(settings);

//a sunday
Assert.IsFalse(sched.IsSessionTime(new DateTime(2011, 10, 16, 23, 59, 59, DateTimeKind.Utc)));
Assert.IsFalse(sched.IsSessionTime(new DateTime(2011, 10, 16, 0, 0, 0, DateTimeKind.Utc)));
Expand Down Expand Up @@ -310,7 +312,7 @@ public void TestWeeklySessionMultiDayHoursOverlap()
Assert.IsFalse(sched.IsSessionTime(new DateTime(2011, 10, 22, 7, 00, 1, DateTimeKind.Utc)));
Assert.IsFalse(sched.IsSessionTime(new DateTime(2011, 10, 22, 15, 30, 0, DateTimeKind.Utc)));
}


[Test]
public void TestDailyIsSessionTime()
Expand Down Expand Up @@ -355,7 +357,7 @@ public void TestInvalidTimeZone()
settings.SetString(SessionSettings.END_TIME, "00:12:00");
settings.SetString(SessionSettings.TIME_ZONE, "Doh");

Assert.Throws(typeof (TimeZoneNotFoundException), delegate { new SessionSchedule(settings); });
Assert.Throws(typeof(TimeZoneNotFoundException), delegate { new SessionSchedule(settings); });
}

[Test]
Expand All @@ -368,7 +370,7 @@ public void TestLocalTimeTimeZoneConflict()
settings.SetString(SessionSettings.USE_LOCAL_TIME, "Y");
settings.SetString(SessionSettings.TIME_ZONE, EasternStandardTimeZoneId);

Assert.Throws(typeof (ConfigError), delegate { new SessionSchedule(settings); });
Assert.Throws(typeof(ConfigError), delegate { new SessionSchedule(settings); });
}

[Test]
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<IsPackable>false</IsPackable>
Expand Down