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

Fixed error in nb-NO resource file, added resource strings and added tests #137

Closed
wants to merge 6 commits into from
Closed
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 tests for timespans>1 in nb-NO
  • Loading branch information
henriksen committed Apr 9, 2014
commit 4d8b5dbff60bf8e1c31ca63c1c5229bb8f508653
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,47 @@ public TimeSpanHumanizeTests() : base("nb-NO") { }

[Theory]
[InlineData(7, "en uke")]
[InlineData(14, "2 uker")]
public void Weeks(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize());
}

[Theory]
[InlineData(1, "en dag")]
[InlineData(2, "2 dager")]
public void Days(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize());
}

[Theory]
[InlineData(1, "en time")]
[InlineData(2, "2 timer")]
public void Hours(int hours, string expected)
{
Assert.Equal(expected, TimeSpan.FromHours(hours).Humanize());
}

[Theory]
[InlineData(1, "ett minutt")]
[InlineData(2, "2 minutter")]
public void Minutes(int minutes, string expected)
{
Assert.Equal(expected, TimeSpan.FromMinutes(minutes).Humanize());
}

[Theory]
[InlineData(1, "ett sekund")]
[InlineData(2, "2 sekunder")]
public void Seconds(int seconds, string expected)
{
Assert.Equal(expected, TimeSpan.FromSeconds(seconds).Humanize());
}

[Theory]
[InlineData(1, "ett millisekund")]
[InlineData(2, "2 millisekunder")]
public void Milliseconds(int milliseconds, string expected)
{
Assert.Equal(expected, TimeSpan.FromMilliseconds(milliseconds).Humanize());
Expand Down