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

cleanup some usings #1455

Merged
merged 1 commit into from
Feb 24, 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/ArticlePrefixSortTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

public class ArticlePrefixSortTests
public class ArticlePrefixSortTests
{
[Theory]
[InlineData(new[] { "Ant", "The Theater", "The apple", "Fox", "Bear" }, new[] { "Ant", "The apple", "Bear", "Fox", "The Theater" })]
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/BitFieldEnumHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

[UseCulture("en")]
[UseCulture("en")]
public class BitFieldEnumHumanizeTests
{
[Fact]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/BitFieldEnumUnderTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.ComponentModel.DataAnnotations;

namespace Humanizer.Tests;

[Flags]
public enum BitFieldEnumUnderTest : int
{
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/Bytes/ArithmeticTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.Bytes;

public class ArithmeticTests
public class ArithmeticTests
{
[Fact]
public void Add()
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/Bytes/ByteRateTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.Bytes;

[UseCulture("en")]
[UseCulture("en")]
public class ByteRateTests
{
[Theory]
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/Bytes/ByteSizeExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.Bytes;

[UseCulture("en")]
[UseCulture("en")]
public class ByteSizeExtensionsTests
{
[Fact]
Expand Down
5 changes: 1 addition & 4 deletions src/Humanizer.Tests/Bytes/ComparingTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

namespace Humanizer.Tests.Bytes;

public class ComparingTests
public class ComparingTests
{
[Theory]
[InlineData(13, 23, -1)]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/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.

namespace Humanizer.Tests.Bytes;

public class CreatingTests
{
[Fact]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/Bytes/ParsingTests.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.

namespace Humanizer.Tests.Bytes;

[UseCulture("en")]
public class ParsingTests
{
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/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.

namespace Humanizer.Tests.Bytes;

[UseCulture("en")]
public class ToFullWordsTests
{
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/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.

namespace Humanizer.Tests.Bytes;

[UseCulture("en")]
public class ToStringTests
{
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/CasingTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

public class CasingTests
public class CasingTests
{
[Theory]
[InlineData("lower case statement", "Lower Case Statement")]
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/CollectionHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

public class SomeClass
public class SomeClass
{
public string? SomeString;
public int SomeInt;
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/DateHumanize.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

public class DateHumanize
public class DateHumanize
{
static readonly object LockObject = new();

Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/DateHumanizeDefaultStrategyTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

[UseCulture("en-US")]
[UseCulture("en-US")]
public class DateHumanizeDefaultStrategyTests
{
[Theory]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/DateOnlyHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#if NET6_0_OR_GREATER

namespace Humanizer.Tests;

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

[UseCulture("en-US")]
[UseCulture("en-US")]
public class DateTimeHumanizePrecisionStrategyTests
{
const double DefaultPrecision = .75;
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/DateTimeOffsetHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

[UseCulture("en-US")]
[UseCulture("en-US")]
public class DateTimeOffsetHumanizeTests
{
[Fact]
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/EnumHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

public class EnumHumanizeTests
public class EnumHumanizeTests
{
[Fact]
public void HonorsDescriptionAttribute() =>
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/EnumUnderTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Humanizer.Tests;

public enum EnumUnderTest
{
[Description(EnumTestsResources.MemberWithDescriptionAttribute)]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/FluentDate/InDateTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#if NET6_0_OR_GREATER

namespace Humanizer.Tests.FluentDate;

public class InDateTests
{
[Fact]
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/FluentDate/InTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.FluentDate;

public class InTests
public class InTests
{
[Fact]
public void InJanuary() =>
Expand Down
3 changes: 0 additions & 3 deletions src/Humanizer.Tests/FluentDate/OnDateTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#if NET6_0_OR_GREATER

namespace Humanizer.Tests.FluentDate;

public class OnDateTests
{
[Fact]
Expand All @@ -17,5 +15,4 @@ public void OnFebruaryThe() =>
Assert.Equal(new(DateTime.Now.Year, 2, 11), OnDate.February.The(11));
}


#endif
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/FluentDate/OnTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.FluentDate;

public class OnTests
public class OnTests
{
[Fact]
public void OnJanuaryThe23rd() =>
Expand Down
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/FluentDate/PrepositionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests.FluentDate;

public class PrepositionTests
public class PrepositionTests
{
[Fact]
public void AtMidnight()
Expand Down
4 changes: 3 additions & 1 deletion src/Humanizer.Tests/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

global using System.Globalization;
global using System.Runtime.CompilerServices;
global using System.Diagnostics;
global using System.Diagnostics;
global using Humanizer;
global using Humanizer.Tests;
4 changes: 1 addition & 3 deletions src/Humanizer.Tests/HeadingTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Humanizer.Tests;

[UseCulture("en-US")]
[UseCulture("en-US")]
public class HeadingTests
{
[InlineData(0, "N")]
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer.Tests/InflectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

using System.Collections;

namespace Humanizer.Tests;

public class InflectorTests
{
public readonly IList<object[]> PluralTestData = new List<object[]>();
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/af/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.af;
namespace af;

[UseCulture("af")]
public class DateHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/af/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.af;
namespace af;

[UseCulture("af")]
public class AfrikaansNumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.af;
namespace af;

[UseCulture("af")]
public class TimeSpanHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/ar/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.ar;
namespace ar;

[UseCulture("ar")]
public class DateHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/ar/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.ar;
namespace ar;

[UseCulture("ar")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.ar;
namespace ar;

[UseCulture("ar")]
public class TimeSpanHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/az/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.az;
namespace az;

[UseCulture("az")]
public class DateHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/az/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.az;
namespace az;

[UseCulture("az")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.az;
namespace az;

[UseCulture("az")]
public class TimeSpanHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/bg/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bg;
namespace bg;

[UseCulture("bg-BG")]
public class DateHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/bg/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bg;
namespace bg;

[UseCulture("bg")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bg;
namespace bg;

[UseCulture("bg-BG")]
public class TimeSpanHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bnBD;
namespace bnBD;

[UseCulture("bn-BD")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bnBD;
namespace bnBD;

[UseCulture("bn-BD")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.bnBD;
namespace bnBD;

[UseCulture("bn-BD")]
public class TimeSpanHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/cs/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.cs;
namespace cs;

[UseCulture("cs-CZ")]
public class DateHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/cs/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.cs;
namespace cs;

[UseCulture("cs-CZ")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.cs;
namespace cs;

[UseCulture("cs-CZ")]
public class TimeSpanHumanizeTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/da/DateHumanizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.da;
namespace da;

[UseCulture("da-DK")]
public class DateHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.da;
namespace da;

[UseCulture("da-DK")]
public class TimeSpanHumanizeTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.deCH;
namespace deCH;

[UseCulture("de-CH")]
public class NumberToWordsTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.deLI;
namespace deLI;

[UseCulture("de-LI")]
public class NumberToWordsTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/de/Bytes/ByteRateTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.de.Bytes;
namespace de.Bytes;

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

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

[UseCulture("de-DE")]
public class ToFullWordsTests
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/Localisation/de/Bytes/ToStringTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Tests.Localisation.de.Bytes;
namespace de.Bytes;

[UseCulture("de-DE")]
public class ToStringTests
Expand Down
Loading