Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit d6930a4

Browse files
committed
Upgrade to netcoreapp2.1 + latest NUnit test projs
1 parent d979c70 commit d6930a4

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

src/ServiceStack.OrmLite.MySql.Tests/ServiceStack.OrmLite.MySql.Tests.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
55
<DebugType>portable</DebugType>
66
<AssemblyName>ServiceStack.OrmLite.MySql.Tests</AssemblyName>
77
<OutputType>Library</OutputType>
@@ -56,7 +56,9 @@
5656
</ItemGroup>
5757

5858
<ItemGroup>
59-
<PackageReference Include="NUnit" Version="3.9.0" />
59+
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
60+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
61+
<PackageReference Include="NUnit" Version="3.10.1" />
6062
</ItemGroup>
6163

6264
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
@@ -80,11 +82,11 @@
8082
<Reference Include="..\..\lib\net45\ServiceStack.dll" />
8183
</ItemGroup>
8284

83-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
85+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
8486
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
8587
</PropertyGroup>
8688

87-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
89+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
8890
<PackageReference Include="System.Runtime" Version="4.3.0" />
8991
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
9092
<PackageReference Include="System.Reflection" Version="4.3.0" />

src/ServiceStack.OrmLite.MySql.Tests/ServiceStack.OrmLite.MySqlConnector.Tests.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
55
<DebugType>portable</DebugType>
66
<AssemblyName>ServiceStack.OrmLite.MySql.Tests</AssemblyName>
77
<OutputType>Library</OutputType>
@@ -56,7 +56,9 @@
5656
</ItemGroup>
5757

5858
<ItemGroup>
59-
<PackageReference Include="NUnit" Version="3.9.0" />
59+
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
60+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
61+
<PackageReference Include="NUnit" Version="3.10.1" />
6062
</ItemGroup>
6163

6264
<PropertyGroup>
@@ -84,7 +86,7 @@
8486
<Reference Include="..\..\lib\net45\ServiceStack.dll" />
8587
</ItemGroup>
8688

87-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
89+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
8890
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
8991
</PropertyGroup>
9092

@@ -96,7 +98,7 @@
9698
<OutputPath>bin\DebugConnector\net45\</OutputPath>
9799
</PropertyGroup>
98100

99-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
101+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
100102
<PackageReference Include="System.Runtime" Version="4.3.0" />
101103
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
102104
<PackageReference Include="System.Reflection" Version="4.3.0" />

tests/ServiceStack.OrmLite.SqliteTests/ServiceStack.OrmLite.SqliteTests.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
5-
<!--<TargetFrameworks>netcoreapp1.1</TargetFrameworks>-->
4+
<TargetFrameworks>net45;netcoreapp2.1</TargetFrameworks>
65
<DebugType>portable</DebugType>
76
<AssemblyName>ServiceStack.OrmLite.SqliteTests</AssemblyName>
87
<OutputType>Library</OutputType>
@@ -24,7 +23,9 @@
2423
</ItemGroup>
2524

2625
<ItemGroup>
27-
<PackageReference Include="NUnit" Version="3.8.1" />
26+
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
27+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
28+
<PackageReference Include="NUnit" Version="3.10.1" />
2829
</ItemGroup>
2930

3031
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
@@ -49,7 +50,7 @@
4950
<Reference Include="..\..\lib\net45\ServiceStack.dll" />
5051
</ItemGroup>
5152

52-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
53+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
5354
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
5455
</PropertyGroup>
5556

@@ -66,7 +67,7 @@
6667
<PackageReference Include="NUnitLite" Version="3.6.1" />
6768
</ItemGroup>
6869

69-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
70+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
7071
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.0" />
7172
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.0.0" />
7273
<PackageReference Include="System.Runtime" Version="4.*" />

tests/ServiceStack.OrmLite.Tests/OrmLiteFiltersTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ public void Does_call_Filters_on_insert_and_update()
4646

4747
OrmLiteConfig.InsertFilter = (dbCmd, row) =>
4848
{
49-
var auditRow = row as IAudit;
50-
if (auditRow != null)
49+
if (row is IAudit auditRow)
5150
{
5251
auditRow.CreatedDate = auditRow.ModifiedDate = insertDate;
5352
}
5453
};
5554

5655
OrmLiteConfig.UpdateFilter = (dbCmd, row) =>
5756
{
58-
var auditRow = row as IAudit;
59-
if (auditRow != null)
57+
if (row is IAudit auditRow)
6058
{
6159
auditRow.ModifiedDate = updateDate;
6260
}

0 commit comments

Comments
 (0)