Skip to content

Commit

Permalink
remove redundant type specs (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Feb 16, 2024
1 parent 579a0f9 commit c9abf48
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
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

0 comments on commit c9abf48

Please sign in to comment.