From c190e9da4c9946ba5748c157c5e91a79ccba745b Mon Sep 17 00:00:00 2001 From: hangy Date: Tue, 22 Nov 2016 00:29:51 +0100 Subject: [PATCH] Add initial test for issue 597. --- .../Humanizer.Tests.Shared.projitems | 1 + .../Localisation/hr/TimeSpanHumanizeTests.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs diff --git a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems index 29a58cbd2..f571b971a 100644 --- a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems +++ b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems @@ -74,6 +74,7 @@ + diff --git a/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs b/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs new file mode 100644 index 000000000..50acf20fb --- /dev/null +++ b/src/Humanizer.Tests.Shared/Localisation/hr/TimeSpanHumanizeTests.cs @@ -0,0 +1,17 @@ +using System; +using Xunit; + +namespace Humanizer.Tests.Localisation.hr +{ + [UseCulture("hr-HR")] + public class TimeSpanHumanizeTests + { + [Theory] + [InlineData(1, "1 dan")] + [InlineData(2, "2 dana")] + public void Days(int days, string expected) + { + Assert.Equal(expected, TimeSpan.FromDays(days).Humanize()); + } + } +}