Skip to content

Commit

Permalink
tools: update to .NET 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darakeon committed Nov 26, 2023
1 parent 4f0c956 commit b865905
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Source/Eml.Tests/Base64Step.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void WhenAskToDecodeIt()
[Then(@"the new text will be (.+)")]
public void ThenTheNewTextWillBeTitle(String expected)
{
Assert.AreEqual(expected, decoded);
Assert.That(decoded, Is.EqualTo(expected));
}
}
}
4 changes: 2 additions & 2 deletions Source/Eml.Tests/Eml.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
35 changes: 18 additions & 17 deletions Source/Eml.Tests/EmlReaderStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ public void WhenContentReadIsCalled()
[Then(@"the result is null")]
public void ThenTheResultIsNull()
{
Assert.IsNull(reader);
Assert.That(reader, Is.Null);
}

[Then(@"the result is not null")]
public void ThenTheResultIsNotNull()
{
Assert.IsNotNull(reader);
Assert.That(reader, Is.Not.Null);
}

[Then(@"the body is")]
Expand All @@ -117,11 +117,11 @@ public void ThenTheBodyIs(Table table)

var actual = reader.Body.Split("\n");

Assert.AreEqual(expected.Length, actual.Length);
Assert.That(actual.Length, Is.EqualTo(expected.Length));

for (var l = 0; l < actual.Length; l++)
{
Assert.AreEqual(expected[l], actual[l]);
Assert.That(actual[l], Is.EqualTo(expected[l]));
}
}

Expand All @@ -135,16 +135,16 @@ public void ThenTheBodyIsSameAsContentOf(String filename)

for (var l = 0; l < Math.Min(actual.Length, expected.Length); l++)
{
Assert.AreEqual(expected[l], actual[l], $"Line {l}");
Assert.That(actual[l], Is.EqualTo(expected[l]), $"Line {l}");
}

Assert.AreEqual(expected.Length, actual.Length);
Assert.That(actual.Length, Is.EqualTo(expected.Length));
}

[Then(@"the creation date is (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}|null)")]
public void ThenTheCreationDateIs(DateTime? creation)
{
Assert.AreEqual(creation, reader.Creation);
Assert.That(reader.Creation, Is.EqualTo(creation));
}

[Then(@"the header is")]
Expand All @@ -156,31 +156,32 @@ public void ThenTheHeaderIs(Table table)

foreach (var key in headers.Keys)
{
Assert.True(
Assert.That(
reader.Headers.ContainsKey(key),
Is.True,
$"Key '{key}' not found"
);

var expected = headers[key]
.Replace("§", "\t");

Assert.AreEqual(
trimAmpersand(expected),
Assert.That(
reader.Headers[key],
Is.EqualTo(trimAmpersand(expected)),
$"Key '{key}' with wrong value"
);
}

Assert.AreEqual(headers.Count, reader.Headers.Count);
Assert.That(reader.Headers.Count, Is.EqualTo(headers.Count));
}

[Then(@"the subject is (.+)")]
public void ThenTheSubjectIs(String subject)
{
if (subject == "null")
Assert.Null(reader.Subject);
Assert.That(reader.Subject, Is.Null);
else
Assert.AreEqual(subject, reader.Subject);
Assert.That(reader.Subject, Is.EqualTo(subject));
}

[Then(@"these contents will be the attachments")]
Expand All @@ -193,16 +194,16 @@ public void ThenTheseContentsWillBeTheAttachments(Table table)

var actual = reader.Attachments;

Assert.AreEqual(fileNames.Length, actual.Count);
Assert.That(actual.Count, Is.EqualTo(fileNames.Length));

for (var l = 0; l < actual.Count; l++)
{
var fileName = fileNames[l];
var path = Path.Combine("examples", fileName);

Assert.AreEqual(
File.ReadAllText(path),
actual[l]
Assert.That(
actual[l],
Is.EqualTo(File.ReadAllText(path))
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions Source/Eml/Eml.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.Eml</AssemblyName>
<Authors>darakeon</Authors>
<Company>Dara Keon</Company>
Expand All @@ -17,8 +17,8 @@
<RepositoryType>git</RepositoryType>
<PackageTags>eml reader</PackageTags>
<RootNamespace>Keon.Eml</RootNamespace>
<Version>5.0.0</Version>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<Version>6.0.0</Version>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
10 changes: 5 additions & 5 deletions Source/MVC/MVC.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.MVC</AssemblyName>
<RootNamespace>Keon.MVC</RootNamespace>
<Authors>darakeon</Authors>
Expand All @@ -14,10 +14,10 @@
<RepositoryUrl>https://github.com/darakeon/dk-lib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>utility mvc</PackageTags>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.0.2</Version>
<Version>5.0.0</Version>
<PackageIcon>image.png</PackageIcon>
</PropertyGroup>

Expand All @@ -26,9 +26,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Source/NHibernate/NHibernate.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.NHibernate</AssemblyName>
<RootNamespace>Keon.NHibernate</RootNamespace>
<Authors>darakeon</Authors>
Expand All @@ -14,10 +14,10 @@
<RepositoryUrl>https://github.com/darakeon/dk-lib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>utility nhibernate orm</PackageTags>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.0.4</Version>
<Version>5.0.0</Version>
<PackageIcon>image.png</PackageIcon>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions Source/TwoFactorAuth/TwoFactorAuth.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.TwoFactorAuth</AssemblyName>
<RootNamespace>Keon.TwoFactorAuth</RootNamespace>
<Authors>darakeon</Authors>
Expand All @@ -14,10 +14,10 @@
<RepositoryUrl>https://github.com/darakeon/dk-lib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>utility two-factor twofactor 2fa tfa</PackageTags>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>3.0.1</Version>
<Version>4.0.0</Version>
<PackageIcon>image.png</PackageIcon>
</PropertyGroup>

Expand All @@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 6 additions & 3 deletions Source/Util.Tests/Util.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.Util.Tests</AssemblyName>
<RootNamespace>Keon.Util.Tests</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -13,9 +13,12 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions Source/Util/Util.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.Util</AssemblyName>
<RootNamespace>Keon.Util</RootNamespace>
<Authors>darakeon</Authors>
Expand All @@ -14,10 +14,10 @@
<RepositoryUrl>https://github.com/darakeon/dk-lib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>utility</PackageTags>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.1.0</Version>
<Version>5.0.0</Version>
<PackageIcon>image.png</PackageIcon>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Source/XML/XML.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Keon.XML</AssemblyName>
<RootNamespace>Keon.XML</RootNamespace>
<Authors>darakeon</Authors>
Expand All @@ -14,10 +14,10 @@
<RepositoryUrl>https://github.com/darakeon/dk-lib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>utility xml</PackageTags>
<PackageReleaseNotes>Upgrade to .NET 7.0</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to .NET 8.0</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.0.0</Version>
<Version>5.0.0</Version>
<PackageIcon>image.png</PackageIcon>
</PropertyGroup>

Expand Down

0 comments on commit b865905

Please sign in to comment.