Skip to content

Commit

Permalink
Bump NUnit from 3.14.0 to 4.0.0 (#288)
Browse files Browse the repository at this point in the history
* Bump NUnit from 3.14.0 to 4.0.0

Bumps [NUnit](https://github.com/nunit/nunit) from 3.14.0 to 4.0.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](nunit/nunit@v3.14.0...v4.0.0)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix tests

Fix tests broken by NUnit 4 upgrade.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: martincostello <[email protected]>
  • Loading branch information
dependabot[bot] and martincostello authored Nov 27, 2023
1 parent e2a1bac commit 07678d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageVersion Include="Humanizer" Version="2.14.1" />
<PackageVersion Include="Karambolo.PO.Compact" Version="1.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit" Version="4.0.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>
</Project>
9 changes: 7 additions & 2 deletions PseudoLocalizer.Core.Tests/POProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using System.Linq;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace PseudoLocalizer.Core.Tests
{
Expand All @@ -28,6 +29,7 @@ public void ShouldLeaveTheFileUntouchedWhenUsingAnIdentityTransformation()
processor.Transform(inputStream, outputStream);
}

Assert.That(OutputFileName, Does.Exist);
FileAssert.AreEqual(Test1FileName, OutputFileName);
}

Expand All @@ -42,6 +44,7 @@ public void ShouldReverseStringsButLeaveTheCommentsUntouchedWhenTransformingWith
processor.Transform(inputStream, outputStream);
}

Assert.That(OutputFileName, Does.Exist);
FileAssert.AreEqual("Mirror.po", OutputFileName);
}

Expand All @@ -56,6 +59,7 @@ public void ShouldAddFunnyAccentsWhenTransformingWithTheAccenterTransformation()
processor.Transform(inputStream, outputStream);
}

Assert.That(OutputFileName, Does.Exist);
FileAssert.AreEqual("Accents.po", OutputFileName);
}

Expand All @@ -72,6 +76,7 @@ public void ShouldApplyMultipleTransformations()
processor.Transform(inputStream, outputStream);
}

Assert.That(OutputFileName, Does.Exist);
FileAssert.AreEqual("Multiple.po", OutputFileName);
}

Expand All @@ -88,8 +93,8 @@ public void ShouldThrowForBadInputFile()
ex = Assert.Throws<POFileFormatException>(() => processor.Transform(inputStream, outputStream));
}

Assert.AreEqual("Entry beginning at 18,1 must not have an empty id." + Environment.NewLine, ex.Message);
Assert.AreEqual("Entry beginning at 18,1 must not have an empty id.", ex.DiagnosticMessages.First());
Assert.That(ex.Message, Is.EqualTo("Entry beginning at 18,1 must not have an empty id." + Environment.NewLine));
Assert.That(ex.DiagnosticMessages.First(), Is.EqualTo("Entry beginning at 18,1 must not have an empty id."));
}

private static void DeleteOutputFile()
Expand Down

0 comments on commit 07678d7

Please sign in to comment.