Skip to content

Commit f7d0024

Browse files
committed
net8
1 parent 6157b3c commit f7d0024

26 files changed

+25
-1500
lines changed

SQLite.Net.Tests/ArithmeticTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public void CanHaveAddInWhereClause()
5050
db.InsertAll(cq);
5151

5252
TableQuery<TestObjInt> results = db.Table<TestObjInt>().Where(o => o.Data + 10 >= n);
53+
54+
// Assert.That(results.Count(), Is.EqualTo(11));
55+
// Assert.That(results.OrderBy(o => o.Data).FirstOrDefault().Data, Is.EqualTo(10));
5356
Assert.AreEqual(results.Count(), 11);
5457
Assert.AreEqual(results.OrderBy(o => o.Data).FirstOrDefault().Data, 10);
5558
}

SQLite.Net.Tests/BaseTest.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
using NUnit.Framework;
1+
//https://docs.nunit.org/articles/nunit/release-notes/Nunit4.0-MigrationGuide.html
2+
global using Assert = NUnit.Framework.Legacy.ClassicAssert;
3+
global using CollectionAssert = NUnit.Framework.Legacy.CollectionAssert;
4+
global using StringAssert = NUnit.Framework.Legacy.StringAssert;
5+
global using DirectoryAssert = NUnit.Framework.Legacy.DirectoryAssert;
6+
global using FileAssert = NUnit.Framework.Legacy.FileAssert;
7+
8+
9+
using NUnit.Framework;
210
using System;
311
using System.Collections.Generic;
412
using System.Linq;

SQLite.Net.Tests/ExceptionAssert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static T Throws<T>(Action action) where T : Exception
1616
return ex;
1717
}
1818

19-
Assert.Fail("Expected exception of type {0}.", typeof (T));
19+
Assert.Fail($"Expected exception of type {typeof (T)}.");
2020

2121
return null;
2222
}

SQLite.Net.Tests/NotNullAttributeTest.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ public void NotNullConstraintExceptionListsOffendingColumnsOnUpdate()
215215
}
216216
catch (Exception ex)
217217
{
218-
Assert.Fail(
219-
"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.",
220-
ex.GetType().Name);
218+
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
221219
}
222220
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
223221
}
@@ -252,9 +250,7 @@ public void InsertQueryWithNullThrowsException()
252250
}
253251
catch (Exception ex)
254252
{
255-
Assert.Fail(
256-
"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.",
257-
ex.GetType().Name);
253+
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
258254
}
259255
}
260256
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
@@ -291,7 +287,7 @@ public void UpdateQueryWithNullThrowsException()
291287
}
292288
catch (Exception ex)
293289
{
294-
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.", ex.GetType().Name);
290+
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
295291
}
296292
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
297293
}

SQLite.Net.Tests/SQLite.Net2.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77

@@ -11,13 +11,13 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="nunit" Version="3.13.3" />
15-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
14+
<PackageReference Include="nunit" Version="4.1.0" />
15+
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
20-
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.0.7" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
20+
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.8" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

SQLite.Net.sln

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.28803.156
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{49C7015B-F41A-47A6-8200-B925902E74E9}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stocks", "examples\Stocks\Stocks.csproj", "{9E5D6B89-B69B-486B-9F7B-406BE8690589}"
9-
EndProject
106
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5BD976ED-6E22-44A3-A5A1-D6C6633BAADD}"
117
ProjectSection(SolutionItems) = preProject
128
license.md = license.md
@@ -35,21 +31,6 @@ Global
3531
Release|x86 = Release|x86
3632
EndGlobalSection
3733
GlobalSection(ProjectConfigurationPlatforms) = postSolution
38-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Any CPU.Build.0 = Debug|Any CPU
40-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|ARM.ActiveCfg = Debug|Any CPU
41-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|ARM64.ActiveCfg = Debug|Any CPU
42-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
43-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
44-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|x64.ActiveCfg = Debug|Any CPU
45-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|x86.ActiveCfg = Debug|Any CPU
46-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Any CPU.ActiveCfg = Release|Any CPU
47-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|ARM.ActiveCfg = Release|Any CPU
48-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|ARM64.ActiveCfg = Release|Any CPU
49-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
50-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Mixed Platforms.Build.0 = Release|Any CPU
51-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|x64.ActiveCfg = Release|Any CPU
52-
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|x86.ActiveCfg = Release|Any CPU
5334
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5435
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
5536
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -102,7 +83,6 @@ Global
10283
HideSolutionNode = FALSE
10384
EndGlobalSection
10485
GlobalSection(NestedProjects) = preSolution
105-
{9E5D6B89-B69B-486B-9F7B-406BE8690589} = {49C7015B-F41A-47A6-8200-B925902E74E9}
10686
EndGlobalSection
10787
GlobalSection(ExtensibilityGlobals) = postSolution
10888
SolutionGuid = {ED68D56C-F9AF-45E9-9609-E8CABC16A3E2}

examples/Stocks/AssemblyInfo.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

examples/Stocks/Main.cs

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)