Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET8 SIL.Core.Tests #1348

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>