Skip to content

Commit

Permalink
net8
Browse files Browse the repository at this point in the history
  • Loading branch information
softlion committed Feb 26, 2024
1 parent 6157b3c commit f7d0024
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 1,500 deletions.
3 changes: 3 additions & 0 deletions SQLite.Net.Tests/ArithmeticTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public void CanHaveAddInWhereClause()
db.InsertAll(cq);

TableQuery<TestObjInt> results = db.Table<TestObjInt>().Where(o => o.Data + 10 >= n);

// Assert.That(results.Count(), Is.EqualTo(11));
// Assert.That(results.OrderBy(o => o.Data).FirstOrDefault().Data, Is.EqualTo(10));
Assert.AreEqual(results.Count(), 11);
Assert.AreEqual(results.OrderBy(o => o.Data).FirstOrDefault().Data, 10);
}
Expand Down
10 changes: 9 additions & 1 deletion SQLite.Net.Tests/BaseTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
using NUnit.Framework;
//https://docs.nunit.org/articles/nunit/release-notes/Nunit4.0-MigrationGuide.html
global using Assert = NUnit.Framework.Legacy.ClassicAssert;
global using CollectionAssert = NUnit.Framework.Legacy.CollectionAssert;
global using StringAssert = NUnit.Framework.Legacy.StringAssert;
global using DirectoryAssert = NUnit.Framework.Legacy.DirectoryAssert;
global using FileAssert = NUnit.Framework.Legacy.FileAssert;


using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion SQLite.Net.Tests/ExceptionAssert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static T Throws<T>(Action action) where T : Exception
return ex;
}

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

return null;
}
Expand Down
10 changes: 3 additions & 7 deletions SQLite.Net.Tests/NotNullAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ public void NotNullConstraintExceptionListsOffendingColumnsOnUpdate()
}
catch (Exception ex)
{
Assert.Fail(
"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.",
ex.GetType().Name);
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
}
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
}
Expand Down Expand Up @@ -252,9 +250,7 @@ public void InsertQueryWithNullThrowsException()
}
catch (Exception ex)
{
Assert.Fail(
"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.",
ex.GetType().Name);
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
}
}
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
Expand Down Expand Up @@ -291,7 +287,7 @@ public void UpdateQueryWithNullThrowsException()
}
catch (Exception ex)
{
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {0} was thrown instead.", ex.GetType().Name);
Assert.Fail($"Expected an exception of type NotNullConstraintViolationException to be thrown. An exception of type {ex.GetType().Name} was thrown instead.");
}
Assert.Fail("Expected an exception of type NotNullConstraintViolationException to be thrown. No exception was thrown.");
}
Expand Down
10 changes: 5 additions & 5 deletions SQLite.Net.Tests/SQLite.Net2.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand All @@ -11,13 +11,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.0.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.8" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 0 additions & 20 deletions SQLite.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.156
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{49C7015B-F41A-47A6-8200-B925902E74E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stocks", "examples\Stocks\Stocks.csproj", "{9E5D6B89-B69B-486B-9F7B-406BE8690589}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5BD976ED-6E22-44A3-A5A1-D6C6633BAADD}"
ProjectSection(SolutionItems) = preProject
license.md = license.md
Expand Down Expand Up @@ -35,21 +31,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|x64.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Debug|x86.ActiveCfg = Debug|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|ARM.ActiveCfg = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|ARM64.ActiveCfg = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|x64.ActiveCfg = Release|Any CPU
{9E5D6B89-B69B-486B-9F7B-406BE8690589}.Release|x86.ActiveCfg = Release|Any CPU
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE454822-5982-4327-AE8D-26819659DC9A}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -102,7 +83,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9E5D6B89-B69B-486B-9F7B-406BE8690589} = {49C7015B-F41A-47A6-8200-B925902E74E9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ED68D56C-F9AF-45E9-9609-E8CABC16A3E2}
Expand Down
26 changes: 0 additions & 26 deletions examples/Stocks/AssemblyInfo.cs

This file was deleted.

137 changes: 0 additions & 137 deletions examples/Stocks/Main.cs

This file was deleted.

Loading

0 comments on commit f7d0024

Please sign in to comment.