Skip to content
Prev Previous commit
Next Next commit
Remove unnecessary Throws namespace imports from test and example files
Co-authored-by: thomhurst <[email protected]>
  • Loading branch information
Copilot and thomhurst committed Aug 3, 2025
commit 01d02a64750a0a27a977b19af6678bd7463d744e
2 changes: 0 additions & 2 deletions TUnit.Assertions.Tests/AssertMultipleTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests;

[UnconditionalSuppressMessage("Usage", "TUnitAssertions0005:Assert.That(...) should not be used with a constant value")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.AssertionBuilders;
namespace TUnit.Assertions.Tests.AssertionBuilders;

public sealed class AndAssertionTests
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/AssertionBuilders/OrAssertionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.AssertionBuilders;
namespace TUnit.Assertions.Tests.AssertionBuilders;

public sealed class OrAssertionTests
{
Expand Down
3 changes: 1 addition & 2 deletions TUnit.Assertions.Tests/AssertionGroupTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Assertions.AssertionBuilders.Groups;
using TUnit.Assertions.AssertionBuilders.Groups;

namespace TUnit.Assertions.Tests;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;
namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Assertions.Delegates;

public partial class Throws
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Bugs/Tests1600.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Bugs;
namespace TUnit.Assertions.Tests.Bugs;

public class Tests1600
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Bugs/Tests1770.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Bugs;
namespace TUnit.Assertions.Tests.Bugs;

public class Tests1770
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Bugs/Tests1774.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Bugs;
namespace TUnit.Assertions.Tests.Bugs;

public class Tests1774
{
Expand Down
3 changes: 1 addition & 2 deletions TUnit.Assertions.Tests/Bugs/Tests2117.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Assertions.Enums;
using TUnit.Assertions.Enums;

namespace TUnit.Assertions.Tests.Bugs;

Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Bugs/Tests2129.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Bugs;
namespace TUnit.Assertions.Tests.Bugs;

public class Tests2129
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Bugs/Tests2145.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Bugs;
namespace TUnit.Assertions.Tests.Bugs;

public class Tests2145
{
Expand Down
3 changes: 1 addition & 2 deletions TUnit.Assertions.Tests/EnumTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Assertions.Assertions.Enums;
using TUnit.Assertions.Assertions.Enums;

namespace TUnit.Assertions.Tests;

Expand Down
2 changes: 0 additions & 2 deletions TUnit.Assertions.Tests/EnumerableTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests;

public class EnumerableTests
Expand Down
1 change: 0 additions & 1 deletion TUnit.Assertions.Tests/ExecutionTimeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using TUnit.Assertions.AssertConditions;
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Assertions.Assertions.Delegates;

namespace TUnit.Assertions.Tests;
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/FailTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests;
namespace TUnit.Assertions.Tests;

public class FailTests
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Helpers/StringDifferenceTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Helpers;
namespace TUnit.Assertions.Tests.Helpers;

public class StringDifferenceTests
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Old/DefaultAssertionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Old;
namespace TUnit.Assertions.Tests.Old;

public class DefaultAssertionTests
{
Expand Down
2 changes: 0 additions & 2 deletions TUnit.Assertions.Tests/Old/EqualsAssertionTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Old;

public class EqualsAssertionTests
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/Old/ExceptionAssertionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests.Old;
namespace TUnit.Assertions.Tests.Old;

public class ExceptionAssertionTests
{
Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/SatisfiesTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests;
namespace TUnit.Assertions.Tests;

public class SatisfiesTests
{
Expand Down
3 changes: 1 addition & 2 deletions TUnit.Assertions.Tests/SkipTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Core.Exceptions;
using TUnit.Core.Exceptions;

namespace TUnit.Assertions.Tests;

Expand Down
4 changes: 1 addition & 3 deletions TUnit.Assertions.Tests/ThrowInDelegateValueAssertionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.Assertions.Tests;
namespace TUnit.Assertions.Tests;

public class ThrowInDelegateValueAssertionTests
{
Expand Down
1 change: 0 additions & 1 deletion TUnit.Assertions/Assert.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Assertions.AssertionBuilders;
using TUnit.Assertions.Exceptions;
using TUnit.Assertions.Extensions;
Expand Down
3 changes: 1 addition & 2 deletions TUnit.TestProject/Bugs/1304/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.TestProject.Attributes;
using TUnit.TestProject.Attributes;
using Vogen;

namespace TUnit.TestProject.Bugs._1304;
Expand Down
3 changes: 1 addition & 2 deletions TUnit.TestProject/DependsOnTests2.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.TestProject.Attributes;
using TUnit.TestProject.Attributes;

namespace TUnit.TestProject;

Expand Down
2 changes: 0 additions & 2 deletions TUnit.TestProject/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using TUnit.Assertions.AssertConditions.Throws;

namespace TUnit.TestProject;

[UnconditionalSuppressMessage("Usage", "TUnitAssertions0005:Assert.That(...) should not be used with a constant value")]
Expand Down
1 change: 0 additions & 1 deletion TUnit.UnitTests/ServiceProviderInfrastructureTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using TUnit.Assertions.AssertConditions.Throws;
using TUnit.Core.Services;

namespace TUnit.UnitTests;
Expand Down