-
Notifications
You must be signed in to change notification settings - Fork 964
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 #52 from harouny/master
Initial TimeSpan Arabic support
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
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
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,52 @@ | ||
using System; | ||
using Xunit; | ||
|
||
namespace Humanizer.Tests.Localisation.ar | ||
{ | ||
public class TimeSpanHumanizeExtensionsTests : AmbientCulture | ||
{ | ||
public TimeSpanHumanizeExtensionsTests() : base("ar") { } | ||
|
||
[Fact] | ||
public void OneWeek() | ||
{ | ||
Assert.Equal("أسبوع واحد", TimeSpan.FromDays(7).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneDay() | ||
{ | ||
Assert.Equal("يوم واحد", TimeSpan.FromDays(1).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneHour() | ||
{ | ||
Assert.Equal("ساعة واحدة", TimeSpan.FromHours(1).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneMinute() | ||
{ | ||
Assert.Equal("دقيقة واحدة", TimeSpan.FromMinutes(1).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneSecond() | ||
{ | ||
Assert.Equal("ثانية واحدة", TimeSpan.FromSeconds(1).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneMillisecond() | ||
{ | ||
Assert.Equal("جزء من الثانية", TimeSpan.FromMilliseconds(1).Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void NoTime() | ||
{ | ||
Assert.Equal("حالاً", TimeSpan.Zero.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