-
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.
- Loading branch information
Showing
2 changed files
with
148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Xunit; | ||
using Xunit.Extensions; | ||
|
||
namespace Humanizer.Tests.Localisation.ar | ||
{ | ||
public class NumberToWordsTests : AmbientCulture | ||
{ | ||
public NumberToWordsTests() : base("ar") { } | ||
|
||
[Theory] | ||
[InlineData("صفر", 0)] | ||
[InlineData("واحد", 1)] | ||
[InlineData("اثنان", 2)] | ||
[InlineData("اثنان و عشرون", 22)] | ||
[InlineData("أحد عشر", 11)] | ||
[InlineData("ثلاثة آلاف و خمس مئة و واحد", 3501)] | ||
[InlineData("مليون و واحد", 1000001)] | ||
public void ToWordsArabic(string expected, int number) | ||
{ | ||
Assert.Equal(expected, number.ToWords()); | ||
} | ||
} | ||
} |
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