Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dutch Ordinalizer #419

Merged
merged 3 commits into from
May 27, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added unittests
  • Loading branch information
dampee committed May 25, 2015
commit a13dbb5149b78fecc2ce7c7e82df00a95be4f88f
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Humanizer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<Compile Include="Localisation\pl\NumberToWordsTests.cs" />
<Compile Include="Localisation\pl\TimeSpanHumanizeTests.cs" />
<Compile Include="Localisation\pt-BR\NumberToWordsTests.cs" />
<Compile Include="Localisation\pt-BR\OrdinalizeTests.cs" />
<Compile Include="Localisation\nl\OrdinalizeTests.cs" />
<Compile Include="Localisation\ro-Ro\TimeSpanHumanizerTests.cs" />
<Compile Include="Localisation\ru-RU\NumberToWordsTests.cs" />
<Compile Include="Localisation\ru-RU\OrdinalizeTests.cs" />
Expand Down
32 changes: 32 additions & 0 deletions src/Humanizer.Tests/Localisation/nl/OrdinalizeTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Xunit;
using Xunit.Extensions;

namespace Humanizer.Tests.Localisation.nl
{
public class OrdinalizeTests : AmbientCulture
{
public OrdinalizeTests()
: base("nl")
{
}

[Theory]
[InlineData("0", "0")]
[InlineData("1", "1e")]
[InlineData("2", "2e")]
[InlineData("3", "3e")]
[InlineData("4", "4e")]
[InlineData("5", "5e")]
[InlineData("6", "6e")]
[InlineData("23", "23e")]
[InlineData("100", "100e")]
[InlineData("101", "101e")]
[InlineData("102", "102e")]
[InlineData("103", "103e")]
[InlineData("1001", "1001e")]
public void OrdinalizeString(string number, string ordinalized)
{
Assert.Equal(number.Ordinalize(), ordinalized);
}
}
}