-
Notifications
You must be signed in to change notification settings - Fork 965
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 #612 from brencuks/dev
Added Sweedish collection formatter
- Loading branch information
Showing
3 changed files
with
35 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
33 changes: 33 additions & 0 deletions
33
src/Humanizer.Tests.Shared/Localisation/sv/CollectionFormatterTests.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,33 @@ | ||
using System.Collections.Generic; | ||
using Xunit; | ||
|
||
namespace Humanizer.Tests.Localisation.sv | ||
{ | ||
[UseCulture("sv-SE")] | ||
public class CollectionFormatterTests | ||
{ | ||
[Fact] | ||
public void MoreThanTwoItems() | ||
{ | ||
var collection = new List<int>(new[] {1, 2, 3}); | ||
var humanized = "1, 2 och 3"; | ||
Assert.Equal(humanized, collection.Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void OneItem() | ||
{ | ||
var collection = new List<int>(new[] {1}); | ||
var humanized = "1"; | ||
Assert.Equal(humanized, collection.Humanize()); | ||
} | ||
|
||
[Fact] | ||
public void TwoItems() | ||
{ | ||
var collection = new List<int>(new[] {1, 2}); | ||
var humanized = "1 och 2"; | ||
Assert.Equal(humanized, collection.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