From 0b8376fd1471827432e890ae6e4809b44ab53689 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 11 May 2024 15:39:20 +1000 Subject: [PATCH] cleanup --- docs/ApprovalTests/Reporters.md | 3 +-- docs/ApprovalTests/explanations/MainConcepts.md | 4 ++-- docs/ApprovalUtilities/readme.md | 2 +- src/ApprovalTests/AlwaysWorksReporter.cs | 2 -- src/ApprovalTests/Approvals.cs | 4 ---- src/ApprovalTests/Approvers/FileApprover.cs | 1 - .../Combinations/CombinationApprovals.cs | 1 - src/ApprovalTests/Email/EmailApprovals.cs | 1 - src/ApprovalTests/Events/EventApprovals.cs | 3 +-- .../ExceptionalExceptions/ExceptionalId.cs | 2 -- src/ApprovalTests/GlobalUsings.cs | 14 ++++++++++++++ .../Maintenance/ApprovalMaintenance.cs | 4 +--- src/ApprovalTests/Namers/ApprovalResults.cs | 2 -- src/ApprovalTests/Namers/ApprovalsFilename.cs | 4 +--- .../StackTraceParsers/AttributeStackTraceParser.cs | 1 - .../Namers/StackTraceParsers/IStackTraceParser.cs | 2 -- .../Namers/StackTraceParsers/StackTraceParser.cs | 3 --- src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs | 1 - .../UnitTestFrameworks/MSpecStackTraceParser.cs | 2 -- .../Namers/UseApprovalSubdirectoryAttribute.cs | 2 -- .../Reporters/AllFailingTestsClipboardReporter.cs | 4 +--- src/ApprovalTests/Reporters/ClipboardReporter.cs | 1 - .../ContinuousIntegration/AppVeyorReporter.cs | 2 -- .../ContinuousIntegration/BambooReporter.cs | 4 +--- .../GoContinuousDeliveryReporter.cs | 2 -- .../ContinuousIntegration/JenkinsReporter.cs | 4 +--- .../ContinuousIntegration/MyGetReporter.cs | 4 +--- .../ContinuousIntegration/NCrunchReporter.cs | 4 +--- .../ContinuousIntegration/TeamCityReporter.cs | 4 +--- .../Reporters/ContinuousIntegration/TfsReporter.cs | 5 +---- .../ContinuousIntegration/TfsVnextReporter.cs | 2 -- src/ApprovalTests/Reporters/DiffReporter.cs | 3 +-- src/ApprovalTests/Reporters/DiffToolReporter.cs | 1 - .../Reporters/ExecutableQueryFailure.cs | 1 - .../Reporters/FileLauncherReporter.cs | 3 --- .../Reporters/FileLauncherWithDelayReporter.cs | 3 +-- .../Reporters/FirstWorkingReporter.cs | 2 -- .../Reporters/FrontLoadedReporterAttribute.cs | 2 -- .../Reporters/FrontLoadedReporterDisposer.cs | 2 -- src/ApprovalTests/Reporters/InlineTextReporter.cs | 2 -- .../Reporters/IntroductionReporter.cs | 5 +---- .../Reporters/InvalidReporterConfiguration.cs | 2 -- .../Reporters/MachineSpecificReporter.cs | 4 +--- src/ApprovalTests/Reporters/MultiReporter.cs | 2 -- .../Reporters/PowershellClipboardReporter.cs | 1 - src/ApprovalTests/Reporters/QuietReporter.cs | 4 ---- .../Reporters/ReportWithoutFrontLoading.cs | 4 +--- .../Reporters/TestFrameworks/AssertReporter.cs | 4 +--- .../Reporters/TestFrameworks/MsTestReporter.cs | 5 +---- .../Reporters/TestFrameworks/NUnitReporter.cs | 2 -- .../Reporters/TestFrameworks/XUnit2Reporter.cs | 2 -- .../Reporters/UseReporterAttribute.cs | 2 -- src/ApprovalTests/Scrubber/HtmlScrubbers.cs | 4 +--- src/ApprovalTests/Scrubber/PdfScrubber.cs | 2 -- src/ApprovalTests/Scrubber/ScrubberUtils.cs | 2 -- .../TheoryTests/ThreadSafetyTheory.cs | 6 +----- src/ApprovalTests/Utilities/ParentProcessUtils.cs | 6 +----- src/ApprovalTests/Utilities/StackTraceScrubber.cs | 3 --- src/ApprovalTests/Utilities/StringReporting.cs | 4 +--- src/ApprovalTests/Utilities/TestCounter.cs | 6 +----- .../WebApi/MicrosoftHttpClient/RestQuery.cs | 2 -- src/ApprovalTests/Writers/ApprovalBinaryWriter.cs | 4 +--- src/ApprovalTests/Writers/ApprovalTextWriter.cs | 3 --- src/ApprovalTests/Writers/ExistingFileWriter.cs | 2 -- src/ApprovalTests/Writers/WriterFactory.cs | 4 +--- src/ApprovalTests/Xml/XmlApprovals.cs | 3 +-- 66 files changed, 43 insertions(+), 158 deletions(-) create mode 100644 src/ApprovalTests/GlobalUsings.cs diff --git a/docs/ApprovalTests/Reporters.md b/docs/ApprovalTests/Reporters.md index 4fa62da2..30f3cb39 100644 --- a/docs/ApprovalTests/Reporters.md +++ b/docs/ApprovalTests/Reporters.md @@ -42,7 +42,6 @@ Extend `IApprovalFailureReporter`. For example a file can be launched on failure ```cs -using System.Diagnostics; using ApprovalTests.Core; namespace ApprovalTests.Reporters; @@ -58,7 +57,7 @@ public class FileLauncherReporter : IApprovalFailureReporter } } ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/ApprovalTests/explanations/MainConcepts.md b/docs/ApprovalTests/explanations/MainConcepts.md index 9e97b4db..485bdf44 100644 --- a/docs/ApprovalTests/explanations/MainConcepts.md +++ b/docs/ApprovalTests/explanations/MainConcepts.md @@ -121,7 +121,7 @@ Eventually, all Verify methods call: ```cs public static void Verify(IApprovalWriter writer, IApprovalNamer namer, IApprovalFailureReporter reporter) ``` -snippet source | anchor +snippet source | anchor Most of the time this is hidden in an underlying a Verify call. @@ -143,7 +143,7 @@ If you simply wanted to format text this is usually done in a separate step befo ```cs public static void VerifyWithExtension(string text, string fileExtensionWithDot, Func scrubber = null) ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/ApprovalUtilities/readme.md b/docs/ApprovalUtilities/readme.md index 8318245b..4c7e85d8 100644 --- a/docs/ApprovalUtilities/readme.md +++ b/docs/ApprovalUtilities/readme.md @@ -17,7 +17,7 @@ Guards are convenient functions if incorrect values are passed in. ```cs Guard.AgainstNullAndEmpty(subdirectory, nameof(subdirectory)); ``` -snippet source | anchor +snippet source | anchor diff --git a/src/ApprovalTests/AlwaysWorksReporter.cs b/src/ApprovalTests/AlwaysWorksReporter.cs index a731fb64..9b797b2e 100644 --- a/src/ApprovalTests/AlwaysWorksReporter.cs +++ b/src/ApprovalTests/AlwaysWorksReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - class AlwaysWorksReporter : IEnvironmentAwareReporter { readonly IApprovalFailureReporter reporter; diff --git a/src/ApprovalTests/Approvals.cs b/src/ApprovalTests/Approvals.cs index 06b19f89..a3a70c89 100644 --- a/src/ApprovalTests/Approvals.cs +++ b/src/ApprovalTests/Approvals.cs @@ -1,15 +1,11 @@ using ApprovalTests.Approvers; -using ApprovalTests.Core; using ApprovalTests.Html; using ApprovalTests.Namers; using ApprovalTests.Reporters; -using ApprovalTests.Scrubber; -using ApprovalTests.Utilities; using ApprovalTests.Writers; using ApprovalTests.Xml; using ApprovalUtilities.CallStack; using ApprovalUtilities.Persistence; -using ApprovalUtilities.Utilities; namespace ApprovalTests; diff --git a/src/ApprovalTests/Approvers/FileApprover.cs b/src/ApprovalTests/Approvers/FileApprover.cs index 61825295..8766997d 100644 --- a/src/ApprovalTests/Approvers/FileApprover.cs +++ b/src/ApprovalTests/Approvers/FileApprover.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using ApprovalTests.Core.Exceptions; using EmptyFiles; diff --git a/src/ApprovalTests/Combinations/CombinationApprovals.cs b/src/ApprovalTests/Combinations/CombinationApprovals.cs index 57c237c2..533de93a 100644 --- a/src/ApprovalTests/Combinations/CombinationApprovals.cs +++ b/src/ApprovalTests/Combinations/CombinationApprovals.cs @@ -1,5 +1,4 @@ using System.Globalization; -using System.Text; namespace ApprovalTests.Combinations; diff --git a/src/ApprovalTests/Email/EmailApprovals.cs b/src/ApprovalTests/Email/EmailApprovals.cs index 2e4c0c74..b02c4d6c 100644 --- a/src/ApprovalTests/Email/EmailApprovals.cs +++ b/src/ApprovalTests/Email/EmailApprovals.cs @@ -1,5 +1,4 @@ using System.Net.Mail; -using ApprovalTests.Scrubber; using ApprovalTests.Writers; namespace ApprovalTests.Email; diff --git a/src/ApprovalTests/Events/EventApprovals.cs b/src/ApprovalTests/Events/EventApprovals.cs index f6148cb9..b8c86c7f 100644 --- a/src/ApprovalTests/Events/EventApprovals.cs +++ b/src/ApprovalTests/Events/EventApprovals.cs @@ -1,5 +1,4 @@ -using System.Text; -using ApprovalUtilities.Reflection; +using ApprovalUtilities.Reflection; namespace ApprovalTests.Events; diff --git a/src/ApprovalTests/ExceptionalExceptions/ExceptionalId.cs b/src/ApprovalTests/ExceptionalExceptions/ExceptionalId.cs index 1170a732..e0eeee1a 100644 --- a/src/ApprovalTests/ExceptionalExceptions/ExceptionalId.cs +++ b/src/ApprovalTests/ExceptionalExceptions/ExceptionalId.cs @@ -1,5 +1,3 @@ -using ApprovalUtilities.Utilities; - namespace ApprovalTests.ExceptionalExceptions; public class ExceptionalId diff --git a/src/ApprovalTests/GlobalUsings.cs b/src/ApprovalTests/GlobalUsings.cs new file mode 100644 index 00000000..7b07f0dd --- /dev/null +++ b/src/ApprovalTests/GlobalUsings.cs @@ -0,0 +1,14 @@ +// Global using directives + +global using System.Collections.Concurrent; +global using System.ComponentModel; +global using System.Diagnostics; +global using System.Reflection; +global using System.Runtime.InteropServices; +global using System.Text; +global using System.Text.RegularExpressions; +global using ApprovalTests.Core; +global using ApprovalTests.Scrubber; +global using ApprovalTests.StackTraceParsers; +global using ApprovalTests.Utilities; +global using ApprovalUtilities.Utilities; \ No newline at end of file diff --git a/src/ApprovalTests/Maintenance/ApprovalMaintenance.cs b/src/ApprovalTests/Maintenance/ApprovalMaintenance.cs index e6e9f2fc..f08bbb00 100644 --- a/src/ApprovalTests/Maintenance/ApprovalMaintenance.cs +++ b/src/ApprovalTests/Maintenance/ApprovalMaintenance.cs @@ -1,6 +1,4 @@ -using System.Reflection; -using ApprovalUtilities.CallStack; -using ApprovalUtilities.Utilities; +using ApprovalUtilities.CallStack; namespace ApprovalTests.Maintenance; diff --git a/src/ApprovalTests/Namers/ApprovalResults.cs b/src/ApprovalTests/Namers/ApprovalResults.cs index 76f9ea5b..6de904c5 100644 --- a/src/ApprovalTests/Namers/ApprovalResults.cs +++ b/src/ApprovalTests/Namers/ApprovalResults.cs @@ -1,5 +1,3 @@ -using ApprovalUtilities.Utilities; - namespace ApprovalTests.Namers; public static class ApprovalResults diff --git a/src/ApprovalTests/Namers/ApprovalsFilename.cs b/src/ApprovalTests/Namers/ApprovalsFilename.cs index 4922573e..22dfc0f0 100644 --- a/src/ApprovalTests/Namers/ApprovalsFilename.cs +++ b/src/ApprovalTests/Namers/ApprovalsFilename.cs @@ -1,6 +1,4 @@ -using ApprovalUtilities.Utilities; - -namespace ApprovalTests.Namers; +namespace ApprovalTests.Namers; public class ApprovalsFilename { diff --git a/src/ApprovalTests/Namers/StackTraceParsers/AttributeStackTraceParser.cs b/src/ApprovalTests/Namers/StackTraceParsers/AttributeStackTraceParser.cs index 0f58735a..056de282 100644 --- a/src/ApprovalTests/Namers/StackTraceParsers/AttributeStackTraceParser.cs +++ b/src/ApprovalTests/Namers/StackTraceParsers/AttributeStackTraceParser.cs @@ -1,4 +1,3 @@ -using System.Diagnostics; using ApprovalUtilities.CallStack; namespace ApprovalTests.Namers.StackTraceParsers; diff --git a/src/ApprovalTests/Namers/StackTraceParsers/IStackTraceParser.cs b/src/ApprovalTests/Namers/StackTraceParsers/IStackTraceParser.cs index 6a246af6..9a3af21b 100644 --- a/src/ApprovalTests/Namers/StackTraceParsers/IStackTraceParser.cs +++ b/src/ApprovalTests/Namers/StackTraceParsers/IStackTraceParser.cs @@ -1,5 +1,3 @@ -using System.Diagnostics; - namespace ApprovalTests.Namers.StackTraceParsers; public interface IStackTraceParser diff --git a/src/ApprovalTests/Namers/StackTraceParsers/StackTraceParser.cs b/src/ApprovalTests/Namers/StackTraceParsers/StackTraceParser.cs index 65237a15..2aa3d837 100644 --- a/src/ApprovalTests/Namers/StackTraceParsers/StackTraceParser.cs +++ b/src/ApprovalTests/Namers/StackTraceParsers/StackTraceParser.cs @@ -1,6 +1,3 @@ -using ApprovalTests.StackTraceParsers; -using ApprovalUtilities.Utilities; -using System.Diagnostics; using ApprovalTests.Namers.UnitTestFrameworks; namespace ApprovalTests.Namers.StackTraceParsers; diff --git a/src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs b/src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs index 00b31e0d..fdef1b8f 100644 --- a/src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs +++ b/src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using ApprovalTests.Namers.StackTraceParsers; namespace ApprovalTests.Namers; diff --git a/src/ApprovalTests/Namers/UnitTestFrameworks/MSpecStackTraceParser.cs b/src/ApprovalTests/Namers/UnitTestFrameworks/MSpecStackTraceParser.cs index 27e26900..ecdfc4c8 100644 --- a/src/ApprovalTests/Namers/UnitTestFrameworks/MSpecStackTraceParser.cs +++ b/src/ApprovalTests/Namers/UnitTestFrameworks/MSpecStackTraceParser.cs @@ -1,5 +1,3 @@ -using System.Diagnostics; -using System.Reflection; using ApprovalTests.Namers.StackTraceParsers; using ApprovalUtilities.CallStack; diff --git a/src/ApprovalTests/Namers/UseApprovalSubdirectoryAttribute.cs b/src/ApprovalTests/Namers/UseApprovalSubdirectoryAttribute.cs index 2efd521f..200da4fa 100644 --- a/src/ApprovalTests/Namers/UseApprovalSubdirectoryAttribute.cs +++ b/src/ApprovalTests/Namers/UseApprovalSubdirectoryAttribute.cs @@ -1,5 +1,3 @@ -using ApprovalUtilities.Utilities; - namespace ApprovalTests.Namers; public class UseApprovalSubdirectoryAttribute : Attribute diff --git a/src/ApprovalTests/Reporters/AllFailingTestsClipboardReporter.cs b/src/ApprovalTests/Reporters/AllFailingTestsClipboardReporter.cs index b31609e2..886f7323 100644 --- a/src/ApprovalTests/Reporters/AllFailingTestsClipboardReporter.cs +++ b/src/ApprovalTests/Reporters/AllFailingTestsClipboardReporter.cs @@ -1,6 +1,4 @@ -using System.Text; -using ApprovalTests.Core; -using TextCopy; +using TextCopy; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/ClipboardReporter.cs b/src/ApprovalTests/Reporters/ClipboardReporter.cs index d2f1702c..642734da 100644 --- a/src/ApprovalTests/Reporters/ClipboardReporter.cs +++ b/src/ApprovalTests/Reporters/ClipboardReporter.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using TextCopy; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/AppVeyorReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/AppVeyorReporter.cs index c8c38d90..b5c56814 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/AppVeyorReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/AppVeyorReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters.ContinuousIntegration; public class AppVeyorReporter : IEnvironmentAwareReporter diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/BambooReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/BambooReporter.cs index 1f48a866..56cd4182 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/BambooReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/BambooReporter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class BambooReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/GoContinuousDeliveryReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/GoContinuousDeliveryReporter.cs index 3aab7a69..7472ad5c 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/GoContinuousDeliveryReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/GoContinuousDeliveryReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters.ContinuousIntegration; public class GoContinuousDeliveryReporter : IEnvironmentAwareReporter diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/JenkinsReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/JenkinsReporter.cs index 00d24fa4..a670a2e2 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/JenkinsReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/JenkinsReporter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class JenkinsReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/MyGetReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/MyGetReporter.cs index 327eb4e8..36b269d7 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/MyGetReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/MyGetReporter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class MyGetReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/NCrunchReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/NCrunchReporter.cs index 84be3365..e883d00e 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/NCrunchReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/NCrunchReporter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class NCrunchReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/TeamCityReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/TeamCityReporter.cs index 342042d1..a62353c4 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/TeamCityReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/TeamCityReporter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class TeamCityReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/TfsReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/TfsReporter.cs index a188a3c2..43c73f6f 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/TfsReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/TfsReporter.cs @@ -1,7 +1,4 @@ -using ApprovalTests.Core; -using ApprovalTests.Utilities; - -namespace ApprovalTests.Reporters.ContinuousIntegration; +namespace ApprovalTests.Reporters.ContinuousIntegration; public class TfsReporter : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/ContinuousIntegration/TfsVnextReporter.cs b/src/ApprovalTests/Reporters/ContinuousIntegration/TfsVnextReporter.cs index fceeaee0..2a1960c0 100644 --- a/src/ApprovalTests/Reporters/ContinuousIntegration/TfsVnextReporter.cs +++ b/src/ApprovalTests/Reporters/ContinuousIntegration/TfsVnextReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters.ContinuousIntegration; public class TfsVnextReporter : IEnvironmentAwareReporter diff --git a/src/ApprovalTests/Reporters/DiffReporter.cs b/src/ApprovalTests/Reporters/DiffReporter.cs index 69df7147..84569f13 100644 --- a/src/ApprovalTests/Reporters/DiffReporter.cs +++ b/src/ApprovalTests/Reporters/DiffReporter.cs @@ -1,5 +1,4 @@ -using ApprovalTests.Core; -using DiffEngine; +using DiffEngine; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/DiffToolReporter.cs b/src/ApprovalTests/Reporters/DiffToolReporter.cs index 2fb4f799..85c622b3 100644 --- a/src/ApprovalTests/Reporters/DiffToolReporter.cs +++ b/src/ApprovalTests/Reporters/DiffToolReporter.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using DiffEngine; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/ExecutableQueryFailure.cs b/src/ApprovalTests/Reporters/ExecutableQueryFailure.cs index e704bf5f..d66441af 100644 --- a/src/ApprovalTests/Reporters/ExecutableQueryFailure.cs +++ b/src/ApprovalTests/Reporters/ExecutableQueryFailure.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using ApprovalUtilities.Persistence; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/FileLauncherReporter.cs b/src/ApprovalTests/Reporters/FileLauncherReporter.cs index 67b96fac..7bc2f0e0 100644 --- a/src/ApprovalTests/Reporters/FileLauncherReporter.cs +++ b/src/ApprovalTests/Reporters/FileLauncherReporter.cs @@ -1,6 +1,3 @@ -using System.Diagnostics; -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class FileLauncherReporter : IApprovalFailureReporter diff --git a/src/ApprovalTests/Reporters/FileLauncherWithDelayReporter.cs b/src/ApprovalTests/Reporters/FileLauncherWithDelayReporter.cs index 54d9236b..47f292a3 100644 --- a/src/ApprovalTests/Reporters/FileLauncherWithDelayReporter.cs +++ b/src/ApprovalTests/Reporters/FileLauncherWithDelayReporter.cs @@ -1,5 +1,4 @@ -using ApprovalTests.Core; -using ApprovalTests.Reporters; +using ApprovalTests.Reporters; public class FileLauncherWithDelayReporter(int seconds = 2) : IApprovalFailureReporter diff --git a/src/ApprovalTests/Reporters/FirstWorkingReporter.cs b/src/ApprovalTests/Reporters/FirstWorkingReporter.cs index 28c4d4cb..9cbcf145 100644 --- a/src/ApprovalTests/Reporters/FirstWorkingReporter.cs +++ b/src/ApprovalTests/Reporters/FirstWorkingReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class FirstWorkingReporter(IEnumerable reporters) : diff --git a/src/ApprovalTests/Reporters/FrontLoadedReporterAttribute.cs b/src/ApprovalTests/Reporters/FrontLoadedReporterAttribute.cs index 6c56bbfd..af9aed29 100644 --- a/src/ApprovalTests/Reporters/FrontLoadedReporterAttribute.cs +++ b/src/ApprovalTests/Reporters/FrontLoadedReporterAttribute.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; [AttributeUsage(AttributeTargets.Assembly)] diff --git a/src/ApprovalTests/Reporters/FrontLoadedReporterDisposer.cs b/src/ApprovalTests/Reporters/FrontLoadedReporterDisposer.cs index ddb54806..bf4e77d5 100644 --- a/src/ApprovalTests/Reporters/FrontLoadedReporterDisposer.cs +++ b/src/ApprovalTests/Reporters/FrontLoadedReporterDisposer.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class FrontLoadedReporterDisposer : IDisposable diff --git a/src/ApprovalTests/Reporters/InlineTextReporter.cs b/src/ApprovalTests/Reporters/InlineTextReporter.cs index 550b03f1..6aaea471 100644 --- a/src/ApprovalTests/Reporters/InlineTextReporter.cs +++ b/src/ApprovalTests/Reporters/InlineTextReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; -using ApprovalUtilities.Utilities; using TextCopy; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/IntroductionReporter.cs b/src/ApprovalTests/Reporters/IntroductionReporter.cs index 707ea20a..eb09974e 100644 --- a/src/ApprovalTests/Reporters/IntroductionReporter.cs +++ b/src/ApprovalTests/Reporters/IntroductionReporter.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters; +namespace ApprovalTests.Reporters; public class IntroductionReporter : IApprovalFailureReporter { diff --git a/src/ApprovalTests/Reporters/InvalidReporterConfiguration.cs b/src/ApprovalTests/Reporters/InvalidReporterConfiguration.cs index 25c0ee4e..a965c230 100644 --- a/src/ApprovalTests/Reporters/InvalidReporterConfiguration.cs +++ b/src/ApprovalTests/Reporters/InvalidReporterConfiguration.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class InvalidReporterConfiguration(Type reporter) : diff --git a/src/ApprovalTests/Reporters/MachineSpecificReporter.cs b/src/ApprovalTests/Reporters/MachineSpecificReporter.cs index dc90f7d4..4d6b3f62 100644 --- a/src/ApprovalTests/Reporters/MachineSpecificReporter.cs +++ b/src/ApprovalTests/Reporters/MachineSpecificReporter.cs @@ -1,6 +1,4 @@ -using System.Text; -using ApprovalTests.Core; -using ApprovalTests.Namers; +using ApprovalTests.Namers; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/MultiReporter.cs b/src/ApprovalTests/Reporters/MultiReporter.cs index 8db1e253..2b1e3574 100644 --- a/src/ApprovalTests/Reporters/MultiReporter.cs +++ b/src/ApprovalTests/Reporters/MultiReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class MultiReporter : IEnvironmentAwareReporter, IApprovalReporterWithCleanUp diff --git a/src/ApprovalTests/Reporters/PowershellClipboardReporter.cs b/src/ApprovalTests/Reporters/PowershellClipboardReporter.cs index 5a4d34ff..c3ec1189 100644 --- a/src/ApprovalTests/Reporters/PowershellClipboardReporter.cs +++ b/src/ApprovalTests/Reporters/PowershellClipboardReporter.cs @@ -1,4 +1,3 @@ -using ApprovalTests.Core; using TextCopy; namespace ApprovalTests.Reporters; diff --git a/src/ApprovalTests/Reporters/QuietReporter.cs b/src/ApprovalTests/Reporters/QuietReporter.cs index 700aa44b..40d5cb49 100644 --- a/src/ApprovalTests/Reporters/QuietReporter.cs +++ b/src/ApprovalTests/Reporters/QuietReporter.cs @@ -1,7 +1,3 @@ -using System.Diagnostics; -using System.Runtime.InteropServices; -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; public class QuietReporter : IEnvironmentAwareReporter diff --git a/src/ApprovalTests/Reporters/ReportWithoutFrontLoading.cs b/src/ApprovalTests/Reporters/ReportWithoutFrontLoading.cs index 91d9e672..ee8a4849 100644 --- a/src/ApprovalTests/Reporters/ReportWithoutFrontLoading.cs +++ b/src/ApprovalTests/Reporters/ReportWithoutFrontLoading.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Reporters; +namespace ApprovalTests.Reporters; public class ReportWithoutFrontLoading : IEnvironmentAwareReporter { diff --git a/src/ApprovalTests/Reporters/TestFrameworks/AssertReporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/AssertReporter.cs index f3e9fe16..fe3a1f5b 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/AssertReporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/AssertReporter.cs @@ -1,6 +1,4 @@ -using System.Reflection; -using ApprovalTests.Core; -using ApprovalTests.Namers.StackTraceParsers; +using ApprovalTests.Namers.StackTraceParsers; using EmptyFiles; namespace ApprovalTests.Reporters.TestFrameworks; diff --git a/src/ApprovalTests/Reporters/TestFrameworks/MsTestReporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/MsTestReporter.cs index 7e2e4980..c109c65c 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/MsTestReporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/MsTestReporter.cs @@ -1,7 +1,4 @@ -using System.Reflection; -using ApprovalTests.StackTraceParsers; - -namespace ApprovalTests.Reporters.TestFrameworks; +namespace ApprovalTests.Reporters.TestFrameworks; public class MsTestReporter() : AssertReporter( diff --git a/src/ApprovalTests/Reporters/TestFrameworks/NUnitReporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/NUnitReporter.cs index cfc4c81a..5196e656 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/NUnitReporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/NUnitReporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.StackTraceParsers; - namespace ApprovalTests.Reporters.TestFrameworks; public class NUnitReporter : AssertReporter diff --git a/src/ApprovalTests/Reporters/TestFrameworks/XUnit2Reporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/XUnit2Reporter.cs index d8dd80a6..6c6713a9 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/XUnit2Reporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/XUnit2Reporter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.StackTraceParsers; - namespace ApprovalTests.Reporters.TestFrameworks; public class XUnit2Reporter() : diff --git a/src/ApprovalTests/Reporters/UseReporterAttribute.cs b/src/ApprovalTests/Reporters/UseReporterAttribute.cs index 8a9d4c9a..9b72ab8a 100644 --- a/src/ApprovalTests/Reporters/UseReporterAttribute.cs +++ b/src/ApprovalTests/Reporters/UseReporterAttribute.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Reporters; [AttributeUsage(AttributeTargets.All)] diff --git a/src/ApprovalTests/Scrubber/HtmlScrubbers.cs b/src/ApprovalTests/Scrubber/HtmlScrubbers.cs index bd524186..233c8856 100644 --- a/src/ApprovalTests/Scrubber/HtmlScrubbers.cs +++ b/src/ApprovalTests/Scrubber/HtmlScrubbers.cs @@ -1,6 +1,4 @@ -using System.Text.RegularExpressions; - -namespace ApprovalTests.Scrubber; +namespace ApprovalTests.Scrubber; public static class HtmlScrubbers { diff --git a/src/ApprovalTests/Scrubber/PdfScrubber.cs b/src/ApprovalTests/Scrubber/PdfScrubber.cs index 1f536a61..f86d8b7b 100644 --- a/src/ApprovalTests/Scrubber/PdfScrubber.cs +++ b/src/ApprovalTests/Scrubber/PdfScrubber.cs @@ -1,5 +1,3 @@ -using System.Text; -using System.Text.RegularExpressions; // ReSharper disable RedundantEnumerableCastCall namespace ApprovalTests.Scrubber; diff --git a/src/ApprovalTests/Scrubber/ScrubberUtils.cs b/src/ApprovalTests/Scrubber/ScrubberUtils.cs index 612738d7..78d1fa00 100644 --- a/src/ApprovalTests/Scrubber/ScrubberUtils.cs +++ b/src/ApprovalTests/Scrubber/ScrubberUtils.cs @@ -1,5 +1,3 @@ -using ApprovalUtilities.Utilities; - namespace ApprovalTests.Scrubber; public static class ScrubberUtils diff --git a/src/ApprovalTests/TheoryTests/ThreadSafetyTheory.cs b/src/ApprovalTests/TheoryTests/ThreadSafetyTheory.cs index 36316f04..df08812e 100644 --- a/src/ApprovalTests/TheoryTests/ThreadSafetyTheory.cs +++ b/src/ApprovalTests/TheoryTests/ThreadSafetyTheory.cs @@ -1,8 +1,4 @@ -using System.Collections.Concurrent; -using ApprovalTests.Utilities; -using ApprovalUtilities.Utilities; - -namespace ApprovalTests.TheoryTests; +namespace ApprovalTests.TheoryTests; public static class ThreadSafetyTheory { diff --git a/src/ApprovalTests/Utilities/ParentProcessUtils.cs b/src/ApprovalTests/Utilities/ParentProcessUtils.cs index c8d50259..9710f4da 100644 --- a/src/ApprovalTests/Utilities/ParentProcessUtils.cs +++ b/src/ApprovalTests/Utilities/ParentProcessUtils.cs @@ -1,8 +1,4 @@ -using System.Diagnostics; -using System.Runtime.InteropServices; -using ApprovalUtilities.Utilities; - -namespace ApprovalTests.Utilities; +namespace ApprovalTests.Utilities; public static class ParentProcessUtils { diff --git a/src/ApprovalTests/Utilities/StackTraceScrubber.cs b/src/ApprovalTests/Utilities/StackTraceScrubber.cs index 503441d3..f5ebea4b 100644 --- a/src/ApprovalTests/Utilities/StackTraceScrubber.cs +++ b/src/ApprovalTests/Utilities/StackTraceScrubber.cs @@ -1,6 +1,3 @@ -using System.Text.RegularExpressions; -using ApprovalTests.Scrubber; - namespace ApprovalTests.Utilities; public static class StackTraceScrubber diff --git a/src/ApprovalTests/Utilities/StringReporting.cs b/src/ApprovalTests/Utilities/StringReporting.cs index 85e9e776..e7eb6999 100644 --- a/src/ApprovalTests/Utilities/StringReporting.cs +++ b/src/ApprovalTests/Utilities/StringReporting.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Utilities; +namespace ApprovalTests.Utilities; public static class StringReporting { diff --git a/src/ApprovalTests/Utilities/TestCounter.cs b/src/ApprovalTests/Utilities/TestCounter.cs index c015ef84..b53eb106 100644 --- a/src/ApprovalTests/Utilities/TestCounter.cs +++ b/src/ApprovalTests/Utilities/TestCounter.cs @@ -1,8 +1,4 @@ -using System.ComponentModel; -using System.Diagnostics; -using ApprovalUtilities.Utilities; - -namespace ApprovalTests.Utilities; +namespace ApprovalTests.Utilities; public class TestCounter { diff --git a/src/ApprovalTests/WebApi/MicrosoftHttpClient/RestQuery.cs b/src/ApprovalTests/WebApi/MicrosoftHttpClient/RestQuery.cs index 0b63afa1..6a22b29f 100644 --- a/src/ApprovalTests/WebApi/MicrosoftHttpClient/RestQuery.cs +++ b/src/ApprovalTests/WebApi/MicrosoftHttpClient/RestQuery.cs @@ -1,7 +1,5 @@ using System.Net; -using System.Text; using ApprovalUtilities.Persistence; -using ApprovalUtilities.Utilities; namespace ApprovalTests.WebApi.MicrosoftHttpClient; diff --git a/src/ApprovalTests/Writers/ApprovalBinaryWriter.cs b/src/ApprovalTests/Writers/ApprovalBinaryWriter.cs index d2819d0e..ea6c27a6 100644 --- a/src/ApprovalTests/Writers/ApprovalBinaryWriter.cs +++ b/src/ApprovalTests/Writers/ApprovalBinaryWriter.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Writers; +namespace ApprovalTests.Writers; public class ApprovalBinaryWriter : IApprovalWriter { diff --git a/src/ApprovalTests/Writers/ApprovalTextWriter.cs b/src/ApprovalTests/Writers/ApprovalTextWriter.cs index 35c72576..6c8cbc19 100644 --- a/src/ApprovalTests/Writers/ApprovalTextWriter.cs +++ b/src/ApprovalTests/Writers/ApprovalTextWriter.cs @@ -1,6 +1,3 @@ -using System.Text; -using ApprovalTests.Core; - namespace ApprovalTests; public class ApprovalTextWriter : IApprovalWriter diff --git a/src/ApprovalTests/Writers/ExistingFileWriter.cs b/src/ApprovalTests/Writers/ExistingFileWriter.cs index 0b46e326..00600889 100644 --- a/src/ApprovalTests/Writers/ExistingFileWriter.cs +++ b/src/ApprovalTests/Writers/ExistingFileWriter.cs @@ -1,5 +1,3 @@ -using ApprovalTests.Core; - namespace ApprovalTests.Writers; public class ExistingFileWriter : IApprovalWriter diff --git a/src/ApprovalTests/Writers/WriterFactory.cs b/src/ApprovalTests/Writers/WriterFactory.cs index b0ac6147..8d92091b 100644 --- a/src/ApprovalTests/Writers/WriterFactory.cs +++ b/src/ApprovalTests/Writers/WriterFactory.cs @@ -1,6 +1,4 @@ -using ApprovalTests.Core; - -namespace ApprovalTests.Writers; +namespace ApprovalTests.Writers; public static class WriterFactory { diff --git a/src/ApprovalTests/Xml/XmlApprovals.cs b/src/ApprovalTests/Xml/XmlApprovals.cs index 5ca158af..c480363d 100644 --- a/src/ApprovalTests/Xml/XmlApprovals.cs +++ b/src/ApprovalTests/Xml/XmlApprovals.cs @@ -1,5 +1,4 @@ -using ApprovalTests.Scrubber; -using ApprovalTests.Writers; +using ApprovalTests.Writers; using ApprovalUtilities.Xml; namespace ApprovalTests.Xml;