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

collapse into a single Humanizer namespace #1351

Merged
merged 1 commit into from
Feb 15, 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
4 changes: 1 addition & 3 deletions src/Humanizer.Tests.Shared/Bytes/ArithmeticTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
namespace Humanizer.Tests.Bytes
{
public class ArithmeticTests
{
Expand Down
5 changes: 1 addition & 4 deletions src/Humanizer.Tests.Shared/Bytes/ByteRateTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Humanizer.Bytes;
using Humanizer.Localisation;

namespace Humanizer.Tests.Bytes
namespace Humanizer.Tests.Bytes
{
[UseCulture("en")]
public class ByteRateTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Globalization;
using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
{
Expand Down
5 changes: 2 additions & 3 deletions src/Humanizer.Tests.Shared/Bytes/ComparingTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Humanizer.Bytes;


namespace Humanizer.Tests.Bytes
{
public class ComparingTests
Expand Down Expand Up @@ -41,4 +40,4 @@ public void SortList(IEnumerable<string> values, IEnumerable<string> expected)
Assert.Equal(expected.Select(ByteSize.Parse), list);
}
}
}
}
2 changes: 0 additions & 2 deletions src/Humanizer.Tests.Shared/Bytes/CreatingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.

using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
{
public class CreatingTests
Expand Down
1 change: 0 additions & 1 deletion src/Humanizer.Tests.Shared/Bytes/ParsingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//THE SOFTWARE.

using System.Globalization;
using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
{
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests.Shared/Bytes/ToFullWordsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.

using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
{
[UseCulture("en")]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests.Shared/Bytes/ToStringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.

using Humanizer.Bytes;

namespace Humanizer.Tests.Bytes
{
[UseCulture("en")]
Expand Down
3 changes: 0 additions & 3 deletions src/Humanizer.Tests.Shared/DateHumanize.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Globalization;
using Humanizer.Configuration;
using Humanizer.DateTimeHumanizeStrategy;
using Humanizer.Localisation;

namespace Humanizer.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Globalization;
using Humanizer.Localisation;

namespace Humanizer.Tests
{
Expand Down
3 changes: 0 additions & 3 deletions src/Humanizer.Tests.Shared/DateOnlyHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#if NET6_0_OR_GREATER

using Humanizer.Configuration;
using Humanizer.DateTimeHumanizeStrategy;

namespace Humanizer.Tests
{
[UseCulture("en-US")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests
namespace Humanizer.Tests
{
[UseCulture("en-US")]
public class DateTimeHumanizePrecisionStrategyTests
Expand Down
5 changes: 1 addition & 4 deletions src/Humanizer.Tests.Shared/DateTimeOffsetHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Humanizer.Configuration;
using Humanizer.DateTimeHumanizeStrategy;

namespace Humanizer.Tests
namespace Humanizer.Tests
{
[UseCulture("en-US")]
public class DateTimeOffsetHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Humanizer.Configuration;

namespace Humanizer.Tests
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly",
Expand Down Expand Up @@ -30,4 +28,4 @@ public void CanHumanizeMembersWithoutDescriptionAttribute()
Assert.Equal(EnumTestsResources.MemberWithoutDescriptionAttributeSentence, EnumUnderTest.MemberWithoutDescriptionAttribute.Humanize());
}
}
}
}
1 change: 0 additions & 1 deletion src/Humanizer.Tests.Shared/Localisation/ResourcesTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Globalization;
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.af
namespace Humanizer.Tests.Localisation.af
{
[UseCulture("af")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 jaar")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 maande")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.ar
{
[UseCulture("ar")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 سنة")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 أشهر")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.az
namespace Humanizer.Tests.Localisation.az
{
[UseCulture("az")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 il")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 ay")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.bg
namespace Humanizer.Tests.Localisation.bg
{
[UseCulture("bg-BG")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 години")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 месеца")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.bnBD
namespace Humanizer.Tests.Localisation.bnBD
{
[UseCulture("bn-BD")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 বছর")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 মাস")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.cs
namespace Humanizer.Tests.Localisation.cs
{
[UseCulture("cs-CZ")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 let")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 měsíců")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.da
namespace Humanizer.Tests.Localisation.da
{
[UseCulture("da-DK")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 år")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(335, "11 måneder")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Humanizer.Bytes;
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.de.Bytes
namespace Humanizer.Tests.Localisation.de.Bytes
{
[UseCulture("de-DE")]
public class ByteRateTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Bytes;

namespace Humanizer.Tests.Localisation.de.Bytes
namespace Humanizer.Tests.Localisation.de.Bytes
{
[UseCulture("de-DE")]
public class ToFullWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Bytes;

namespace Humanizer.Tests.Localisation.de.Bytes
namespace Humanizer.Tests.Localisation.de.Bytes
{
[UseCulture("de-DE")]
public class ToStringTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.de
namespace Humanizer.Tests.Localisation.de
{
[UseCulture("de-DE")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeSpanHumanizeTests
[InlineData(4018, "11 Jahre")]
public void Years(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -22,7 +22,7 @@ public void Years(int days, string expected)
[InlineData(4018, "elf Jahre")]
public void YearsToWords(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year,toWords:true));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year,toWords:true));
}

[Theory]
Expand All @@ -33,7 +33,7 @@ public void YearsToWords(int days, string expected)
[InlineData(335, "11 Monate")]
public void Months(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year));
}

[Theory]
Expand All @@ -44,7 +44,7 @@ public void Months(int days, string expected)
[InlineData(335, "elf Monate")]
public void MonthsToWords(int days, string expected)
{
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: Humanizer.Localisation.TimeUnit.Year,toWords:true));
Assert.Equal(expected, TimeSpan.FromDays(days).Humanize(maxUnit: TimeUnit.Year,toWords:true));
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.de
namespace Humanizer.Tests.Localisation.de
{
[UseCulture("de-DE")]
public class TimeUnitToSymbolTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation;

namespace Humanizer.Tests.Localisation.el
namespace Humanizer.Tests.Localisation.el
{
[UseCulture("el")]
public class DateHumanizeTests
Expand Down
Loading