Skip to content

Commit

Permalink
.NET8 SIL.Core.Tests (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmyers authored Oct 17, 2024
1 parent ad4c21f commit 3f8fe62
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
4 changes: 0 additions & 4 deletions SIL.Core.Desktop.Tests/SIL.Core.Desktop.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@
<ProjectReference Include="..\SIL.TestUtilities\SIL.TestUtilities.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public string CreateAnAcknowledgement_TestDefaultHtml(string key, string name, s
public void CreateAnAcknowledgement_NoCopyright_OverriddenByFile()
{
var ack = new AcknowledgementAttribute("testKey") { Name = "testName",
Location = GetDllWithPathInTestAssemblyFolder("NDesk.DBus.dll") } ;
Assert.That(ack.Copyright, Is.EqualTo("Copyright (C) Alp Toker"));
Location = GetDllWithPathInTestAssemblyFolder("nunit.framework.dll") } ;
Assert.That(ack.Copyright, Is.EqualTo("Copyright (c) 2022 Charlie Poole, Rob Prouse"));
}

[Test]
Expand Down
8 changes: 4 additions & 4 deletions SIL.Core.Tests/PlatformUtilities/PlatformTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ namespace SIL.Tests.PlatformUtilities
public class PlatformTests
{
[Test]
[Platform(Exclude="Net")]
[Platform(Exclude="Net,NetCore")]
public void IsMono_Mono()
{
Assert.That(Platform.IsMono, Is.True);
}

[Test]
[Platform(Include="Net")]
[Platform(Include="Net,NetCore")]
public void IsMono_Net()
{
Assert.That(Platform.IsMono, Is.False);
}

[Test]
[Platform(Exclude="Net")]
[Platform(Exclude="Net,NetCore")]
public void IsDotnet_Mono()
{
Assert.That(Platform.IsDotNet, Is.False);
}

[Test]
[Platform(Include="Net")]
[Platform(Include="Net,NetCore")]
public void IsDotnet_Net()
{
Assert.That(Platform.IsDotNet, Is.True);
Expand Down
6 changes: 6 additions & 0 deletions SIL.Core.Tests/Progress/ConsoleProgressTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public void Setup()
_countForWork = 0;
}

[TearDown]
public void TearDown()
{
_logBuilder.Dispose();
}

[Test]
[Category("ByHand")]
[Explicit]
Expand Down
2 changes: 2 additions & 0 deletions SIL.Core.Tests/SIL.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>SIL.Core.Tests</AssemblyName>
<Description>Unit tests for SIL.Core</Description>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
<TargetFrameworks>$(TargetFrameworks);net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,6 +21,7 @@
<ProjectReference Include="..\SIL.Core\SIL.Core.csproj" />
<ProjectReference Include="..\SIL.TestUtilities\SIL.TestUtilities.csproj" />
<ProjectReference Include="..\SIL.WritingSystems\SIL.WritingSystems.csproj" />
<ProjectReference Include="..\TestApps\CommandLineRunnerTestApp\CommandLineRunnerTestApp.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public override bool Read(int secondsBeforeTimeOut)
if (secondsBeforeTimeOut>0 && DateTime.Now > end)
{
if (_outputReader != null)
_outputReader.Abort();
_outputReader.Interrupt();
if (_errorReader != null)
_errorReader.Abort();
_errorReader.Interrupt();
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<RootNamespace>SIL.CommandLineProcessing.TestApp</RootNamespace>
<AssemblyName>SIL.CommandLineProcessing.TestApp</AssemblyName>
<Description>SIL.CommandLineProcessing test app</Description>
<OutputPath>../../output/$(Configuration)</OutputPath>
<IsPackable>false</IsPackable>
<UseWindowsForms>true</UseWindowsForms>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworks>$(TargetFrameworks);net8.0</TargetFrameworks>
</PropertyGroup>
</Project>

0 comments on commit 3f8fe62

Please sign in to comment.