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

remove redundant type specs #1376

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public class CollectionFormatterTests
[Fact]
public void OneItem()
{
var collection = new List<int>(new int[] { 1 });
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 int[] { 1, 2 });
var collection = new List<int>(new[] { 1, 2 });
var humanized = "1 und 2";
Assert.Equal(humanized, collection.Humanize());
}

[Fact]
public void MoreThanTwoItems()
{
var collection = new List<int>(new int[] { 1, 2, 3 });
var collection = new List<int>(new[] { 1, 2, 3 });
var humanized = "1, 2 und 3";
Assert.Equal(humanized, collection.Humanize());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public class CollectionFormatterTests
[Fact]
public void OneItem()
{
var collection = new List<int>(new int[] { 1 });
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 int[] { 1, 2 });
var collection = new List<int>(new[] { 1, 2 });
var humanized = "1 e 2";
Assert.Equal(humanized, collection.Humanize());
}

[Fact]
public void MoreThanTwoItems()
{
var collection = new List<int>(new int[] { 1, 2, 3 });
var collection = new List<int>(new[] { 1, 2, 3 });
var humanized = "1, 2 e 3";
Assert.Equal(humanized, collection.Humanize());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public class CollectionFormatterTests
[Fact]
public void OneItem()
{
var collection = new List<int>(new int[] { 1 });
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 int[] { 1, 2 });
var collection = new List<int>(new[] { 1, 2 });
var humanized = "1 și 2";
Assert.Equal(humanized, collection.Humanize());
}

[Fact]
public void MoreThanTwoItems()
{
var collection = new List<int>(new int[] { 1, 2, 3 });
var collection = new List<int>(new[] { 1, 2, 3 });
var humanized = "1, 2 și 3";
Assert.Equal(humanized, collection.Humanize());
}
Expand Down
8 changes: 4 additions & 4 deletions src/Humanizer.Tests.Shared/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void ToOrdinalWords_WordFormIsIgnored(int number, string expected)
var abbrForm2 = number.ToOrdinalWords(default, WordForm.Abbreviation);

Assert.All(
new string[] { normalForm1, abbrForm1, normalForm2, abbrForm2 },
new[] { normalForm1, abbrForm1, normalForm2, abbrForm2 },
item => Assert.Equal(expected, item));
}

Expand All @@ -91,7 +91,7 @@ public void ToOrdinalWords_WordFormIsIgnoredWithSpecificCulture(int number, stri
var abbrForm2 = number.ToOrdinalWords(default, WordForm.Abbreviation, cultureInfo);

Assert.All(
new string[] { cultureSpecificNumber, normalForm1, abbrForm1, normalForm2, abbrForm2 },
new[] { cultureSpecificNumber, normalForm1, abbrForm1, normalForm2, abbrForm2 },
item => Assert.Equal(expected, item));
}

Expand Down Expand Up @@ -136,7 +136,7 @@ public void ToWords_WordFormIsIgnored(int number, string expected)
var abbrFrom3 = ((long)number).ToWords(WordForm.Abbreviation, default(GrammaticalGender));

Assert.All(
new string[] { normalForm1, abbrForm1, normalForm2, abbrForm2, normalForm3, normalForm3 },
new[] { normalForm1, abbrForm1, normalForm2, abbrForm2, normalForm3, normalForm3 },
item => Assert.Equal(expected, item));
}

Expand All @@ -158,7 +158,7 @@ public void ToWords_WordFormIsIgnoredWithSpecificCulture(int number, string cult
var abbrForm2 = ((long)number).ToWords(WordForm.Abbreviation, default(GrammaticalGender), cultureInfo);

Assert.All(
new string[] { cultureSpecificNumber, normalForm1, abbrForm1, normalForm2, abbrForm2 },
new[] { cultureSpecificNumber, normalForm1, abbrForm1, normalForm2, abbrForm2 },
item => Assert.Equal(expected, item));
}

Expand Down