-
Notifications
You must be signed in to change notification settings - Fork 943
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TimeUnitToSymbolTests that should be fulfilled
- Loading branch information
Showing
3 changed files
with
53 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
27 changes: 27 additions & 0 deletions
27
src/Humanizer.Tests.Shared/Localisation/de/TimeUnitToSymbolTests.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,27 @@ | ||
using System; | ||
|
||
using Humanizer.Localisation; | ||
|
||
using Xunit; | ||
|
||
namespace Humanizer.Tests.Localisation.de | ||
{ | ||
[UseCulture("de-DE")] | ||
public class TimeUnitToSymbolTests | ||
{ | ||
[Theory] | ||
[Trait("Translation", "Native speaker")] | ||
[InlineData(TimeUnit.Millisecond, "ms")] | ||
[InlineData(TimeUnit.Second, "s")] | ||
[InlineData(TimeUnit.Minute, "min")] | ||
[InlineData(TimeUnit.Hour, "h")] | ||
[InlineData(TimeUnit.Day, "d")] | ||
[InlineData(TimeUnit.Week, "Woche")] | ||
[InlineData(TimeUnit.Month, "M")] | ||
[InlineData(TimeUnit.Year, "a")] | ||
public void ToSymbol(TimeUnit unit, string expected) | ||
{ | ||
Assert.Equal(expected, unit.ToSymbol()); | ||
} | ||
} | ||
} |
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,24 @@ | ||
using Humanizer.Localisation; | ||
|
||
using Xunit; | ||
|
||
namespace Humanizer.Tests | ||
{ | ||
[UseCulture("en-US")] | ||
public class TimeUnitToSymbolTests | ||
{ | ||
[Theory] | ||
[InlineData(TimeUnit.Millisecond, "ms")] | ||
[InlineData(TimeUnit.Second, "s")] | ||
[InlineData(TimeUnit.Minute, "min")] | ||
[InlineData(TimeUnit.Hour, "h")] | ||
[InlineData(TimeUnit.Day, "d")] | ||
[InlineData(TimeUnit.Week, "week")] | ||
[InlineData(TimeUnit.Month, "mo")] | ||
[InlineData(TimeUnit.Year, "a")] | ||
public void ToSymbol(TimeUnit unit, string expected) | ||
{ | ||
Assert.Equal(expected, unit.ToSymbol()); | ||
} | ||
} | ||
} |