-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #598 from hangy/issue597
Workaround for Croatian TimeSpan localization bug
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using Xunit; | ||
|
||
namespace Humanizer.Tests.Localisation.hr | ||
{ | ||
[UseCulture("hr-HR")] | ||
public class TimeSpanHumanizeTests | ||
{ | ||
[Theory] | ||
[InlineData(1, "1 dan")] | ||
[InlineData(2, "2 dana")] | ||
[InlineData(3, "3 dana")] | ||
[InlineData(4, "4 dana")] | ||
[InlineData(5, "5 dana")] | ||
[InlineData(7, "1 tjedan")] | ||
[InlineData(14, "2 tjedna")] | ||
public void Days(int days, string expected) | ||
{ | ||
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters