Skip to content

Commit

Permalink
Added .NET Standard 2.0 to SIL.Archiving
Browse files Browse the repository at this point in the history
Test library targets .NET8. I did have to make a few tests which were testing for exact strings a little less specific, since the message varies between frameworks. They are different, since directory checking works differently between frameworks, but the core failure+warning is present.
  • Loading branch information
josephmyers committed Oct 3, 2024
1 parent f22556e commit 291bf34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SIL.Archiving.Tests/IMDIArchivingDlgViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void PathIsAccessible_NonexistentPath_False()
var writable = _model.IsPathWritable(dir);
Assert.False(writable);
Assert.AreEqual(1, m_messages.Count);
Assert.AreEqual("Test implementation message for PathNotWritable", m_messages[0].MsgText);
Assert.IsTrue(m_messages[0].MsgText.ToLower().Contains("path"), "Error should mention the path in its explanation.");
Assert.AreEqual(ArchivingDlgViewModel.MessageType.Warning, m_messages[0].MsgType);
}

Expand All @@ -111,7 +111,7 @@ public void IsPathWritable_WindowsInvalidPath_False()
var writable = _model.IsPathWritable(dir);
Assert.False(writable);
Assert.AreEqual(1, m_messages.Count);
Assert.IsTrue(m_messages[0].MsgText.Contains("path"), "Error should mention the path in its explanation.");
Assert.IsTrue(m_messages[0].MsgText.ToLower().Contains("path"), "Error should mention the path in its explanation.");
Assert.AreEqual(ArchivingDlgViewModel.MessageType.Warning, m_messages[0].MsgType);
}

Expand All @@ -122,7 +122,7 @@ public void IsPathWritable_IllegalCharacterInPath_False()
var writable = _model.IsPathWritable(dir);
Assert.False(writable);
Assert.AreEqual(1, m_messages.Count);
Assert.IsTrue(m_messages[0].MsgText.Contains("path"), "Error should mention the path in its explanation.");
Assert.IsTrue(m_messages[0].MsgText.ToLower().Contains("path"), "Error should mention the path in its explanation.");
Assert.AreEqual(ArchivingDlgViewModel.MessageType.Warning, m_messages[0].MsgType);
}

Expand Down
1 change: 1 addition & 0 deletions SIL.Archiving.Tests/SIL.Archiving.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<IsPackable>false</IsPackable>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<TargetFrameworks>$(TargetFrameworks);net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions SIL.Archiving/SIL.Archiving.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RootNamespace>SIL.Archiving</RootNamespace>
<AssemblyTitle>SIL.Archiving</AssemblyTitle>
<Description>SIL.Archiving contains classes for archiving data to REAP and IMDI.</Description>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 291bf34

Please sign in to comment.