From 168b83a31c5a70752897c5c705f47a5abe1b796e Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 2 Aug 2024 15:48:59 +0200 Subject: [PATCH 01/13] it's a mess --- .../TargetProjects/IntegrationTestApp.sln | 66 ++++++++++ .../NetCoreTestProject.MSTest.csproj | 8 +- .../packages.lock.json | 37 ++++-- .../Baseline}/BaselineProvider.cs | 2 +- .../Baseline/IBaselineProvider.cs | 10 ++ .../Exceptions/CompilationException.cs | 4 +- .../Exceptions/GeneralStrykerException.cs | 3 +- .../Exceptions/InputException.cs | 3 +- .../Exceptions/NoTestProjectsException.cs | 4 +- src/Stryker.Abstractions/IFilePattern.cs | 15 +++ src/Stryker.Abstractions/IMutator.cs | 10 ++ .../IProjectAndTests.cs | 4 +- src/Stryker.Abstractions/IReadOnlyMutant.cs | 25 ++++ .../ITimeoutValueCalculator.cs | 7 + src/Stryker.Abstractions/LinqExpression.cs | 42 ++++++ .../MutantStatus.cs | 2 +- .../Mutation.cs | 4 +- .../MutationLevel.cs | 2 +- .../Mutator.cs | 4 +- .../Options/IExclusionPattern.cs | 11 ++ .../Options/ILogOptions.cs | 9 ++ .../Options/IStrykerOptions.cs | 55 ++++++++ .../Options/IThresholds.cs | 8 ++ .../Options/OptimizationModes.cs | 2 +- .../Csharp/CsharpFileLeaf.cs | 37 ++++++ .../Csharp/CsharpFolderComposite.cs | 9 ++ .../ProjectComponents/FolderComposite.cs | 68 ++++++++++ .../Fsharp/FsharpFileLeaf.cs | 37 ++++++ .../Fsharp/FsharpFolderComposite.cs | 9 ++ .../ProjectComponents/Health.cs | 10 ++ .../ProjectComponents/IFileLeaf.cs | 19 +++ .../ProjectComponents/ProjectComponent.cs | 122 ++++++++++++++++++ .../ProjectComponentsExtensions.cs | 40 ++++++ .../ProjectComponents/Solution.cs | 42 ++++++ .../SourceProjects/SourceProjectInfo.cs | 42 ++++++ .../TestProjects/TestCase.cs | 18 +++ .../TestProjects/TestFile.cs | 37 ++++++ .../TestProjects/TestProject.cs | 67 ++++++++++ .../TestProjects/TestProjectsInfo.cs | 89 +++++++++++++ .../Reporting/IJsonMutant.cs | 17 +++ .../Reporting/IJsonReport.cs | 10 ++ .../Reporting/IJsonTest.cs | 12 ++ .../Reporting/IJsonTestFile.cs | 13 ++ .../Reporting/ILocation.cs | 7 + .../Reporting/IPosition.cs | 7 + .../Reporting}/IReporter.cs | 8 +- .../Reporting/ISourceFile.cs | 10 ++ .../Stryker.Abstractions.csproj | 16 +++ .../TestRunners}/ITestGuids.cs | 2 +- .../TestRunners/ITestRunner.cs | 6 +- src/Stryker.Abstractions/packages.lock.json | 76 +++++++++++ .../CommandLineConfigReaderTests.cs | 2 +- .../ConfigBuilderTests.cs | 6 +- .../FileConfigReaderTests.cs | 8 +- .../Logging/InputBuilderTests.cs | 4 +- .../StrykerCLIInitCommandTests.cs | 4 +- .../Stryker.CLI.UnitTest/StrykerCLITests.cs | 13 +- .../Stryker.CLI.UnitTest/packages.lock.json | 25 +++- .../Stryker.CLI/CommandLineConfig/CliInput.cs | 2 +- .../CommandLineConfigReader.cs | 6 +- src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs | 4 +- .../Stryker.CLI/FileConfigReader.cs | 4 +- .../Stryker.CLI/FileConfigWriter.cs | 2 +- .../Stryker.CLI/Logging/LoggingInitializer.cs | 4 +- src/Stryker.CLI/Stryker.CLI/Program.cs | 4 +- src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs | 4 +- .../Stryker.CLI/packages.lock.json | 25 +++- .../Stryker.Core.UnitTest/AssertExtensions.cs | 2 +- .../AzureFileShareBaselineProviderTests.cs | 12 +- .../DashboardBaselineProviderTests.cs | 14 +- .../Providers/DiskBaselineProviderTests.cs | 12 +- .../Utils/BaselineMutantHelperTests.cs | 8 +- .../Clients/DashboardClientsTest.cs | 22 ++-- .../Compiling/CSharpCompilingProcessTests.cs | 22 ++-- .../Compiling/CSharpRollbackProcessTests.cs | 20 +-- .../DashboardCompare/GitInfoProviderTests.cs | 8 +- .../DiffProviders/GitDiffProviderTests.cs | 10 +- .../ExclusionPatternTests.cs | 2 +- .../Stryker.Core.UnitTest/FilePatternTests.cs | 2 +- .../Fsharp/FsharpFileDetectionTests.cs | 6 +- .../Helpers/RangeHelperTests.cs | 4 +- .../Helpers/TextSpanHelperTests.cs | 4 +- .../IgnoreIfAttribute.cs | 2 +- .../Initialisation/BuildAnalyzerTestsBase.cs | 6 +- .../AnalyzerResultExtensionsTests.cs | 4 +- .../InitialBuildProcessTests.cs | 8 +- .../Initialisation/InitialTestProcessTests.cs | 12 +- .../InitialisationProcessTests.cs | 20 +-- .../Initialisation/InputFileResolverTests.cs | 14 +- .../NugetRestoreProcessTests.cs | 8 +- .../Initialisation/ProjectMutatorTests.cs | 18 +-- .../ProjectOrchestratorTests.cs | 22 ++-- .../TimeoutValueCalculatorTests.cs | 4 +- .../InjectedHelpers/InjectedHelperTests.cs | 4 +- .../LoggerMockExtensions.cs | 2 +- .../Stryker.Core.UnitTest/MockExtensions.cs | 4 +- .../BaselineMutantFilterTests.cs | 24 ++-- .../ExcludeFromCodeCoverageFilterTests.cs | 8 +- .../ExcludeLinqExpressionFilterTests.cs | 14 +- .../ExcludeMutationMutantFilterTests.cs | 10 +- .../FilePatternMutantFilterTests.cs | 10 +- .../IgnoreBlockMutantFilterTests.cs | 8 +- .../IgnoredMethodMutantFilterTests.cs | 10 +- .../MutantFilters/MutantFilterFactoryTests.cs | 18 +-- .../MutantFilters/SinceMutantFilterTests.cs | 12 +- .../Mutants/CsharpMutantOrchestratorTests.cs | 8 +- .../Mutants/MutantOrchestratorTestsBase.cs | 10 +- .../Mutants/MutantPlacerTests.cs | 12 +- .../Mutants/MutantTests.cs | 4 +- .../CSharpMutationTestProcessTests.cs | 16 +-- .../MutationTest/FullRunScenario.cs | 12 +- .../MutationTest/MutationTestExecutorTests.cs | 12 +- .../MutationTest/MutationTestProcessTests.cs | 22 ++-- .../Mutators/AbstractMutatorTests.cs | 8 +- .../Mutators/ArrayCreationMutatorTests.cs | 4 +- .../AssignmentStatementMutatorTests.cs | 4 +- .../Mutators/BinaryExpressionMutatorTests.cs | 4 +- .../Mutators/BlockMutatorTests.cs | 6 +- .../Mutators/BooleanMutatorTests.cs | 4 +- .../Mutators/CheckedMutatorTests.cs | 4 +- .../ConditionalExpressionMutatorTests.cs | 6 +- .../Mutators/InitializerMutatorTests.cs | 4 +- .../InterpolatedStringMutatorTests.cs | 4 +- .../IsPatternExpressionMutatorTests.cs | 4 +- .../Mutators/LinqMutatorTest.cs | 5 +- .../Mutators/MathMutatorTest.cs | 4 +- .../Mutators/NegateConditionMutatorTests.cs | 4 +- .../NullCoalescingExpressionMutatorTests.cs | 4 +- .../Mutators/ObjectCreationMutatorTests.cs | 4 +- .../Mutators/PostfixUnaryMutatorTests.cs | 4 +- .../Mutators/PrefixUnaryMutatorTests.cs | 4 +- .../Mutators/RegexMutatorTest.cs | 4 +- .../Mutators/StatementMutatorTests.cs | 4 +- .../Mutators/StringEmptyMutatorTests.cs | 6 +- .../Mutators/StringMethodMutatorTests.cs | 4 +- .../Mutators/StringMutatorTests.cs | 4 +- .../Mutators/SwitchExpressionMutatorTests.cs | 4 +- .../Mutators/TestMutator.cs | 4 +- .../Inputs/AdditionalTimeoutMsInputTests.cs | 6 +- .../Inputs/AzureFileStorageSasInputTests.cs | 8 +- .../Inputs/AzureFileStorageUrlInputTests.cs | 8 +- .../Options/Inputs/BasePathInputTests.cs | 6 +- .../Inputs/BaselineProviderInputTests.cs | 10 +- .../BreakOnInitialTestFailureInputTests.cs | 4 +- .../Options/Inputs/ConcurrencyInputTests.cs | 6 +- .../Options/Inputs/ConfigurationInputTests.cs | 6 +- .../Inputs/DashboardApiKeyInputTests.cs | 10 +- .../Options/Inputs/DashboardUrlInputTests.cs | 6 +- .../Options/Inputs/DevModeInputTests.cs | 4 +- .../Inputs/DiffIgnoreChangesInputTests.cs | 4 +- .../Options/Inputs/DisableBailInputTests.cs | 6 +- .../Inputs/DisableMixMutantsInputTests.cs | 6 +- .../Inputs/FallbackVersionInputTests.cs | 4 +- .../Options/Inputs/IgnoreMethodsInputTests.cs | 4 +- .../Inputs/IgnoreMutationsInputTests.cs | 11 +- .../Inputs/LanguageVersionInputTests.cs | 6 +- .../Options/Inputs/LogToFileInputTests.cs | 6 +- .../Options/Inputs/ModuleNameInputTests.cs | 6 +- .../Options/Inputs/MsBuildPathInputTests.cs | 6 +- .../Options/Inputs/MutateInputTests.cs | 4 +- .../Options/Inputs/MutationLevelInputTests.cs | 8 +- .../Inputs/OpenReportEnabledInputTests.cs | 4 +- .../Options/Inputs/OpenReportInputTests.cs | 6 +- .../Inputs/OptimizationModeInputTests.cs | 8 +- .../Options/Inputs/OutputPathInputTests.cs | 6 +- .../Options/Inputs/ProjectNameInputTests.cs | 4 +- .../Inputs/ProjectVersionInputTests.cs | 8 +- .../Inputs/ReportFileNameInputTests.cs | 6 +- .../Options/Inputs/ReportOpenerTests.cs | 6 +- .../Options/Inputs/ReportersInputTests.cs | 8 +- .../Options/Inputs/SinceInputTests.cs | 6 +- .../Options/Inputs/SinceTargetInputTests.cs | 6 +- .../Options/Inputs/SolutionInputTests.cs | 6 +- .../Inputs/SourceProjectNameInputTests.cs | 6 +- .../Inputs/TargetFrameworkInputTests.cs | 6 +- .../Inputs/TestCaseFilterInputTests.cs | 4 +- .../Options/Inputs/TestProjectsInputTests.cs | 4 +- .../Inputs/ThresholdBreakInputTests.cs | 6 +- .../Options/Inputs/ThresholdHighInputTests.cs | 6 +- .../Options/Inputs/ThresholdLowInputTests.cs | 6 +- .../Options/Inputs/VerbosityInputTests.cs | 6 +- .../Options/Inputs/WithBaselineInputTests.cs | 4 +- .../Options/StrykerInputsTests.cs | 10 +- .../CsharpProjectComponentTests.cs | 8 +- .../SourceProjects/SourceProjectInfoTests.cs | 6 +- .../TestProjects/TestCaseTests.cs | 4 +- .../TestProjects/TestFileTests.cs | 4 +- .../TestProjects/TestProjectTests.cs | 4 +- .../TestProjects/TestProjectsInfoTests.cs | 6 +- .../Reporters/BaselineReporterTests.cs | 14 +- .../Reporters/BroadcastReporterTests.cs | 11 +- .../Reporters/ClearTextReporterTests.cs | 18 +-- .../Reporters/ClearTextTreeReporterTests.cs | 14 +- .../Reporters/ConsoleDotReporterTests.cs | 6 +- .../Reporters/DashboardReporterTests.cs | 18 +-- .../Reporters/Html/HtmlReporterTests.cs | 16 +-- .../Html/RealTime/Events/SseEventTest.cs | 4 +- .../Html/RealTime/Events/SseEventTypeTest.cs | 4 +- .../RealTime/RealTimeMutantHandlerTest.cs | 10 +- .../Reporters/Html/RealTime/SseServerTest.cs | 6 +- .../Reporters/Json/JsonReporterTests.cs | 14 +- .../Reporters/Json/MockJsonReport.cs | 6 +- .../Json/MockJsonReportFileComponent.cs | 4 +- .../Reporters/MarkdownSummaryReporterTests.cs | 8 +- .../Progress/ProgressBarReporterTests.cs | 6 +- .../Progress/ProgressReporterTests.cs | 6 +- .../Reporters/ReportTestHelper.cs | 8 +- .../Reporters/ReporterFactoryTests.cs | 14 +- .../Reporters/StatusReporterTests.cs | 10 +- .../Stryker.Core.UnitTest/StringExtensions.cs | 2 +- .../StrykerRunResultTests.cs | 4 +- .../StrykerRunnerTests.cs | 25 ++-- .../Stryker.Core.UnitTest/TestBase.cs | 4 +- .../Stryker.Core.UnitTest/TestHelper.cs | 2 +- .../TestRunners/CoverageCaptureTests.cs | 2 +- .../TestRunners/CoverageCollectorTests.cs | 2 +- .../TestRunners/VsTestMockingHelper.cs | 22 ++-- .../TestRunners/VsTestRunnerPoolTests.cs | 16 +-- .../VsTextContextInformationTests.cs | 12 +- .../ToolHelpers/BuildalyzerHelperTests.cs | 4 +- .../Stryker.Core.UnitTest/packages.lock.json | 25 +++- .../Attributes/MutatorDescriptionAttribute.cs | 2 +- .../AzureFileShareBaselineProvider.cs | 8 +- .../Providers/BaselineProviderFactory.cs | 5 +- .../Providers/DashboardBaselineProvider.cs | 8 +- .../Providers/DiskBaselineProvider.cs | 8 +- .../Baseline/Providers/GitInfoProvider.cs | 6 +- .../Baseline/Providers/IBaselineProvider.cs | 11 -- .../Baseline/Providers/IGitInfoProvider.cs | 2 +- .../Baseline/Utils/BaselineMutantHelper.cs | 6 +- .../Baseline/Utils/IBaselineMutantHelper.cs | 6 +- .../Stryker.Core/Clients/DashboardClient.cs | 10 +- .../Compiling/CSharpRollbackProcess.cs | 10 +- .../Compiling/CSharpRollbackProcessResult.cs | 2 +- .../Compiling/CompilingProcessResult.cs | 2 +- .../Compiling/CsharpCompilingProcess.cs | 16 +-- .../Compiling/FsharpCompilingProcess.cs | 12 +- .../CoverageAnalysis/CoverageAnalyser.cs | 12 +- .../CoverageAnalysis/ICoverageAnalyser.cs | 8 +- .../Stryker.Core/DiffProviders/DiffResult.cs | 2 +- .../DiffProviders/GitDiffProvider.cs | 10 +- .../DiffProviders/IDiffProvider.cs | 4 +- src/Stryker.Core/Stryker.Core/ExitCodes.cs | 2 +- src/Stryker.Core/Stryker.Core/FilePattern.cs | 8 +- .../Stryker.Core/Helpers/ITypeHandler.cs | 2 +- .../Stryker.Core/Helpers/RangeHelper.cs | 2 +- .../Stryker.Core/Helpers/RoslynHelper.cs | 4 +- .../Stryker.Core/Helpers/TextSpanHelper.cs | 2 +- .../Stryker.Core/Helpers/TypeBasedStrategy.cs | 2 +- .../IAnalyzerResultCSharpExtensions.cs | 4 +- .../Buildalyzer/IAnalyzerResultExtensions.cs | 4 +- .../CrossPlatformAssemblyResolver.cs | 2 +- .../CsharpProjectComponentsBuilder.cs | 12 +- .../EmbeddedResourcesGenerator.cs | 2 +- .../Initialisation/FolderCompositeCache.cs | 2 +- .../FsharpProjectComponentsBuilder.cs | 10 +- .../Initialisation/InitialBuildProcess.cs | 10 +- .../Initialisation/InitialTestProcess.cs | 10 +- .../Initialisation/InitialTestRun.cs | 5 +- .../Initialisation/InitialisationProcess.cs | 18 +-- .../Initialisation/InputFileResolver.cs | 18 +-- .../Stryker.Core/Initialisation/Language.cs | 2 +- .../Initialisation/NugetRestoreProcess.cs | 10 +- .../ProjectComponentsBuilder.cs | 6 +- .../Initialisation/ProjectMutator.cs | 12 +- .../Initialisation/ProjectOrchestrator.cs | 23 ++-- .../Initialisation/TimeoutValueCalculator.cs | 8 +- .../InjectedHelpers/CodeInjection.cs | 2 +- .../Instrumentation/BaseEngine.cs | 4 +- .../ConditionalInstrumentationEngine.cs | 2 +- .../DefaultInitializationEngine.cs | 4 +- .../Instrumentation/EndingReturnEngine.cs | 4 +- .../Instrumentation/IInstrumentCode.cs | 2 +- .../IfInstrumentationEngine.cs | 2 +- .../StaticInitializerMarkerEngine.cs | 4 +- .../StaticInstrumentationEngine.cs | 4 +- .../Logging/ApplicationLogging.cs | 2 +- .../MutantFilters/BaselineMutantFilter.cs | 25 ++-- .../MutantFilters/BroadcastMutantFilter.cs | 8 +- .../ExcludeFromCodeCoverageFilter.cs | 8 +- .../ExcludeLinqExpressionFilter.cs | 10 +- .../ExcludeMutationMutantFilter.cs | 8 +- .../MutantFilters/FilePatternMutantFilter.cs | 8 +- .../GeneratedCodeFilterExtension.cs | 2 +- .../MutantFilters/IMutantFilter.cs | 8 +- .../MutantFilters/IgnoreBlockMutantFilter.cs | 10 +- .../IgnoredMethodMutantFilter.cs | 8 +- .../MutantFilters/MutantFilter.cs | 2 +- .../MutantFilters/MutantFilterFactory.cs | 11 +- .../MutantFilters/SinceMutantFilter.cs | 12 +- .../Mutants/BaseMutantOrchestrator.cs | 4 +- .../Mutants/CsharpMutantOrchestrator.cs | 12 +- .../AccessorSyntaxOrchestrator.cs | 4 +- ...AnonymousFunctionExpressionOrchestrator.cs | 2 +- .../BaseFunctionOrchestrator.cs | 6 +- .../BaseMethodDeclarationOrchestrator.cs | 4 +- .../BlockOrchestrator.cs | 2 +- .../CsharpNodeOrchestrators/CommentParser.cs | 6 +- .../ConditionalExpressionOrchestrator.cs | 2 +- .../DoNotMutateOrchestrator.cs | 2 +- .../ExpressionBodiedPropertyOrchestrator.cs | 4 +- .../ExpressionSpecificOrchestrator.cs | 4 +- .../INodeOrchestrator.cs | 4 +- .../InvocationExpressionOrchestrator.cs | 4 +- .../LocalDeclarationOrchestrator.cs | 2 +- .../LocalFunctionStatementOrchestrator.cs | 4 +- .../MemberAccessExpressionOrchestrator.cs | 2 +- .../MemberDefinitionOrchestrator.cs | 2 +- .../MutateAtStatementLevelOrchestrator.cs | 2 +- .../NodeSpecificOrchestrator.cs | 2 +- .../StatementSpecificOrchestrator.cs | 2 +- .../StaticConstructorOrchestrator.cs | 4 +- .../StaticFieldDeclarationOrchestrator.cs | 4 +- .../SyntaxNodeOrchestrator.cs | 2 +- .../Mutants/FsharpMutantOrchestrator.cs | 10 +- .../DefaultOrchestrator.cs | 2 +- .../FsharpOrchestrators/IFsharpTypehandle.cs | 2 +- .../IfThenElseOrchestrator.cs | 2 +- .../LetOrUseOrchestrator.cs | 2 +- .../FsharpOrchestrators/LetOrchestrator.cs | 2 +- .../FsharpOrchestrators/MatchOrchestrator.cs | 2 +- .../NestedModuleOrchestrator.cs | 2 +- .../FsharpOrchestrators/OrchestratorFinder.cs | 2 +- .../Stryker.Core/Mutants/IMutant.cs | 20 +++ .../Stryker.Core/Mutants/Mutant.cs | 22 +--- .../Stryker.Core/Mutants/MutantInfo.cs | 2 +- .../Stryker.Core/Mutants/MutantPlacer.cs | 6 +- .../Stryker.Core/Mutants/MutationContext.cs | 6 +- .../Stryker.Core/Mutants/MutationStore.cs | 6 +- .../Stryker.Core/Mutants/TestDescription.cs | 2 +- .../Stryker.Core/Mutants/TestGuidsList.cs | 3 +- .../Stryker.Core/Mutants/TestSet.cs | 2 +- .../Mutants/WrappedGuidsEnumeration.cs | 3 +- .../MutationTest/CsharpMutationProcess.cs | 20 +-- .../MutationTest/FsharpMutationProcess.cs | 12 +- .../MutationTest/IMutationProcess.cs | 2 +- .../MutationTest/MutationTestExecutor.cs | 10 +- .../MutationTest/MutationTestInput.cs | 10 +- .../MutationTest/MutationTestProcess.cs | 23 ++-- .../Mutators/ArrayCreationMutator.cs | 4 +- .../Mutators/AssignmentStatementMutator.cs | 6 +- .../Mutators/BinaryExpressionMutator.cs | 6 +- .../Stryker.Core/Mutators/BlockMutator.cs | 6 +- .../Stryker.Core/Mutators/BooleanMutator.cs | 4 +- .../Stryker.Core/Mutators/CheckedMutator.cs | 4 +- .../Mutators/ConditionalExpressionMutator.cs | 4 +- .../Stryker.Core/Mutators/IMutator.cs | 11 -- .../Mutators/InitializerMutator.cs | 4 +- .../Mutators/InterpolatedStringMutator.cs | 4 +- .../Mutators/IsPatternExpressionMutator.cs | 4 +- .../Stryker.Core/Mutators/LinqMutator.cs | 48 +------ .../Stryker.Core/Mutators/MathMutator.cs | 4 +- .../Stryker.Core/Mutators/MutatorBase.cs | 12 +- .../Mutators/NegateConditionMutator.cs | 4 +- .../NullCoalescingExpressionMutator.cs | 4 +- .../Mutators/ObjectCreationMutator.cs | 4 +- .../Mutators/PatternMutatorBase.cs | 4 +- .../Mutators/PostfixUnaryMutator.cs | 4 +- .../Mutators/PrefixUnaryMutator.cs | 4 +- .../Stryker.Core/Mutators/RegexMutator.cs | 6 +- .../Stryker.Core/Mutators/StatementMutator.cs | 4 +- .../Mutators/StringEmptyMutator.cs | 4 +- .../Mutators/StringMethodMutator.cs | 4 +- .../Stryker.Core/Mutators/StringMutator.cs | 4 +- .../Mutators/SwitchExpressionMutator.cs | 4 +- .../Csharp/CsharpFileLeaf.cs | 4 +- .../Csharp/CsharpFolderComposite.cs | 2 +- .../ProjectComponents/FolderComposite.cs | 4 +- .../Fsharp/FsharpFileLeaf.cs | 4 +- .../Fsharp/FsharpFolderComposite.cs | 2 +- .../Stryker.Core/ProjectComponents/Health.cs | 2 +- .../ProjectComponents/IFileLeaf.cs | 2 +- .../ProjectComponents/ProjectComponent.cs | 9 +- .../ProjectComponentsExtensions.cs | 4 +- .../ProjectComponents/Solution.cs | 4 +- .../SourceProjects/SourceProjectInfo.cs | 10 +- .../TestProjects/TestCase.cs | 2 +- .../TestProjects/TestFile.cs | 2 +- .../TestProjects/TestProject.cs | 6 +- .../TestProjects/TestProjectsInfo.cs | 6 +- .../Reporters/BaselineReporter.cs | 15 ++- .../Reporters/BroadcastReporter.cs | 9 +- .../Reporters/ClearTextReporter.cs | 19 +-- .../Reporters/ClearTextTreeReporter.cs | 11 +- .../Reporters/ConsoleDotProgressReporter.cs | 9 +- .../Reporters/DashboardReporter.cs | 23 ++-- .../Reporters/FilteredMutantsLogger.cs | 8 +- .../Reporters/Html/HtmlReporter.cs | 21 +-- .../Html/RealTime/Events/SseEvent.cs | 2 +- .../Html/RealTime/Events/SseEventType.cs | 2 +- .../Html/RealTime/IRealTimeMutantHandler.cs | 4 +- .../Reporters/Html/RealTime/ISseServer.cs | 4 +- .../Html/RealTime/RealTimeMutantHandler.cs | 10 +- .../Reporters/Html/RealTime/SseServer.cs | 4 +- .../Stryker.Core/Reporters/Json/JsonReport.cs | 27 ++-- .../Reporters/Json/JsonReportSerialization.cs | 2 +- .../Reporters/Json/JsonReporter.cs | 11 +- .../Stryker.Core/Reporters/Json/Location.cs | 9 +- .../Stryker.Core/Reporters/Json/Position.cs | 5 +- .../Reporters/Json/SourceFiles/JsonMutant.cs | 8 +- .../Reporters/Json/SourceFiles/SourceFile.cs | 14 +- .../Reporters/Json/TestFiles/JsonTest.cs | 40 ++++++ .../Reporters/Json/TestFiles/JsonTestFile.cs | 12 +- .../Reporters/Json/TestFiles/Test.cs | 35 ----- .../Reporters/MarkdownSummaryReporter.cs | 11 +- .../Reporters/Progress/ProgressBar.cs | 2 +- .../Reporters/Progress/ProgressBarReporter.cs | 4 +- .../Reporters/Progress/ProgressReporter.cs | 9 +- .../Reporters/Progress/StopWatchProvider.cs | 2 +- .../Stryker.Core/Reporters/Reporter.cs | 2 +- .../Stryker.Core/Reporters/ReporterFactory.cs | 13 +- .../CrossPlatformBrowserOpener.cs | 4 +- .../WebBrowserOpener/IWebbrowserOpener.cs | 2 +- .../Stryker.Core/Stryker.Core.csproj | 2 + .../Stryker.Core/StrykerRunResult.cs | 4 +- .../Stryker.Core/StrykerRunner.cs | 21 +-- .../TestRunners/CoverageRunResult.cs | 2 +- .../TestRunners/TestFrameworks.cs | 2 +- .../Stryker.Core/TestRunners/TestRunResult.cs | 6 +- .../VsTest/DiscoveryEventHandler.cs | 2 +- .../TestRunners/VsTest/RunEventHandler.cs | 2 +- .../VsTest/StrykerVstestHostLauncher.cs | 4 +- .../TestRunners/VsTest/TestRun.cs | 2 +- .../VsTest/VsTestContextInformation.cs | 12 +- .../TestRunners/VsTest/VsTestDescription.cs | 4 +- .../TestRunners/VsTest/VsTestRunner.cs | 16 +-- .../TestRunners/VsTest/VsTestRunnerPool.cs | 12 +- .../Stryker.Core/Testing/Buildalyzer.cs | 2 +- .../Stryker.Core/Testing/ProcessExecutor.cs | 2 +- .../Stryker.Core/Testing/ProcessExtensions.cs | 2 +- .../Stryker.Core/Testing/ProcessResult.cs | 2 +- .../Stryker.Core/ToolHelpers/MsBuildHelper.cs | 6 +- .../Stryker.Core/ToolHelpers/VsTestHelper.cs | 4 +- .../Stryker.Core/packages.lock.json | 19 +++ .../ExclusionPattern.cs | 4 +- .../FilePathUtils.cs | 4 +- .../Options/BooleanValidationExtensions.cs | 4 +- .../Options/InputDefinition.cs | 5 +- .../Options/Inputs/AdditionalTimeoutInput.cs | 4 +- .../Inputs/AzureFileStorageSasInput.cs | 6 +- .../Inputs/AzureFileStorageUrlInput.cs | 6 +- .../Options/Inputs/BasePathInput.cs | 4 +- .../Options/Inputs/BaselineProviderInput.cs | 8 +- .../Inputs/BreakOnInitialTestFailureInput.cs | 2 +- .../Options/Inputs/ConcurrencyInput.cs | 6 +- .../Options/Inputs/ConfigurationInput.cs | 4 +- .../Options/Inputs/CoverageAnalysisInput.cs | 5 +- .../Options/Inputs/DashboardApiKeyInput.cs | 8 +- .../Options/Inputs/DashboardUrlInput.cs | 4 +- .../Options/Inputs/DevModeInput.cs | 2 +- .../Options/Inputs/DiffIgnoreChangesInput.cs | 2 +- .../Options/Inputs/DisableBailInput.cs | 4 +- .../Options/Inputs/DisableMixMutantsInput.cs | 4 +- .../Options/Inputs/FallbackVersionInput.cs | 4 +- .../Options/Inputs/IgnoreMethodsInput.cs | 2 +- .../Options/Inputs/IgnoreMutationsInput.cs | 6 +- .../Options/Inputs/LanguageVersionInput.cs | 4 +- .../Options/Inputs/LogToFileInput.cs | 4 +- .../Options/Inputs/ModuleNameInput.cs | 4 +- .../Options/Inputs/MsBuildPathInput.cs | 4 +- .../Options/Inputs/MutateInput.cs | 2 +- .../Options/Inputs/MutationLevelInput.cs | 6 +- .../Options/Inputs/OpenReportEnabledInput.cs | 2 +- .../Options/Inputs/OpenReportInput.cs | 4 +- .../Options/Inputs/OutputPathInput.cs | 4 +- .../Options/Inputs/ProjectNameInput.cs | 2 +- .../Options/Inputs/ProjectVersionInput.cs | 6 +- .../Options/Inputs/ReportFileNameInput.cs | 4 +- .../Options/Inputs/ReportersInput.cs | 6 +- .../Options/Inputs/SinceInput.cs | 4 +- .../Options/Inputs/SinceTargetInput.cs | 4 +- .../Options/Inputs/SolutionInput.cs | 4 +- .../Options/Inputs/SourceProjectNameInput.cs | 4 +- .../Options/Inputs/TargetFrameworkInput.cs | 4 +- .../Options/Inputs/TestCaseFilterInput.cs | 2 +- .../Options/Inputs/TestProjectsInput.cs | 2 +- .../Options/Inputs/ThresholdBreakInput.cs | 4 +- .../Options/Inputs/ThresholdHighInput.cs | 4 +- .../Options/Inputs/ThresholdLowInput.cs | 4 +- .../Options/Inputs/VerbosityInput.cs | 4 +- .../Options/Inputs/WithBaselineInput.cs | 2 +- .../Options/LogOptions.cs | 4 +- .../Options/StrykerInputs.cs | 7 +- .../Options/StrykerOptions.cs | 33 +++-- .../Options/Thresholds.cs | 6 +- .../Stryker.Configuration.csproj | 20 +++ src/Stryker.Options/packages.lock.json | 85 ++++++++++++ src/Stryker.sln | 12 ++ 488 files changed, 2794 insertions(+), 1528 deletions(-) create mode 100644 integrationtest/TargetProjects/IntegrationTestApp.sln rename src/{Stryker.Core/Stryker.Core/Baseline/Providers => Stryker.Abstractions/Baseline}/BaselineProvider.cs (71%) create mode 100644 src/Stryker.Abstractions/Baseline/IBaselineProvider.cs rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/Exceptions/CompilationException.cs (87%) rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/Exceptions/GeneralStrykerException.cs (95%) rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/Exceptions/InputException.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/Exceptions/NoTestProjectsException.cs (84%) create mode 100644 src/Stryker.Abstractions/IFilePattern.cs create mode 100644 src/Stryker.Abstractions/IMutator.cs rename src/{Stryker.Core/Stryker.Core/Initialisation => Stryker.Abstractions}/IProjectAndTests.cs (65%) create mode 100644 src/Stryker.Abstractions/IReadOnlyMutant.cs create mode 100644 src/Stryker.Abstractions/ITimeoutValueCalculator.cs create mode 100644 src/Stryker.Abstractions/LinqExpression.cs rename src/{Stryker.Core/Stryker.Core/Mutants => Stryker.Abstractions}/MutantStatus.cs (79%) rename src/{Stryker.Core/Stryker.Core/Mutants => Stryker.Abstractions}/Mutation.cs (84%) rename src/{Stryker.Core/Stryker.Core/Mutators => Stryker.Abstractions}/MutationLevel.cs (71%) rename src/{Stryker.Core/Stryker.Core/Mutators => Stryker.Abstractions}/Mutator.cs (96%) create mode 100644 src/Stryker.Abstractions/Options/IExclusionPattern.cs create mode 100644 src/Stryker.Abstractions/Options/ILogOptions.cs create mode 100644 src/Stryker.Abstractions/Options/IStrykerOptions.cs create mode 100644 src/Stryker.Abstractions/Options/IThresholds.cs rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/Options/OptimizationModes.cs (87%) create mode 100644 src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/Health.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/Solution.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs create mode 100644 src/Stryker.Abstractions/Reporting/IJsonMutant.cs create mode 100644 src/Stryker.Abstractions/Reporting/IJsonReport.cs create mode 100644 src/Stryker.Abstractions/Reporting/IJsonTest.cs create mode 100644 src/Stryker.Abstractions/Reporting/IJsonTestFile.cs create mode 100644 src/Stryker.Abstractions/Reporting/ILocation.cs create mode 100644 src/Stryker.Abstractions/Reporting/IPosition.cs rename src/{Stryker.Core/Stryker.Core/Reporters => Stryker.Abstractions/Reporting}/IReporter.cs (78%) create mode 100644 src/Stryker.Abstractions/Reporting/ISourceFile.cs create mode 100644 src/Stryker.Abstractions/Stryker.Abstractions.csproj rename src/{Stryker.Core/Stryker.Core/Mutants => Stryker.Abstractions/TestRunners}/ITestGuids.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Abstractions}/TestRunners/ITestRunner.cs (84%) create mode 100644 src/Stryker.Abstractions/packages.lock.json delete mode 100644 src/Stryker.Core/Stryker.Core/Baseline/Providers/IBaselineProvider.cs create mode 100644 src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs delete mode 100644 src/Stryker.Core/Stryker.Core/Mutators/IMutator.cs create mode 100644 src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs delete mode 100644 src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/Test.cs rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/ExclusionPattern.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/FilePathUtils.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/BooleanValidationExtensions.cs (87%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/InputDefinition.cs (97%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/AdditionalTimeoutInput.cs (90%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/AzureFileStorageSasInput.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/AzureFileStorageUrlInput.cs (90%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/BasePathInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/BaselineProviderInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/BreakOnInitialTestFailureInput.cs (88%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ConcurrencyInput.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ConfigurationInput.cs (85%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/CoverageAnalysisInput.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DashboardApiKeyInput.cs (90%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DashboardUrlInput.cs (90%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DevModeInput.cs (90%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DiffIgnoreChangesInput.cs (96%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DisableBailInput.cs (85%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/DisableMixMutantsInput.cs (85%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/FallbackVersionInput.cs (91%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/IgnoreMethodsInput.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/IgnoreMutationsInput.cs (96%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/LanguageVersionInput.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/LogToFileInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ModuleNameInput.cs (88%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/MsBuildPathInput.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/MutateInput.cs (97%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/MutationLevelInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/OpenReportEnabledInput.cs (82%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/OpenReportInput.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/OutputPathInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ProjectNameInput.cs (91%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ProjectVersionInput.cs (87%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ReportFileNameInput.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ReportersInput.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/SinceInput.cs (87%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/SinceTargetInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/SolutionInput.cs (94%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/SourceProjectNameInput.cs (88%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/TargetFrameworkInput.cs (88%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/TestCaseFilterInput.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/TestProjectsInput.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ThresholdBreakInput.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ThresholdHighInput.cs (91%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/ThresholdLowInput.cs (93%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/VerbosityInput.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Inputs/WithBaselineInput.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/LogOptions.cs (62%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/StrykerInputs.cs (98%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/StrykerOptions.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/Options/Thresholds.cs (54%) create mode 100644 src/Stryker.Options/Stryker.Configuration.csproj create mode 100644 src/Stryker.Options/packages.lock.json diff --git a/integrationtest/TargetProjects/IntegrationTestApp.sln b/integrationtest/TargetProjects/IntegrationTestApp.sln new file mode 100644 index 0000000000..1012bea2b0 --- /dev/null +++ b/integrationtest/TargetProjects/IntegrationTestApp.sln @@ -0,0 +1,66 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32421.90 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library", "Library\Library.csproj", "{506AB0A3-E830-4504-A1EE-0C9F531A9ACE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCoreTestProject.NUnit", "NetCoreTestProject.NUnit\NetCoreTestProject.NUnit.csproj", "{602929D8-22C6-47AD-BD1F-9DB81FB76231}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCoreTestProject.XUnit", "NetCoreTestProject.XUnit\NetCoreTestProject.XUnit.csproj", "{D2502C99-4676-4F4F-88F2-4F0384BF76EA}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SharedProject", "SharedProject\SharedProject.shproj", "{AE33CEEA-7EB1-438D-ABD4-3208D032C5D3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TargetProject", "TargetProject\TargetProject.csproj", "{FD5B399F-F31D-4E95-824D-EF3FDC2F610C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExtraProject", "ExtraProject\ExtraProject.csproj", "{70462F5F-6EC9-43F9-B360-3F61C9636804}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExtraProject.XUnit", "ExtraProject.XUnit\ExtraProject.XUnit.csproj", "{A862920A-7A81-4317-984E-2302A47B1792}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EmptyTestProject", "EmptyTestProject\EmptyTestProject.csproj", "{4EF7D9F7-8BEC-48B7-A336-0CD89EEBF627}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {506AB0A3-E830-4504-A1EE-0C9F531A9ACE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {506AB0A3-E830-4504-A1EE-0C9F531A9ACE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {506AB0A3-E830-4504-A1EE-0C9F531A9ACE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {506AB0A3-E830-4504-A1EE-0C9F531A9ACE}.Release|Any CPU.Build.0 = Release|Any CPU + {602929D8-22C6-47AD-BD1F-9DB81FB76231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {602929D8-22C6-47AD-BD1F-9DB81FB76231}.Debug|Any CPU.Build.0 = Debug|Any CPU + {602929D8-22C6-47AD-BD1F-9DB81FB76231}.Release|Any CPU.ActiveCfg = Release|Any CPU + {602929D8-22C6-47AD-BD1F-9DB81FB76231}.Release|Any CPU.Build.0 = Release|Any CPU + {D2502C99-4676-4F4F-88F2-4F0384BF76EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2502C99-4676-4F4F-88F2-4F0384BF76EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2502C99-4676-4F4F-88F2-4F0384BF76EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2502C99-4676-4F4F-88F2-4F0384BF76EA}.Release|Any CPU.Build.0 = Release|Any CPU + {FD5B399F-F31D-4E95-824D-EF3FDC2F610C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD5B399F-F31D-4E95-824D-EF3FDC2F610C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD5B399F-F31D-4E95-824D-EF3FDC2F610C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD5B399F-F31D-4E95-824D-EF3FDC2F610C}.Release|Any CPU.Build.0 = Release|Any CPU + {70462F5F-6EC9-43F9-B360-3F61C9636804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70462F5F-6EC9-43F9-B360-3F61C9636804}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70462F5F-6EC9-43F9-B360-3F61C9636804}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70462F5F-6EC9-43F9-B360-3F61C9636804}.Release|Any CPU.Build.0 = Release|Any CPU + {A862920A-7A81-4317-984E-2302A47B1792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A862920A-7A81-4317-984E-2302A47B1792}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A862920A-7A81-4317-984E-2302A47B1792}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A862920A-7A81-4317-984E-2302A47B1792}.Release|Any CPU.Build.0 = Release|Any CPU + {4EF7D9F7-8BEC-48B7-A336-0CD89EEBF627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EF7D9F7-8BEC-48B7-A336-0CD89EEBF627}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EF7D9F7-8BEC-48B7-A336-0CD89EEBF627}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EF7D9F7-8BEC-48B7-A336-0CD89EEBF627}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0C29E1AA-5805-4524-8160-B0C28E4050D8} + EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + SharedProject\SharedProject.projitems*{ae33ceea-7eb1-438d-abd4-3208d032c5d3}*SharedItemsImports = 13 + EndGlobalSection +EndGlobal diff --git a/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/NetCoreTestProject.MSTest.csproj b/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/NetCoreTestProject.MSTest.csproj index 40cedd48e3..d224eb4afd 100644 --- a/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/NetCoreTestProject.MSTest.csproj +++ b/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/NetCoreTestProject.MSTest.csproj @@ -1,6 +1,11 @@ + + true + + Exe + net8.0 enable enable @@ -12,8 +17,7 @@ - - + diff --git a/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/packages.lock.json b/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/packages.lock.json index 619ff7ed4f..33f2ab4ecf 100644 --- a/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/packages.lock.json +++ b/integrationtest/TargetProjects/NetCore/NetCoreTestProject.MSTest/packages.lock.json @@ -18,22 +18,18 @@ "Microsoft.TestPlatform.TestHost": "17.10.0" } }, - "MSTest.TestAdapter": { + "MSTest": { "type": "Direct", "requested": "[3.5.0, )", "resolved": "3.5.0", - "contentHash": "a5a7vo9vp21DbduF6vru34e0nS4Ggxk9pQ3rVJmsI9u+5/Sr83oHsvPGpnSxKi4S6ktEISDEdBuKZNZMsp+JkA==", + "contentHash": "lFR6KZcgwRaW6jjqOkX1pAHFa5eWuuElne+Viw9AxH2csZFzdNGmm2TCq1+kwMspEw1Zk4Na/2G/Wcp0/VGT9A==", "dependencies": { - "Microsoft.Testing.Extensions.VSTestBridge": "1.3.1", - "Microsoft.Testing.Platform.MSBuild": "1.3.1" + "MSTest.Analyzers": "[3.5.0]", + "MSTest.TestAdapter": "[3.5.0]", + "MSTest.TestFramework": "[3.5.0]", + "Microsoft.NET.Test.Sdk": "17.10.0" } }, - "MSTest.TestFramework": { - "type": "Direct", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "N99l244tFQp4wmYQynUrL8Ws/0mnG+m/G66ahH0JyRoNCd9PMAYBvGUKC1JT3oXyg0YV8o8sHauw2IR6R1M9mQ==" - }, "Microsoft.ApplicationInsights": { "type": "Transitive", "resolved": "2.22.0", @@ -121,6 +117,25 @@ "Newtonsoft.Json": "13.0.1" } }, + "MSTest.Analyzers": { + "type": "Transitive", + "resolved": "3.5.0", + "contentHash": "YQMybB8Im4vPQF82pgkH2SCIsaihk9ifGakoRrdiiLt8NshaUkv+rJR+q2peV64MfuadI6FGsiI4BpeA4RG8+Q==" + }, + "MSTest.TestAdapter": { + "type": "Transitive", + "resolved": "3.5.0", + "contentHash": "a5a7vo9vp21DbduF6vru34e0nS4Ggxk9pQ3rVJmsI9u+5/Sr83oHsvPGpnSxKi4S6ktEISDEdBuKZNZMsp+JkA==", + "dependencies": { + "Microsoft.Testing.Extensions.VSTestBridge": "1.3.1", + "Microsoft.Testing.Platform.MSBuild": "1.3.1" + } + }, + "MSTest.TestFramework": { + "type": "Transitive", + "resolved": "3.5.0", + "contentHash": "N99l244tFQp4wmYQynUrL8Ws/0mnG+m/G66ahH0JyRoNCd9PMAYBvGUKC1JT3oXyg0YV8o8sHauw2IR6R1M9mQ==" + }, "Newtonsoft.Json": { "type": "Transitive", "resolved": "13.0.1", @@ -150,7 +165,7 @@ "targetproject": { "type": "Project", "dependencies": { - "Library": "[4.1.0, )", + "Library": "[1.0.0, )", "Microsoft.CodeAnalysis.Common": "[4.10.0, )" } } diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProvider.cs b/src/Stryker.Abstractions/Baseline/BaselineProvider.cs similarity index 71% rename from src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProvider.cs rename to src/Stryker.Abstractions/Baseline/BaselineProvider.cs index 0de495b0af..c558dae967 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProvider.cs +++ b/src/Stryker.Abstractions/Baseline/BaselineProvider.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline { public enum BaselineProvider { diff --git a/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs new file mode 100644 index 0000000000..29ced100de --- /dev/null +++ b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs @@ -0,0 +1,10 @@ +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.Baseline +{ + public interface IBaselineProvider + { + Task Load(string version); + Task Save(IJsonReport report, string version); + } +} diff --git a/src/Stryker.Core/Stryker.Core/Exceptions/CompilationException.cs b/src/Stryker.Abstractions/Exceptions/CompilationException.cs similarity index 87% rename from src/Stryker.Core/Stryker.Core/Exceptions/CompilationException.cs rename to src/Stryker.Abstractions/Exceptions/CompilationException.cs index 250490d578..d97f6a380a 100644 --- a/src/Stryker.Core/Stryker.Core/Exceptions/CompilationException.cs +++ b/src/Stryker.Abstractions/Exceptions/CompilationException.cs @@ -1,6 +1,4 @@ -using System; - -namespace Stryker.Core.Exceptions; +namespace Stryker.Configuration.Exceptions; /// /// Represents errors which are related to roslyn compilation errors that we cannot fix, diff --git a/src/Stryker.Core/Stryker.Core/Exceptions/GeneralStrykerException.cs b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs similarity index 95% rename from src/Stryker.Core/Stryker.Core/Exceptions/GeneralStrykerException.cs rename to src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs index c608448942..63503189b8 100644 --- a/src/Stryker.Core/Stryker.Core/Exceptions/GeneralStrykerException.cs +++ b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs @@ -1,7 +1,6 @@ -using System; using System.Text; -namespace Stryker.Core.Exceptions +namespace Stryker.Configuration.Exceptions { /// /// Represents errors which are caused by known exceptions in Stryker. diff --git a/src/Stryker.Core/Stryker.Core/Exceptions/InputException.cs b/src/Stryker.Abstractions/Exceptions/InputException.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Exceptions/InputException.cs rename to src/Stryker.Abstractions/Exceptions/InputException.cs index 811cd847e6..888edcaabd 100644 --- a/src/Stryker.Core/Stryker.Core/Exceptions/InputException.cs +++ b/src/Stryker.Abstractions/Exceptions/InputException.cs @@ -1,7 +1,6 @@ -using System; using System.Text; -namespace Stryker.Core.Exceptions; +namespace Stryker.Configuration.Exceptions; /// /// Represents errors which are related to user input. diff --git a/src/Stryker.Core/Stryker.Core/Exceptions/NoTestProjectsException.cs b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs similarity index 84% rename from src/Stryker.Core/Stryker.Core/Exceptions/NoTestProjectsException.cs rename to src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs index fedef43420..9ee2d43e4b 100644 --- a/src/Stryker.Core/Stryker.Core/Exceptions/NoTestProjectsException.cs +++ b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs @@ -1,6 +1,4 @@ -using System; - -namespace Stryker.Core.Exceptions; +namespace Stryker.Configuration.Exceptions; /// /// Represents error when no test projects are found in the solution or configured for stryker. diff --git a/src/Stryker.Abstractions/IFilePattern.cs b/src/Stryker.Abstractions/IFilePattern.cs new file mode 100644 index 0000000000..7eb5aeddd7 --- /dev/null +++ b/src/Stryker.Abstractions/IFilePattern.cs @@ -0,0 +1,15 @@ +using DotNet.Globbing; +using Microsoft.CodeAnalysis.Text; + +namespace Stryker.Configuration; +public interface IFilePattern +{ + Glob Glob { get; } + bool IsExclude { get; } + IReadOnlyCollection TextSpans { get; } + + bool Equals(IFilePattern other); + bool Equals(object obj); + int GetHashCode(); + bool IsMatch(string filePath, TextSpan textSpan); +} diff --git a/src/Stryker.Abstractions/IMutator.cs b/src/Stryker.Abstractions/IMutator.cs new file mode 100644 index 0000000000..0feff1be40 --- /dev/null +++ b/src/Stryker.Abstractions/IMutator.cs @@ -0,0 +1,10 @@ +using Microsoft.CodeAnalysis; +using Stryker.Configuration.Options; +using Stryker.Configuration.Mutants; + +namespace Stryker.Configuration.Mutators; + +public interface IMutator +{ + IEnumerable Mutate(SyntaxNode node, SemanticModel semanticModel, IStrykerOptions options); +} diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/IProjectAndTests.cs b/src/Stryker.Abstractions/IProjectAndTests.cs similarity index 65% rename from src/Stryker.Core/Stryker.Core/Initialisation/IProjectAndTests.cs rename to src/Stryker.Abstractions/IProjectAndTests.cs index 5a034051fb..a36dad62db 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/IProjectAndTests.cs +++ b/src/Stryker.Abstractions/IProjectAndTests.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Initialisation; +namespace Stryker.Configuration.Initialisation; public interface IProjectAndTests { diff --git a/src/Stryker.Abstractions/IReadOnlyMutant.cs b/src/Stryker.Abstractions/IReadOnlyMutant.cs new file mode 100644 index 0000000000..23a7fe2ca8 --- /dev/null +++ b/src/Stryker.Abstractions/IReadOnlyMutant.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners; + +namespace Stryker.Configuration; + +/// +/// This interface should only contain readonly properties to ensure that others than the mutation test process cannot modify mutants. +/// +public interface IReadOnlyMutant +{ + int Id { get; } + Mutation Mutation { get; } + MutantStatus ResultStatus { get; } + string ResultStatusReason { get; } + ITestGuids CoveringTests { get; } + ITestGuids KillingTests { get; } + ITestGuids AssessingTests { get; } + bool CountForStats { get; } + bool IsStaticValue { get; } +} diff --git a/src/Stryker.Abstractions/ITimeoutValueCalculator.cs b/src/Stryker.Abstractions/ITimeoutValueCalculator.cs new file mode 100644 index 0000000000..d335f0fee4 --- /dev/null +++ b/src/Stryker.Abstractions/ITimeoutValueCalculator.cs @@ -0,0 +1,7 @@ +namespace Stryker.Configuration; + +public interface ITimeoutValueCalculator +{ + int CalculateTimeoutValue(int estimatedTime); + int DefaultTimeout { get; } +} diff --git a/src/Stryker.Abstractions/LinqExpression.cs b/src/Stryker.Abstractions/LinqExpression.cs new file mode 100644 index 0000000000..699c7a8742 --- /dev/null +++ b/src/Stryker.Abstractions/LinqExpression.cs @@ -0,0 +1,42 @@ +namespace Stryker.Configuration; + +/// Enumeration for the different kinds of linq expressions +public enum LinqExpression +{ + None, + Distinct, + Reverse, + Average, + AsEnumerable, + OrderBy, + OrderByDescending, + FirstOrDefault, + First, + SingleOrDefault, + Single, + Last, + All, + Any, + Skip, + Take, + SkipWhile, + TakeWhile, + Min, + Max, + Sum, + Count, + ThenBy, + ThenByDescending, + Union, + Intersect, + Concat, + Except, + IntersectBy, + MaxBy, + MinBy, + Order, + OrderDescending, + SkipLast, + TakeLast, + UnionBy +} diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantStatus.cs b/src/Stryker.Abstractions/MutantStatus.cs similarity index 79% rename from src/Stryker.Core/Stryker.Core/Mutants/MutantStatus.cs rename to src/Stryker.Abstractions/MutantStatus.cs index 4a6c647cec..a9da1fc198 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantStatus.cs +++ b/src/Stryker.Abstractions/MutantStatus.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public enum MutantStatus { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/Mutation.cs b/src/Stryker.Abstractions/Mutation.cs similarity index 84% rename from src/Stryker.Core/Stryker.Core/Mutants/Mutation.cs rename to src/Stryker.Abstractions/Mutation.cs index 4f1b1910b1..fbd01677bd 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/Mutation.cs +++ b/src/Stryker.Abstractions/Mutation.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { /// /// Represents a single mutation on code level diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MutationLevel.cs b/src/Stryker.Abstractions/MutationLevel.cs similarity index 71% rename from src/Stryker.Core/Stryker.Core/Mutators/MutationLevel.cs rename to src/Stryker.Abstractions/MutationLevel.cs index 4da1f258b1..d54ac2d09b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MutationLevel.cs +++ b/src/Stryker.Abstractions/MutationLevel.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public enum MutationLevel { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/Mutator.cs b/src/Stryker.Abstractions/Mutator.cs similarity index 96% rename from src/Stryker.Core/Stryker.Core/Mutators/Mutator.cs rename to src/Stryker.Abstractions/Mutator.cs index 2a9005ffcc..4d7770cea6 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/Mutator.cs +++ b/src/Stryker.Abstractions/Mutator.cs @@ -3,9 +3,9 @@ using System.Globalization; using System.Linq; using System.Reflection; -using Stryker.Core.Attributes; +using Stryker.Configuration.Attributes; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public enum Mutator { diff --git a/src/Stryker.Abstractions/Options/IExclusionPattern.cs b/src/Stryker.Abstractions/Options/IExclusionPattern.cs new file mode 100644 index 0000000000..aa8def3aa1 --- /dev/null +++ b/src/Stryker.Abstractions/Options/IExclusionPattern.cs @@ -0,0 +1,11 @@ + +using DotNet.Globbing; + +namespace Stryker.Configuration.Options; + +public interface IExclusionPattern +{ + Glob Glob { get; } + bool IsExcluded { get; } + IEnumerable<(int Start, int End)> MutantSpans { get; } +} diff --git a/src/Stryker.Abstractions/Options/ILogOptions.cs b/src/Stryker.Abstractions/Options/ILogOptions.cs new file mode 100644 index 0000000000..9996ba61db --- /dev/null +++ b/src/Stryker.Abstractions/Options/ILogOptions.cs @@ -0,0 +1,9 @@ +using Serilog.Events; + +namespace Stryker.Configuration.Options; + +public interface ILogOptions +{ + LogEventLevel LogLevel { get; init; } + bool LogToFile { get; init; } +} diff --git a/src/Stryker.Abstractions/Options/IStrykerOptions.cs b/src/Stryker.Abstractions/Options/IStrykerOptions.cs new file mode 100644 index 0000000000..0619ed4d39 --- /dev/null +++ b/src/Stryker.Abstractions/Options/IStrykerOptions.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Microsoft.CodeAnalysis.CSharp; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.Options; + +public interface IStrykerOptions +{ + int AdditionalTimeout { get; init; } + string AzureFileStorageSas { get; init; } + string AzureFileStorageUrl { get; init; } + BaselineProvider BaselineProvider { get; init; } + bool BreakOnInitialTestFailure { get; set; } + int Concurrency { get; init; } + string Configuration { get; init; } + string DashboardApiKey { get; init; } + string DashboardUrl { get; init; } + bool DevMode { get; init; } + IEnumerable DiffIgnoreChanges { get; init; } + IEnumerable ExcludedLinqExpressions { get; init; } + IEnumerable ExcludedMutations { get; init; } + string FallbackVersion { get; init; } + IEnumerable IgnoredMethods { get; init; } + bool IsSolutionContext { get; } + LanguageVersion LanguageVersion { get; init; } + ILogOptions LogOptions { get; init; } + string ModuleName { get; init; } + string MsBuildPath { get; init; } + IEnumerable Mutate { get; init; } + MutationLevel MutationLevel { get; init; } + OptimizationModes OptimizationMode { get; init; } + string OutputPath { get; init; } + string ProjectName { get; set; } + string ProjectPath { get; init; } + string ProjectVersion { get; set; } + IEnumerable Reporters { get; init; } + string ReportFileName { get; init; } + string ReportPath { get; } + ReportType? ReportTypeToOpen { get; init; } + bool Since { get; init; } + string SinceTarget { get; init; } + string SolutionPath { get; init; } + string SourceProjectName { get; init; } + string TargetFramework { get; init; } + string TestCaseFilter { get; init; } + IEnumerable TestProjects { get; init; } + IThresholds Thresholds { get; init; } + bool WithBaseline { get; init; } + string WorkingDirectory { get; init; } +} diff --git a/src/Stryker.Abstractions/Options/IThresholds.cs b/src/Stryker.Abstractions/Options/IThresholds.cs new file mode 100644 index 0000000000..a21567e194 --- /dev/null +++ b/src/Stryker.Abstractions/Options/IThresholds.cs @@ -0,0 +1,8 @@ +namespace Stryker.Configuration.Options; + +public interface IThresholds +{ + int Break { get; init; } + int High { get; init; } + int Low { get; init; } +} diff --git a/src/Stryker.Core/Stryker.Core/Options/OptimizationModes.cs b/src/Stryker.Abstractions/Options/OptimizationModes.cs similarity index 87% rename from src/Stryker.Core/Stryker.Core/Options/OptimizationModes.cs rename to src/Stryker.Abstractions/Options/OptimizationModes.cs index 1d7fe484f4..aa28924c6f 100644 --- a/src/Stryker.Core/Stryker.Core/Options/OptimizationModes.cs +++ b/src/Stryker.Abstractions/Options/OptimizationModes.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Core.Options +namespace Stryker.Configuration.Options { // Optimization options [Flags] diff --git a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs new file mode 100644 index 0000000000..fec9d165ac --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs @@ -0,0 +1,37 @@ +using Microsoft.CodeAnalysis; +using Stryker.Configuration.Mutants; +using System.Collections.Generic; + +namespace Stryker.Configuration.ProjectComponents +{ + public class CsharpFileLeaf : ProjectComponent, IFileLeaf + { + public string SourceCode { get; set; } + + /// + /// The original unmutated syntax tree + /// + public SyntaxTree SyntaxTree { get; set; } + + /// + /// The mutated syntax tree + /// + public SyntaxTree MutatedSyntaxTree { get; set; } + + public override IEnumerable Mutants { get; set; } + + public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; + + public override IEnumerable MutatedSyntaxTrees => new List { MutatedSyntaxTree }; + + public override IEnumerable> GetAllFiles() + { + yield return this; + } + + public override void Display() + { + DisplayFile(this); + } + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs new file mode 100644 index 0000000000..2ea225a517 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs @@ -0,0 +1,9 @@ +using Microsoft.CodeAnalysis; + +namespace Stryker.Configuration.ProjectComponents +{ + public class CsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite + { + + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs new file mode 100644 index 0000000000..521eea2821 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Stryker.Configuration; +using Stryker.Configuration.Mutants; + +namespace Stryker.Configuration.ProjectComponents +{ + public interface IReadOnlyFolderComposite : IProjectComponent + { + IEnumerable Children { get; } + void Add(IProjectComponent child); + void AddRange(IEnumerable children); + } + + public class FolderComposite : ProjectComponent, IReadOnlyFolderComposite + { + private readonly List _children = []; + public readonly List _compilationSyntaxTrees = []; + + public IEnumerable Children => _children; + + public override IEnumerable Mutants + { + get => Children.SelectMany(x => x.Mutants); + set => throw new NotSupportedException("Folders do not contain mutants."); + } + + /// + /// Add a syntax tree to this folder that is needed in compilation but should not be mutated + /// + public void AddCompilationSyntaxTree(T syntaxTree) => _compilationSyntaxTrees.Add(syntaxTree); + public override IEnumerable CompilationSyntaxTrees => _compilationSyntaxTrees.Union(ChildCompilationSyntaxTree); + private IEnumerable ChildCompilationSyntaxTree => Children.Cast>().SelectMany(c => c.CompilationSyntaxTrees); + public override IEnumerable MutatedSyntaxTrees => Children.Cast>().SelectMany(c => c.MutatedSyntaxTrees); + + public void Add(IProjectComponent child) + { + child.Parent = this; + _children.Add(child); + } + + public void AddRange(IEnumerable children) + { + foreach (var child in children) + { + Add(child); + } + } + + public override IEnumerable GetAllFiles() => Children.SelectMany(x => x.GetAllFiles()); + public override void Display() + { + // only walk this branch of the tree if it belongs to the source project, otherwise we have nothing to display. + if (MutatedSyntaxTrees.Any()) + { + DisplayFolder(this); + + foreach (var child in Children) + { + child.DisplayFile = DisplayFile; + child.DisplayFolder = DisplayFolder; + child.Display(); + } + } + } + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs new file mode 100644 index 0000000000..2f286c6fda --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs @@ -0,0 +1,37 @@ +using FSharp.Compiler.Syntax; +using Stryker.Configuration.Mutants; +using System.Collections.Generic; + +namespace Stryker.Configuration.ProjectComponents +{ + public class FsharpFileLeaf : ProjectComponent, IFileLeaf + { + public string SourceCode { get; set; } + + /// + /// The original unmutated syntaxtree + /// + public ParsedInput SyntaxTree { get; set; } + + /// + /// The mutated syntax tree + /// + public ParsedInput MutatedSyntaxTree { get; set; } + + public override IEnumerable Mutants { get; set; } + + public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; + + public override IEnumerable MutatedSyntaxTrees => new List { MutatedSyntaxTree }; + + public override IEnumerable> GetAllFiles() + { + yield return this; + } + + public override void Display() + { + DisplayFile(this); + } + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs new file mode 100644 index 0000000000..cc7e317dac --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs @@ -0,0 +1,9 @@ +using FSharp.Compiler.Syntax; + +namespace Stryker.Configuration.ProjectComponents +{ + public class FsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite + { + + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/Health.cs b/src/Stryker.Abstractions/ProjectComponents/Health.cs new file mode 100644 index 0000000000..1cc7d61a9a --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Health.cs @@ -0,0 +1,10 @@ +namespace Stryker.Configuration.ProjectComponents +{ + public enum Health + { + None, + Good, + Warning, + Danger + } +} \ No newline at end of file diff --git a/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs new file mode 100644 index 0000000000..3d2479fd35 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs @@ -0,0 +1,19 @@ +namespace Stryker.Configuration.ProjectComponents +{ + public interface IReadOnlyFileLeaf : IReadOnlyProjectComponent + { + string SourceCode { get; } + } + + public interface IFileLeaf : IFileLeaf + { + T SyntaxTree { get; set; } + + T MutatedSyntaxTree { get; set; } + } + + public interface IFileLeaf : IReadOnlyFileLeaf + { + new string SourceCode { get; set; } + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs b/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs new file mode 100644 index 0000000000..84427453fe --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using System.Linq; +using Stryker.Configuration; +using Stryker.Configuration.Options; +using Stryker.Configuration.Mutants; +using Stryker.Options; + +namespace Stryker.Configuration.ProjectComponents +{ + public delegate void Display(IReadOnlyProjectComponent current); + + public interface IReadOnlyProjectComponent + { + string FullPath { get; } + IEnumerable Mutants { get; } + IReadOnlyFolderComposite Parent { get; } + string RelativePath { get; set; } + public Display DisplayFile { get; set; } + public Display DisplayFolder { get; set; } + IEnumerable TotalMutants(); + IEnumerable ValidMutants(); + IEnumerable UndetectedMutants(); + IEnumerable DetectedMutants(); + IEnumerable InvalidMutants(); + IEnumerable IgnoredMutants(); + IEnumerable NotRunMutants(); + + Health CheckHealth(IThresholds threshold); + IEnumerable GetAllFiles(); + void Display(); + double GetMutationScore(); + } + + public interface IProjectComponent : IReadOnlyProjectComponent + { + new string FullPath { get; set; } + new IEnumerable Mutants { get; set; } + new IReadOnlyFolderComposite Parent { get; set; } + new string RelativePath { get; set; } + } + + public abstract class ProjectComponent : IProjectComponent + { + public string FullPath { get; set; } + /// + /// Relative path to project file + /// + public string RelativePath { get; set; } + + public IReadOnlyFolderComposite Parent { get; set; } + + public Display DisplayFile { get; set; } + + public Display DisplayFolder { get; set; } + + public virtual IEnumerable Mutants { get; set; } + + public abstract IEnumerable GetAllFiles(); + + public abstract void Display(); + + public IEnumerable TotalMutants() => ValidMutants() + .Union(InvalidMutants()) + .Union(IgnoredMutants()); + + public IEnumerable ValidMutants() => UndetectedMutants() + .Union(DetectedMutants()); + + public IEnumerable InvalidMutants() => Mutants + .Where(m => m.ResultStatus == MutantStatus.CompileError); + + public IEnumerable UndetectedMutants() => Mutants + .Where(m => + m.ResultStatus is MutantStatus.Survived or MutantStatus.NoCoverage); + + public IEnumerable IgnoredMutants() => Mutants + .Where(m => m.ResultStatus == MutantStatus.Ignored); + + public IEnumerable NotRunMutants() => Mutants + .Where(m => m.ResultStatus == MutantStatus.Pending); + + public IEnumerable DetectedMutants() => Mutants + .Where(m => + m.ResultStatus is MutantStatus.Killed or MutantStatus.Timeout); + + /// + /// Returns the mutation score for this folder / file + /// + /// double between 0 and 1 or NaN when no score could be calculated + public double GetMutationScore() => DetectedMutants().Count() / (double)ValidMutants().Count(); + + public Health CheckHealth(IThresholds threshold) + { + var mutationScore = GetMutationScore(); + if (double.IsNaN(mutationScore)) + { + // The mutation score is outside the bounds we can work with, so we don't have any health status + return Health.None; + } + + return (mutationScore*100) switch + { + var score when score >= threshold.High => Health.Good, + var score when score < threshold.High && score >= threshold.Low => Health.Warning, + _ => Health.Danger + }; + } + } + + public abstract class ProjectComponent : ProjectComponent + { + /// + /// All syntax trees that should be a part of the compilation + /// + public abstract IEnumerable CompilationSyntaxTrees { get; } + /// + /// Only those syntax trees that were changed by the mutation process + /// + public abstract IEnumerable MutatedSyntaxTrees { get; } + } + +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs new file mode 100644 index 0000000000..b1b3f39852 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.Linq; +using Stryker.Configuration.Helpers; + +namespace Stryker.Configuration.ProjectComponents +{ + /// + /// Contains extension methods for project components. + /// + public static class IProjectComponentsExtensions + { + /// + /// Checks with the given s whether all parts of the component are excluded. + /// + /// The file to check. + /// The file patters to check with. + /// If any parts of the file are included false; otherwise true. + public static bool IsComponentExcluded(this IReadOnlyProjectComponent projectComponent, IEnumerable filePatterns) + { + var includePattern = filePatterns.Where(x => !x.IsExclude).ToList(); + var excludePattern = filePatterns.Where(x => x.IsExclude).ToList(); + + // Get in- and excluded spans + var includedSpans = includePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); + var excludedSpans = excludePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); + + // If there are only included spans, the file is not excluded. + if ((includedSpans.Any() && !excludedSpans.Any()) || projectComponent.Parent?.Parent == null) + { + return false; + } + + return !includedSpans.RemoveOverlap(excludedSpans).Any(); + + bool MatchesFilePattern(FilePattern pattern) => + pattern.Glob.IsMatch(projectComponent.FullPath) || + pattern.Glob.IsMatch(projectComponent.RelativePath); + } + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/Solution.cs b/src/Stryker.Abstractions/ProjectComponents/Solution.cs new file mode 100644 index 0000000000..d5d84f8788 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/Solution.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Stryker.Configuration.Mutants; + +namespace Stryker.Configuration.ProjectComponents +{ + public class Solution : ProjectComponent, IReadOnlyFolderComposite + { + private readonly IList _children = new List(); + + public IEnumerable Children => _children; + + public override IEnumerable Mutants + { + get => Children.SelectMany(x => x.Mutants); + set => throw new NotSupportedException("Folders do not contain mutants."); + } + + public void Add(IProjectComponent child) => _children.Add(child); + + public void AddRange(IEnumerable children) + { + foreach (var child in children) + { + Add(child); + } + } + + public override void Display() + { + foreach (var child in Children) + { + child.DisplayFile = DisplayFile; + child.DisplayFolder = DisplayFolder; + child.Display(); + } + } + + public override IEnumerable GetAllFiles() => Children.SelectMany(x => x.GetAllFiles()); + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs b/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs new file mode 100644 index 0000000000..1076a8f033 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using Buildalyzer; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.ProjectComponents.TestProjects; + +namespace Stryker.Configuration.ProjectComponents.SourceProjects; + +public class SourceProjectInfo : IProjectAndTests +{ + private readonly List _warnings = []; + + public Action OnProjectBuilt {get;set;} + + public IAnalyzerResult AnalyzerResult { get; set; } + + /// + /// The Folder/File structure found in the project under test. + /// + public IProjectComponent ProjectContents { get; set; } + + public bool IsFullFramework => AnalyzerResult.TargetsFullFramework(); + + public string HelperNamespace => CodeInjector.HelperNamespace; + + public CodeInjection CodeInjector { get;} = new(); + + public TestProjectsInfo TestProjectsInfo { get; set; } + + public IReadOnlyCollection Warnings => _warnings; + + public IReadOnlyList GetTestAssemblies() => + TestProjectsInfo.GetTestAssemblies(); + + public string LogError(string error) + { + _warnings.Add(error); + return error; + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs new file mode 100644 index 0000000000..9bdc0ae606 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs @@ -0,0 +1,18 @@ +using System; +using Microsoft.CodeAnalysis; + +namespace Stryker.Configuration.ProjectComponents.TestProjects +{ + public sealed class TestCase : IEquatable + { + public Guid Id { get; init; } + public string Name { get; init; } + public SyntaxNode Node { get; init; } + + public bool Equals(TestCase other) => other.Id == Id && other.Name == Name && other.Node.Span == Node.Span; + + public override bool Equals(object obj) => obj is TestCase @case && Equals(@case); + + public override int GetHashCode() => (Id, Name).GetHashCode(); + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs new file mode 100644 index 0000000000..23ad2e2f6d --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis; + +namespace Stryker.Configuration.ProjectComponents.TestProjects +{ + public sealed class TestFile : IEquatable + { + public SyntaxTree SyntaxTree { get; init; } + public string FilePath { get; init; } + public string Source { get; init; } + public IEnumerable Tests { get; private set; } = new List(); + + public void AddTest(Guid id, string name, SyntaxNode node) + { + if (Tests.Any(test => test.Id == id)) + { + return; + } + + ((IList)Tests).Add(new TestCase + { + Id = id, + Name = name, + Node = node + }); + } + + public bool Equals(TestFile other) => other!=null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); + + public override bool Equals(object obj) => obj is TestFile file && Equals(file); + + // Stryker disable once bitwise: Bitwise mutation does not change functional usage of GetHashCode + public override int GetHashCode() => FilePath.GetHashCode() ^ Source.GetHashCode(); + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs new file mode 100644 index 0000000000..41df846b78 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO.Abstractions; +using System.Linq; +using System.Text; +using Buildalyzer; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.MutantFilters.Extensions; + +namespace Stryker.Configuration.ProjectComponents.TestProjects +{ + public sealed class TestProject : IEquatable + { + public IAnalyzerResult AnalyzerResult { get; } + + public string ProjectFilePath => AnalyzerResult.ProjectFilePath; + public IEnumerable TestFiles { get; } + + public TestProject(IFileSystem fileSystem, IAnalyzerResult testProjectAnalyzerResult) + { + AssertValidTestProject(testProjectAnalyzerResult); + + fileSystem ??= new FileSystem(); + + AnalyzerResult = testProjectAnalyzerResult; + + var testFiles = new List(); + foreach (var file in testProjectAnalyzerResult.SourceFiles) + { + var sourceCode = fileSystem.File.ReadAllText(file); + var syntaxTree = CSharpSyntaxTree.ParseText(sourceCode, + path: file, + encoding: Encoding.UTF32, + options: new CSharpParseOptions(LanguageVersion.Latest, DocumentationMode.None, preprocessorSymbols: testProjectAnalyzerResult.PreprocessorSymbols)); + + if (!syntaxTree.IsGenerated()) + { + testFiles.Add(new TestFile + { + SyntaxTree = syntaxTree, + FilePath = file, + Source = sourceCode + }); + } + } + + TestFiles = testFiles; + } + + private static void AssertValidTestProject(IAnalyzerResult testProjectAnalyzerResult) + { + if (testProjectAnalyzerResult.References.Any(r => r.Contains("Microsoft.VisualStudio.QualityTools.UnitTestFramework"))) + { + throw new InputException("Please upgrade your test projects to MsTest V2. Stryker.NET uses VSTest which does not support MsTest V1.", + @"See https://devblogs.microsoft.com/devops/upgrade-to-mstest-v2/ for upgrade instructions."); + } + } + + public bool Equals(TestProject other) => other.AnalyzerResult.Equals(AnalyzerResult) && other.TestFiles.SequenceEqual(TestFiles); + + public override bool Equals(object obj) => obj is TestProject project && Equals(project); + + public override int GetHashCode() => AnalyzerResult.GetHashCode(); + } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs new file mode 100644 index 0000000000..a776de4d73 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -0,0 +1,89 @@ +using System.Collections.Generic; +using System.IO; +using System.IO.Abstractions; +using System.Linq; +using Buildalyzer; +using Microsoft.Extensions.Logging; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; + +namespace Stryker.Configuration.ProjectComponents.TestProjects; + +public class TestProjectsInfo +{ + private readonly IFileSystem _fileSystem; + private readonly ILogger _logger; + + public IEnumerable TestProjects { get; set; } + + public IEnumerable TestFiles => TestProjects.SelectMany(testProject => testProject.TestFiles).Distinct(); + + public IEnumerable AnalyzerResults => TestProjects.Select(testProject => testProject.AnalyzerResult); + + public IReadOnlyList GetTestAssemblies() => + AnalyzerResults.Select(a => a.GetAssemblyPath()).ToList(); + + public TestProjectsInfo(IFileSystem fileSystem, ILogger logger = null) + { + _fileSystem = fileSystem ?? new FileSystem(); + _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger(); + TestProjects = []; + } + + public static TestProjectsInfo operator +(TestProjectsInfo a, TestProjectsInfo b) => + new(a._fileSystem, a._logger) + { + TestProjects = a.TestProjects.Union(b.TestProjects) + }; + + public void RestoreOriginalAssembly(IAnalyzerResult sourceProject) + { + foreach (var testProject in AnalyzerResults) + { + var injectionPath = GetInjectionFilePath(testProject, sourceProject); + var backupFilePath = GetBackupName(injectionPath); + + if (!_fileSystem.File.Exists(backupFilePath)) + { + continue; + } + try + { + _fileSystem.File.Copy(backupFilePath, injectionPath, true); + } + catch (IOException ex) + { + _logger.LogWarning(ex, "Failed to restore output assembly {Path}. Mutated assembly is still in place.", injectionPath); + } + } + } + + public void BackupOriginalAssembly(IAnalyzerResult sourceProject) + { + foreach (var testProject in AnalyzerResults) + { + var injectionPath = GetInjectionFilePath(testProject, sourceProject); + var backupFilePath = GetBackupName(injectionPath); + if (!_fileSystem.Directory.Exists(sourceProject.GetAssemblyDirectoryPath())) + { + _fileSystem.Directory.CreateDirectory(sourceProject.GetAssemblyDirectoryPath()); + } + if (_fileSystem.File.Exists(injectionPath)) + { + // Only create backup if there isn't already a backup + if (!_fileSystem.File.Exists(backupFilePath)) + { + _fileSystem.File.Move(injectionPath, backupFilePath, false); + } + } + else + { + _logger.LogWarning("Could not locate source assembly {injectionPath}", injectionPath); + } + } + } + + public static string GetInjectionFilePath(IAnalyzerResult testProject, IAnalyzerResult sourceProject) => Path.Combine(testProject.GetAssemblyDirectoryPath(), sourceProject.GetAssemblyFileName()); + + private static string GetBackupName(string injectionPath) => injectionPath + ".stryker-unchanged"; +} diff --git a/src/Stryker.Abstractions/Reporting/IJsonMutant.cs b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs new file mode 100644 index 0000000000..576ac04316 --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs @@ -0,0 +1,17 @@ +namespace Stryker.Configuration.Reporting; + +public interface IJsonMutant +{ + IEnumerable CoveredBy { get; set; } + string Description { get; init; } + int? Duration { get; set; } + string Id { get; init; } + IEnumerable KilledBy { get; set; } + ILocation Location { get; init; } + string MutatorName { get; init; } + string Replacement { get; init; } + bool? Static { get; init; } + string Status { get; init; } + string StatusReason { get; init; } + int? TestsCompleted { get; set; } +} diff --git a/src/Stryker.Abstractions/Reporting/IJsonReport.cs b/src/Stryker.Abstractions/Reporting/IJsonReport.cs new file mode 100644 index 0000000000..5a358ba093 --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/IJsonReport.cs @@ -0,0 +1,10 @@ +namespace Stryker.Configuration.Reporting; + +public interface IJsonReport +{ + IDictionary Files { get; init; } + string ProjectRoot { get; init; } + string SchemaVersion { get; init; } + IDictionary TestFiles { get; set; } + IDictionary Thresholds { get; init; } +} diff --git a/src/Stryker.Abstractions/Reporting/IJsonTest.cs b/src/Stryker.Abstractions/Reporting/IJsonTest.cs new file mode 100644 index 0000000000..22cd772859 --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/IJsonTest.cs @@ -0,0 +1,12 @@ +namespace Stryker.Configuration.Reporting; + +public interface IJsonTest +{ + string Id { get; } + ILocation Location { get; set; } + string Name { get; set; } + + bool Equals(IJsonTest other); + bool Equals(object obj); + int GetHashCode(); +} diff --git a/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs new file mode 100644 index 0000000000..ddfa0c94db --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Stryker.Configuration.ProjectComponents.TestProjects; + +namespace Stryker.Configuration.Reporting; + +public interface IJsonTestFile +{ + string Language { get; init; } + string Source { get; init; } + ISet Tests { get; set; } + + void AddTestFile(TestFile testFile); +} diff --git a/src/Stryker.Abstractions/Reporting/ILocation.cs b/src/Stryker.Abstractions/Reporting/ILocation.cs new file mode 100644 index 0000000000..588f0bc46c --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/ILocation.cs @@ -0,0 +1,7 @@ +namespace Stryker.Configuration.Reporting; + +public interface ILocation +{ + IPosition End { get; init; } + IPosition Start { get; init; } +} diff --git a/src/Stryker.Abstractions/Reporting/IPosition.cs b/src/Stryker.Abstractions/Reporting/IPosition.cs new file mode 100644 index 0000000000..0aa0ee3c2b --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/IPosition.cs @@ -0,0 +1,7 @@ +namespace Stryker.Configuration.Reporting; + +public interface IPosition +{ + int Column { get; set; } + int Line { get; set; } +} diff --git a/src/Stryker.Core/Stryker.Core/Reporters/IReporter.cs b/src/Stryker.Abstractions/Reporting/IReporter.cs similarity index 78% rename from src/Stryker.Core/Stryker.Core/Reporters/IReporter.cs rename to src/Stryker.Abstractions/Reporting/IReporter.cs index f05e8a1d16..07395901c2 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/IReporter.cs +++ b/src/Stryker.Abstractions/Reporting/IReporter.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporting; { public interface IReporter { diff --git a/src/Stryker.Abstractions/Reporting/ISourceFile.cs b/src/Stryker.Abstractions/Reporting/ISourceFile.cs new file mode 100644 index 0000000000..183cd3231d --- /dev/null +++ b/src/Stryker.Abstractions/Reporting/ISourceFile.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Stryker.Configuration.Reporting; + +public interface ISourceFile +{ + string Language { get; init; } + ISet Mutants { get; init; } + string Source { get; init; } +} diff --git a/src/Stryker.Abstractions/Stryker.Abstractions.csproj b/src/Stryker.Abstractions/Stryker.Abstractions.csproj new file mode 100644 index 0000000000..a55b5a2a43 --- /dev/null +++ b/src/Stryker.Abstractions/Stryker.Abstractions.csproj @@ -0,0 +1,16 @@ + + + + net8.0 + enable + enable + + + + + + + + + + diff --git a/src/Stryker.Core/Stryker.Core/Mutants/ITestGuids.cs b/src/Stryker.Abstractions/TestRunners/ITestGuids.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Mutants/ITestGuids.cs rename to src/Stryker.Abstractions/TestRunners/ITestGuids.cs index 71e8b3dc91..fc7521c254 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/ITestGuids.cs +++ b/src/Stryker.Abstractions/TestRunners/ITestGuids.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.TestRunners { // represents a simple list of test identifier with some properties public interface ITestGuids diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs b/src/Stryker.Abstractions/TestRunners/ITestRunner.cs similarity index 84% rename from src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs rename to src/Stryker.Abstractions/TestRunners/ITestRunner.cs index 091d9aa871..3f695e6950 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs +++ b/src/Stryker.Abstractions/TestRunners/ITestRunner.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.TestRunners +namespace Stryker.Configuration.TestRunners { public delegate bool TestUpdateHandler(IReadOnlyList testedMutants, ITestGuids failedTests, diff --git a/src/Stryker.Abstractions/packages.lock.json b/src/Stryker.Abstractions/packages.lock.json new file mode 100644 index 0000000000..84690a782c --- /dev/null +++ b/src/Stryker.Abstractions/packages.lock.json @@ -0,0 +1,76 @@ +{ + "version": 2, + "dependencies": { + "net8.0": { + "DotNet.Glob": { + "type": "Direct", + "requested": "[3.1.3, )", + "resolved": "3.1.3", + "contentHash": "hOfHw7MLJw/tbXaFwR1oiDb+dIXDp8URTxp5Pco42OOhiw77wrUNx6v6syNygHZbWwYdXQocL2Mo1l5FnfDVjg==" + }, + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[1.2.4, )", + "resolved": "1.2.4", + "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Direct", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "iifqKy3KvCgPABHFbFlSxjEoE+OItZGuZ191NM/TWV750m1jMypr7BtrP65ET+OK2KNVupO8S8xCtxbNqw056A==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "Microsoft.CodeAnalysis.Common": "[4.10.0]", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Direct", + "requested": "[17.10.0, )", + "resolved": "17.10.0", + "contentHash": "KkwhjQevuDj0aBRoPLY6OLAhGqbPUEBuKLbaCs0kUVw29qiOYncdORd4mLVJbn9vGZ7/iFGQ/+AoJl0Tu5Umdg==", + "dependencies": { + "System.Reflection.Metadata": "1.6.0" + } + }, + "Serilog": { + "type": "Direct", + "requested": "[4.0.0, )", + "resolved": "4.0.0", + "contentHash": "2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "CentralTransitive", + "requested": "[3.3.4, )", + "resolved": "3.3.4", + "contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "CentralTransitive", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "7O4+dn0fNKykPpEB1i8/5EKzwD3fuu/shdbbnnsBmdiHMaBz6telOubDFwPwLQQ/PvOAWTFIWWTyAOmWvXRD2g==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + } + } + } +} \ No newline at end of file diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs index 9084b275f5..30a114188c 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs @@ -2,7 +2,7 @@ using McMaster.Extensions.CommandLineUtils; using Shouldly; using Stryker.CLI.CommandLineConfig; -using Stryker.Core.Options; +using Stryker.Configuration; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs index 6a556887e8..9f0d5e9ad4 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs @@ -3,9 +3,9 @@ using Moq; using Shouldly; using Stryker.CLI.CommandLineConfig; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs index aeb48ae4cd..d2128caadf 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs @@ -2,10 +2,10 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Core; -using Stryker.Core.Initialisation; -using Stryker.Core.Options; -using Stryker.Core.Reporters; +using Stryker.Configuration; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs index 450a879962..f325363419 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs @@ -3,10 +3,10 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; +using Stryker.Configuration.Options; using Stryker.CLI.Logging; -using Stryker.Core.Options; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs index c59528af86..32d60ec331 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs @@ -8,8 +8,8 @@ using Spectre.Console.Testing; using Stryker.CLI.Clients; using Stryker.CLI.Logging; -using Stryker.Core; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest; diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs index 77f5254d8e..03a04efb12 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs @@ -11,12 +11,13 @@ using Spectre.Console.Testing; using Stryker.CLI.Clients; using Stryker.CLI.Logging; -using Stryker.Core; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.Reporters; +using Stryker.Configuration; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Options; namespace Stryker.CLI.UnitTest { @@ -112,7 +113,7 @@ public void OnMutationScoreBelowThresholdBreak_ShouldReturn_ExitCodeBreakThresho var strykerRunResult = new StrykerRunResult(options, 0.3); mock.Setup(x => x.RunMutationTest(It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((c, l, p) => Core.Logging.ApplicationLogging.LoggerFactory = l) + .Callback((c, l, p) => Configuration.Logging.ApplicationLogging.LoggerFactory = l) .Returns(strykerRunResult) .Verifiable(); diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 73a05af2b2..5d4dc494a6 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1600,11 +1600,32 @@ "ShellProgressBar": "[5.2.0, )", "Spectre.Console": "[0.49.1, )", "Spectre.Console.Analyzer": "[0.49.1, )", - "Stryker.DataCollector": "[4.1.0, )", - "Stryker.RegexMutators": "[4.1.0, )", + "Stryker.Abstractions": "[1.0.0, )", + "Stryker.Configuration": "[1.0.0, )", + "Stryker.DataCollector": "[1.0.0, )", + "Stryker.RegexMutators": "[1.0.0, )", "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, + "stryker.abstractions": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", + "Serilog": "[4.0.0, )" + } + }, + "stryker.configuration": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", + "Serilog": "[4.0.0, )", + "Stryker.Abstractions": "[1.0.0, )" + } + }, "stryker.datacollector": { "type": "Project", "dependencies": { diff --git a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs index 6ea811820e..ad15a8d0cf 100644 --- a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs +++ b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs @@ -1,5 +1,5 @@ using McMaster.Extensions.CommandLineUtils; -using Stryker.Core.Options; +using Stryker.Configuration; namespace Stryker.CLI; diff --git a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs index 87465424e6..ef0dcb431d 100644 --- a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs +++ b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs @@ -4,9 +4,9 @@ using System.Linq; using McMaster.Extensions.CommandLineUtils; using Spectre.Console; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; namespace Stryker.CLI.CommandLineConfig { diff --git a/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs b/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs index 6f88be0a09..09e5eba134 100644 --- a/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs +++ b/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs @@ -1,8 +1,8 @@ using System.IO; using McMaster.Extensions.CommandLineUtils; using Stryker.CLI.CommandLineConfig; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs b/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs index 0be59def0c..b7e3787979 100644 --- a/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs +++ b/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs @@ -5,8 +5,8 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; diff --git a/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs b/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs index 4f6e2b2668..7cf8be930b 100644 --- a/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs +++ b/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs @@ -1,6 +1,6 @@ using System.Linq; using System.Text.Json; -using Stryker.Core.Options; +using Stryker.Configuration; namespace Stryker.CLI; diff --git a/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs b/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs index 2ba1c33d57..8f5cdd7d22 100644 --- a/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs +++ b/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs @@ -2,8 +2,8 @@ using System.IO; using System.IO.Abstractions; using Spectre.Console; -using Stryker.Core; -using Stryker.Core.Options; +using Stryker.Configuration; +using Stryker.Configuration; namespace Stryker.CLI.Logging { diff --git a/src/Stryker.CLI/Stryker.CLI/Program.cs b/src/Stryker.CLI/Stryker.CLI/Program.cs index bd5d88b9ec..7be42d1267 100644 --- a/src/Stryker.CLI/Stryker.CLI/Program.cs +++ b/src/Stryker.CLI/Stryker.CLI/Program.cs @@ -1,6 +1,6 @@ using Spectre.Console; -using Stryker.Core; -using Stryker.Core.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.Exceptions; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs index 93ec8f3c53..cfe4b879a9 100644 --- a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs +++ b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs @@ -9,8 +9,8 @@ using Stryker.CLI.Clients; using Stryker.CLI.CommandLineConfig; using Stryker.CLI.Logging; -using Stryker.Core; -using Stryker.Core.Options; +using Stryker.Configuration; +using Stryker.Configuration; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index 00fd4d08e0..a17666d4fe 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -1421,11 +1421,32 @@ "ShellProgressBar": "[5.2.0, )", "Spectre.Console": "[0.49.1, )", "Spectre.Console.Analyzer": "[0.49.1, )", - "Stryker.DataCollector": "[4.1.0, )", - "Stryker.RegexMutators": "[4.1.0, )", + "Stryker.Abstractions": "[1.0.0, )", + "Stryker.Configuration": "[1.0.0, )", + "Stryker.DataCollector": "[1.0.0, )", + "Stryker.RegexMutators": "[1.0.0, )", "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, + "stryker.abstractions": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", + "Serilog": "[4.0.0, )" + } + }, + "stryker.configuration": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", + "Serilog": "[4.0.0, )", + "Stryker.Abstractions": "[1.0.0, )" + } + }, "stryker.datacollector": { "type": "Project", "dependencies": { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs index 481f455b4b..102ed97605 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs @@ -5,7 +5,7 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { /// /// Making asserting syntax trees more easy diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs index dbb23fa3a1..27c0f19f52 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs @@ -8,14 +8,14 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; -using Stryker.Core.UnitTest.Reporters; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Baseline.Providers +namespace Stryker.Configuration.UnitTest.Baseline.Providers { [TestClass] public class AzureFileShareBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs index 20da1ee09c..d38a803780 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs @@ -1,14 +1,14 @@ using System.Threading.Tasks; using Moq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Clients; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; -using Stryker.Core.UnitTest.Reporters; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Clients; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Baseline.Providers +namespace Stryker.Configuration.UnitTest.Baseline.Providers { [TestClass] public class DashboardBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs index 898812bc15..7e89dc0b89 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs @@ -2,14 +2,14 @@ using System.Threading.Tasks; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; -using Stryker.Core.UnitTest.Reporters; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Baseline.Providers +namespace Stryker.Configuration.UnitTest.Baseline.Providers { [TestClass] public class DiskBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs index e31d21b0d6..94a8e18339 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs @@ -1,11 +1,11 @@ using System.IO; using Shouldly; -using Stryker.Core.Baseline.Utils; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Baseline.Utils; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Baseline.Utils +namespace Stryker.Configuration.UnitTest.Baseline.Utils { [TestClass] public class BaselineMutantHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs index b09e51311b..353d9e92b2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs @@ -9,17 +9,17 @@ using Moq; using Moq.Protected; using Shouldly; -using Stryker.Core.Clients; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; -using Stryker.Core.UnitTest.Reporters.Json; - -namespace Stryker.Core.UnitTest.Clients +using Stryker.Configuration.Clients; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Configuration.UnitTest.Reporters.Json; + +namespace Stryker.Configuration.UnitTest.Clients { [TestClass] public class DashboardClientsTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs index d8f895ea93..2afc419dc3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs @@ -10,19 +10,19 @@ using Microsoft.CodeAnalysis.CSharp; using Moq; using Shouldly; -using Stryker.Core.Compiling; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Compiling; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Compiling; +namespace Stryker.Configuration.UnitTest.Compiling; [TestClass] public class CSharpCompilingProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs index 1a052cc45d..802cf1d8c9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs @@ -12,16 +12,16 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Compiling; -using Stryker.Core.Exceptions; -using Stryker.Core.InjectedHelpers; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.SourceProjects; - -namespace Stryker.Core.UnitTest.Compiling +using Stryker.Configuration.Compiling; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.SourceProjects; + +namespace Stryker.Configuration.UnitTest.Compiling { [TestClass] public class CSharpRollbackProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs index 858f8443f5..43ecaa7da3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs @@ -5,11 +5,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.DashboardCompare +namespace Stryker.Configuration.UnitTest.DashboardCompare { [TestClass] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs index 34787f7d83..da14c948b0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs @@ -5,12 +5,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.DiffProviders; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.DiffProviders; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.DiffProviders +namespace Stryker.Configuration.UnitTest.DiffProviders { [TestClass] public class GitDiffProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs index 483c0785a9..a864bbfad9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs @@ -2,7 +2,7 @@ using Shouldly; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { [TestClass] public class ExclusionPatternTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs index d75fc30bf7..236bc6f761 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs @@ -5,7 +5,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { [TestClass] public class FilePatternTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs index bb0e445030..f22a191306 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs @@ -7,10 +7,10 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Core.Initialisation; -using Stryker.Core.Options; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.Fsharp +namespace Stryker.Configuration.UnitTest.Fsharp { [TestClass] public class FsharpFileDetectionTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs index 3c36618d1c..92c728e1e5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -2,12 +2,12 @@ using System.Linq; using FSharp.Compiler.Text; using Shouldly; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Range = FSharp.Compiler.Text.Range; -namespace Stryker.Core.UnitTest.Helpers +namespace Stryker.Configuration.UnitTest.Helpers { [TestClass] public class RangeHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs index e706e0c40e..b15acd2a6c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs @@ -3,10 +3,10 @@ using System.Linq; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Helpers +namespace Stryker.Configuration.UnitTest.Helpers { [TestClass] public class TextSpanHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs index 5ad3185857..42da84dfa4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest; +namespace Stryker.Configuration.UnitTest; /// /// An extension to the [Ignore] attribute. Instead of using test lists / test categories to conditionally diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs index 1fb0670ad0..f4a492aca6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs @@ -7,10 +7,10 @@ using Buildalyzer.Construction; using Buildalyzer.Environment; using Moq; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Testing; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Testing; -namespace Stryker.Core.UnitTest.Initialisation; +namespace Stryker.Configuration.UnitTest.Initialisation; public class BuildAnalyzerTestsBase : TestBase { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs index b66c32e246..d62eba4987 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Moq; using Shouldly; -using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Configuration.Initialisation.Buildalyzer; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Initialisation.Buildalyzer; +namespace Stryker.Configuration.UnitTest.Initialisation.Buildalyzer; [TestClass] public class AnalyzerResultExtensionsTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs index c4ce3736c2..a50ddd18d1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs @@ -3,12 +3,12 @@ using System.IO; using Moq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Testing; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Testing; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Initialisation; +namespace Stryker.Configuration.UnitTest.Initialisation; [TestClass] public class InitialBuildProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs index 50a4c4319c..693a9a6769 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs @@ -4,14 +4,14 @@ using System.Threading; using Moq; using Shouldly; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Initialisation +namespace Stryker.Configuration.UnitTest.Initialisation { [TestClass] public class InitialTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs index 09e956b08a..17c257fb26 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs @@ -6,18 +6,18 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Initialisation +namespace Stryker.Configuration.UnitTest.Initialisation { [TestClass] public class InitialisationProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs index 81808e4592..b6565747cf 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs @@ -12,15 +12,15 @@ using Moq; using NuGet.Frameworks; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; using static NuGet.Frameworks.FrameworkConstants; -namespace Stryker.Core.UnitTest.Initialisation; +namespace Stryker.Configuration.UnitTest.Initialisation; [TestClass] public class InputFileResolverTests : BuildAnalyzerTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs index 70af673e73..5422bc28fb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs @@ -3,11 +3,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Testing; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Testing; -namespace Stryker.Core.UnitTest.Initialisation; +namespace Stryker.Configuration.UnitTest.Initialisation; [TestClass] public class NugetRestoreProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs index 566249b1b1..260299e23d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs @@ -6,18 +6,18 @@ using Buildalyzer; using Moq; using Shouldly; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.UnitTest.Initialisation +namespace Stryker.Configuration.UnitTest.Initialisation { [TestClass] public class ProjectMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs index 8863ce1aa6..2ba1683cc7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs @@ -9,17 +9,17 @@ using Serilog; using Serilog.Events; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters; -using Stryker.Core.TestRunners; - -namespace Stryker.Core.UnitTest.Initialisation; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.UnitTest.Initialisation; [TestClass] public class ProjectOrchestratorTests : BuildAnalyzerTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs index bc432350ce..1a2163153a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Initialisation; +using Stryker.Configuration.Initialisation; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Initialisation +namespace Stryker.Configuration.UnitTest.Initialisation { [TestClass] public class TimeoutValueCalculatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs index 7f63ad722c..f6d9f9f028 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs @@ -1,14 +1,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.InjectedHelpers; +using Stryker.Configuration.InjectedHelpers; using System; using System.Collections.Generic; using System.IO.Pipes; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.InjectedHelpers +namespace Stryker.Configuration.UnitTest.InjectedHelpers { [TestClass] public class InjectedHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs index 1d956e6021..56c053a623 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs @@ -2,7 +2,7 @@ using Moq; using System; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { public static class LoggerMockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs index 59cce6b743..04f380f236 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs @@ -1,9 +1,9 @@ using Moq; -using Stryker.Core.Testing; +using Stryker.Configuration.Testing; using System.Collections.Generic; using System.IO; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { public static class MockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs index 166a148604..a4850c33d7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs @@ -3,20 +3,20 @@ using System.Threading.Tasks; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Baseline.Utils; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; -using Stryker.Core.UnitTest.Reporters.Json; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Baseline.Utils; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Configuration.UnitTest.Reporters.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class BaselineMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs index 2e7fe58f2c..9f5e4e0322 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class ExcludeFromCodeCoverageFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs index cf99c25f7c..335291182f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs @@ -5,12 +5,14 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; - -namespace Stryker.Core.UnitTest.MutantFilters +using Stryker.Configuration; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration; + +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class ExcludeLinqExpressionFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs index 66a43219c1..0f7eaf9b6e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs @@ -1,11 +1,11 @@ using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class ExcludeMutationMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs index 41c7bcf5c3..c01d3a1357 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs @@ -3,13 +3,13 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class FilePatternMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs index d7c68c605f..b72eaa9f6c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class IgnoreBlockMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs index b1e5f4f7a5..ba215804aa 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs @@ -6,13 +6,13 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class IgnoredMethodMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs index 7373e0b9eb..66fbdf544e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs @@ -3,16 +3,18 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.DiffProviders; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.DiffProviders; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class MutantFilterFactoryTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs index bdf4d370a6..b84d7b6228 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs @@ -1,10 +1,10 @@ using Moq; using Shouldly; -using Stryker.Core.DiffProviders; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.DiffProviders; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -12,7 +12,7 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutantFilters +namespace Stryker.Configuration.UnitTest.MutantFilters { [TestClass] public class SinceMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs index cb30223533..d61eb9b18a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.Mutants; +namespace Stryker.Configuration.UnitTest.Mutants; [TestClass] public class CsharpMutantOrchestratorTests : MutantOrchestratorTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs index abf98a75e4..42d4a2e22f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.InjectedHelpers; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.Mutants +namespace Stryker.Configuration.UnitTest.Mutants { /// /// This base class provides helper to test source file mutation diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs index c9b4caaf10..164a865a8a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs @@ -6,14 +6,14 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.InjectedHelpers; -using Stryker.Core.Mutants; -using Stryker.Core.Mutants.CsharpNodeOrchestrators; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutants +namespace Stryker.Configuration.UnitTest.Mutants { [TestClass] public class MutantPlacerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs index 3c0e2d9dfd..87b612fc6d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs @@ -1,9 +1,9 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.UnitTest.Mutants +namespace Stryker.Configuration.UnitTest.Mutants { [TestClass] public class MutantTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs index 9f34dc5f97..fe2f80ddbd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs @@ -6,16 +6,16 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Moq; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mutation = Stryker.Core.Mutants.Mutation; +using Mutation = Stryker.Configuration.Mutants.Mutation; -namespace Stryker.Core.UnitTest.MutationTest +namespace Stryker.Configuration.UnitTest.MutationTest { [TestClass] public class CSharpMutationTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs index 3ca82c358f..1a831d2669 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Moq; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; -namespace Stryker.Core.UnitTest.MutationTest; +namespace Stryker.Configuration.UnitTest.MutationTest; /// /// This class simplifies the creation of run scenarios diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs index b9ab5cd832..7fd9c1eb77 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs @@ -3,14 +3,14 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.MutationTest +namespace Stryker.Configuration.UnitTest.MutationTest { [TestClass] public class MutationTestExecutorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs index 9f80f095cd..984168ed3a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs @@ -5,19 +5,19 @@ using System.Reflection; using Moq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.UnitTest.MutationTest +namespace Stryker.Configuration.UnitTest.MutationTest { [TestClass] public class MutationTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs index 10f2e8f533..6f5f7a46c9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs @@ -2,16 +2,16 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class AbstractMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs index d164cd103f..97dbd11f42 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class ArrayCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs index 8e845fbd87..2c8796535a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class AssignmentStatementMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs index 71ba11ac29..d22201183b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class BinaryExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs index fd638f4346..d7864fa842 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class BlockMutatorTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs index f9dc96896a..b45eb493a5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class BooleanMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs index a74ec1cc50..cb76c5a007 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class CheckedMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs index ca5ced7394..c66d6ebaea 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.UnitTest.Mutators; +namespace Stryker.Configuration.UnitTest.Mutators; [TestClass] public class ConditionalExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs index 6611dcbcfc..2f85eb836d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class InitializerMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs index 6b20cd6f75..0687cf73ea 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class InterpolatedStringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs index f5d38bfc51..c002b3cf7f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class IsPatternExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs index a154331c01..a717d70ec0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs @@ -2,11 +2,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class LinqMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs index c308eacbbe..95364482e2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs @@ -5,10 +5,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class MathMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs index 125b12f1a2..ad0182ee78 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; -namespace Stryker.Core.UnitTest.Mutators; +namespace Stryker.Configuration.UnitTest.Mutators; [TestClass] public class NegateConditionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs index ca7923c0bc..5ee5343eec 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs @@ -1,12 +1,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators; +namespace Stryker.Configuration.UnitTest.Mutators; [TestClass] public class NullCoalescingExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs index 510e967db7..45aa4598ec 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class ObjectCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs index c725716696..c214a46e4d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class PostfixUnaryMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs index 6f20630eb3..9df4655122 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class PrefixUnaryMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs index d5c174a793..c22cf95be9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class RegexMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs index 9cd5465efb..589f8b8e26 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class StatementMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs index f78ffdbe27..a55c3828d9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class StringEmptyMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs index 72660edada..371ceb934b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.UnitTest.Mutators; +namespace Stryker.Configuration.UnitTest.Mutators; [TestClass] public class StringMethodMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs index 94ab65e2d9..0bc0dc9600 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class StringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs index 179ad7808b..36c24ffbb6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { [TestClass] public class SwitchExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs index 7901042130..1d87da31f0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Attributes; +using Stryker.Configuration.Attributes; -namespace Stryker.Core.UnitTest.Mutators +namespace Stryker.Configuration.UnitTest.Mutators { public enum TestMutator { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs index 7efa80fb08..c8f7ac18f6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class AdditionalTimeoutMsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs index bf50fa2e74..c638d9fb2b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Baseline; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageSasInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs index 892b4a205c..f738dab467 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Baseline; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageUrlInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs index 57eae78fb2..b5a5761f85 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class BasePathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs index da8010560d..62d4c1461f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Baseline; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class BaselineProviderInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs index d6d79e4d9f..0e8cec0840 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class BreakOnInitialTestFailureInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs index cda3bfabe7..1ac6334a1c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs @@ -2,11 +2,11 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ConcurrencyInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs index a986c7ac36..a10d756a80 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs @@ -1,9 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs; +namespace Stryker.Configuration.UnitTest.Options.Inputs; [TestClass] public class ConfigurationInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs index ee232f9dd7..f35a491917 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs @@ -1,12 +1,12 @@ using System; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Baseline; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DashboardApiKeyInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs index b5f4806f81..d5d5ec23ac 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DashboardUrlInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs index 3d7c1c60ac..6c56494732 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DevModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs index 7b40e13bee..23dc109dae 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs @@ -1,9 +1,9 @@ using System.Linq; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DiffIgnoreChangesInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs index d91bb79a7c..1d3198f9a3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs @@ -1,9 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DisableBailInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs index c2bb9586e1..1d9353a62e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class DisableMixMutantsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs index 7a835e1039..5259fdc8a6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class FallbackVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs index 9ffc91d7a3..26eb82031f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs @@ -1,9 +1,9 @@ using System.Linq; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class IgnoreMethodsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs index fde501fe9e..7c0a665489 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Linq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutators; -using Stryker.Core.Options.Inputs; -using Stryker.Core.UnitTest.Mutators; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.UnitTest.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class IgnoreMutationsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs index 1a2d94d7d1..0f6ca66c7e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs @@ -3,11 +3,11 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class LanguageVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs index 957303f056..8d51a09239 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class LogToFileInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs index aee25cfa5d..c6f8907692 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ModuleNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs index 196b1ba89f..c0e6cacdca 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class MsBuildPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs index 1872423ee8..350146571e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs @@ -1,10 +1,10 @@ using System.IO; using System.Linq; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class MutateInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs index 8b5b51a334..64ddcb2a2e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutators; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class MutationLevelInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs index 1c1bb17863..1aeb56612d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class OpenReportEnabledInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs index 379b8d395c..98d2dbaa37 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class OpenReportInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs index e5e6d27db0..bc63ae2076 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class OptimizationModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs index e965178af3..1e05669ea7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class OutputPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs index a785aed68d..47f43d5fb5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs index b11a58b729..5dec42de23 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs @@ -1,11 +1,11 @@ using System.Linq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ProjectVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs index 2122e7997c..ceee980f08 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs @@ -1,10 +1,10 @@ using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ReportFileNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs index 47f97f5753..1651748e71 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ReportOpenerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs index c717514c8b..3c8c9325df 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs @@ -1,11 +1,11 @@ using System.Linq; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ReportersInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs index b9a252de36..99a0552bd9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class SinceInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs index 12a9922f61..7fde97d86c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class SinceTargetInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs index e5d69daa13..fc934c7a91 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs @@ -1,11 +1,11 @@ using System.IO; using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class SolutionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs index 7e37f3a867..1eb8ac7cd3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class SourceProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs index 5dd2e9a827..0427883916 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class TargetFrameworkInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs index 4ab9bdef37..c5c2e93594 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class TestCaseFilterInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs index d8f80f9fd8..be0058e25c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs @@ -1,9 +1,9 @@ using System.IO; using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class TestProjectsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs index 6facc8442b..b50a79bee4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ThresholdBreakInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs index 205e8bdf0a..c293bfa740 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ThresholdHighInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs index 2e025a2286..42df742b5d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class ThresholdLowInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs index 42adc0a882..6f962ef8fd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs @@ -1,10 +1,10 @@ using Serilog.Events; using Shouldly; -using Stryker.Core.Exceptions; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class VerbosityInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs index a04ddc4e5b..6284e5c269 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Options.Inputs +namespace Stryker.Configuration.UnitTest.Options.Inputs { [TestClass] public class WithBaselineInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs index 62645c5b30..0aec2f4fed 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs @@ -1,12 +1,12 @@ using System.IO; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Baseline; -namespace Stryker.Core.UnitTest.Options +namespace Stryker.Configuration.UnitTest.Options { [TestClass] public class StrykerInputsTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs index b651407d54..43de2a995b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs @@ -1,11 +1,11 @@ using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.ProjectComponents +namespace Stryker.Configuration.UnitTest.ProjectComponents { [TestClass] public class CsharpProjectComponentTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs index 77c23727b9..64e9613a7e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.ProjectComponents.SourceProjects; -namespace Stryker.Core.UnitTest.ProjectComponents.SourceProjects +namespace Stryker.Configuration.UnitTest.ProjectComponents.SourceProjects { [TestClass] public class SourceProjectInfoTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs index 38396a3826..f53abb0eb6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestCaseTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs index ade7a7cbec..1c3ca3d2a1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestFileTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs index 4af9601c28..8d5cbc5d44 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs @@ -4,10 +4,10 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs index be76c24362..7b931196be 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs @@ -8,11 +8,11 @@ using Microsoft.Extensions.Logging.Abstractions; using Moq; using Shouldly; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectsInfoTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs index 0ed1a47984..3c45e2c0d6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs @@ -1,13 +1,13 @@ using Moq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporters.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class BaselineReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs index 0e81f20727..4143d0608f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs @@ -2,13 +2,14 @@ using System.IO.Abstractions.TestingHelpers; using Moq; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class BroadcastReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs index fbeff5473c..26a5f45094 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs @@ -2,18 +2,18 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Stryker.Core.UnitTest.Reporters +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration; + +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class ClearTextReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs index aa97d8596b..b09c8266a1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs @@ -5,15 +5,15 @@ using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class ClearTextTreeReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs index a38d52fcce..41115196d3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs @@ -1,11 +1,11 @@ using Shouldly; using Spectre.Console.Testing; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class ConsoleDotReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs index 381657c601..cf3c6130dd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs @@ -1,17 +1,17 @@ using System.Linq; using System.Threading.Tasks; using Moq; -using Stryker.Core.Clients; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; -using Stryker.Core.Reporters.WebBrowserOpener; +using Stryker.Configuration.Clients; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporters.WebBrowserOpener; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class DashboardReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs index 5464fad866..205cead0db 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs @@ -5,16 +5,16 @@ using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Html; -using Stryker.Core.Reporters.Html.RealTime; -using Stryker.Core.Reporters.WebBrowserOpener; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Html; +using Stryker.Configuration.Reporters.Html.RealTime; +using Stryker.Configuration.Reporters.WebBrowserOpener; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Html +namespace Stryker.Configuration.UnitTest.Reporters.Html { [TestClass] public class HtmlReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs index 37ae781381..0ba701bcfb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs @@ -1,7 +1,7 @@ -using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs index dd838cf829..b36d741db8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs @@ -1,9 +1,9 @@ using System; using Shouldly; -using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTypeTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs index 45a3ed36a4..6651d23aac 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs @@ -2,13 +2,13 @@ using Microsoft.CodeAnalysis.CSharp; using Moq; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters.Html.RealTime; -using Stryker.Core.Reporters.Html.RealTime.Events; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters.Html.RealTime; +using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime; [TestClass] public class RealTimeMutantHandlerTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs index 823ba583ed..247ad0813d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs @@ -4,11 +4,11 @@ using System.Threading.Tasks; using LaunchDarkly.EventSource; using Shouldly; -using Stryker.Core.Reporters.Html.RealTime; -using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Html.RealTime; +using Stryker.Configuration.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime; [TestClass] public class SseServerTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs index 5e4ad75635..77ad547d07 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs @@ -13,14 +13,14 @@ using Moq; using Newtonsoft.Json; using Shouldly; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Json +namespace Stryker.Configuration.UnitTest.Reporters.Json { [TestClass] public class JsonReporterTests : TestBase @@ -65,7 +65,7 @@ public void JsonMutantLocation_FromValidFileLinePositionSpanShouldAdd1ToLineAndC new LinePosition(2, 2), new LinePosition(4, 5)); - var jsonMutantLocation = new Core.Reporters.Json.Location(lineSpan); + var jsonMutantLocation = new Configuration.Reporters.Json.Location(lineSpan); jsonMutantLocation.Start.Line.ShouldBe(3); jsonMutantLocation.Start.Column.ShouldBe(3); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs index 2a5efded89..77cc8a3ec1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.UnitTest.Reporters.Json +namespace Stryker.Configuration.UnitTest.Reporters.Json { public class MockJsonReport : JsonReport { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs index c123d080c0..d0305dfb53 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.UnitTest.Reporters.Json; +namespace Stryker.Configuration.UnitTest.Reporters.Json; public class MockJsonReportFileComponent : SourceFile { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs index 6b2b218c0e..4d7450f374 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs @@ -2,12 +2,12 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; using Spectre.Console.Testing; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class MarkdownSummaryReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs index 371d9a692b..b71d19707a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs @@ -1,10 +1,10 @@ using Moq; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters.Progress; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Progress +namespace Stryker.Configuration.UnitTest.Reporters.Progress { [TestClass] public class ProgressBarReporterTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs index d28ba4808d..bd01af99c4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs @@ -1,9 +1,9 @@ using Moq; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters.Progress; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters.Progress +namespace Stryker.Configuration.UnitTest.Reporters.Progress { [TestClass] public class ProgressReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs index c69c515de6..3af526fc48 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs @@ -2,11 +2,11 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { public static class ReportTestHelper { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs index 4f444d2622..fef1973e02 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs @@ -2,15 +2,15 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Options; -using Stryker.Core.Reporters; -using Stryker.Core.Reporters.Html; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Progress; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Reporters.Html; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class ReporterFactoryTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs index 2d3d8f07c2..e24c9366e0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs @@ -1,16 +1,16 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporters; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.Reporters +namespace Stryker.Configuration.UnitTest.Reporters { [TestClass] public class StatusReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs index e74dbc3bdc..7cbb88757d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { internal static class StringExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs index 7d096a72b0..7bceb9015d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Core.Options; +using Stryker.Configuration; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { [TestClass] public class StrykerRunResultTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs index 90da7b75ff..1f6ff27884 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs @@ -5,20 +5,21 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.TestRunners; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.UnitTest +namespace Stryker.Configuration.UnitTest { [TestClass] public class StrykerRunnerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs index a6f53513d8..5e3a9fc97e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; +using Stryker.Configuration.Logging; -namespace Stryker.Core.UnitTest; +namespace Stryker.Configuration.UnitTest; public abstract class TestBase { protected TestBase() => diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs index e59c8e3d6b..614f2213c8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs @@ -3,7 +3,7 @@ using Buildalyzer; using Moq; -namespace Stryker.Core.UnitTest; +namespace Stryker.Configuration.UnitTest; public static class TestHelper { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs index d187a9cda2..d4efd152ee 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs @@ -5,7 +5,7 @@ using System.Xml; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.TestRunners +namespace Stryker.Configuration.UnitTest.TestRunners { [TestClass] public class CoverageCaptureTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs index c5f1f86bf9..5d1756ecbe 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs @@ -8,7 +8,7 @@ using Stryker.DataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.TestRunners +namespace Stryker.Configuration.UnitTest.TestRunners { [TestClass] public class CoverageCollectorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs index 73d6fa5953..777af5a2d3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs @@ -16,20 +16,20 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollector.InProcDataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; -using Stryker.Core.ToolHelpers; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Configuration.ToolHelpers; using Stryker.DataCollector; using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Core.UnitTest.TestRunners; +namespace Stryker.Configuration.UnitTest.TestRunners; /// /// This class has a set of methods that can be used to mock VsTest behavior. diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs index e6fe655c54..874e8bcdbd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs @@ -5,16 +5,16 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Moq; using Shouldly; -using Stryker.Core.CoverageAnalysis; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.CoverageAnalysis; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.TestRunners +namespace Stryker.Configuration.UnitTest.TestRunners { /// /// This class hosts the VsTestRunner related tests. The design of VsTest implies the creation of many mocking objects, so the tests may be hard to read. diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs index 911389dec6..fe6182eba3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs @@ -13,14 +13,14 @@ using Moq; using Serilog.Events; using Shouldly; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.TestRunners.VsTest; -using Stryker.Core.ToolHelpers; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Configuration.ToolHelpers; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Core.UnitTest.TestRunners +namespace Stryker.Configuration.UnitTest.TestRunners { [TestClass] public class VsTextContextInformationTests: TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs index 8db7e0e681..e6cdaac28c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs @@ -4,9 +4,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Configuration.Initialisation.Buildalyzer; -namespace Stryker.Core.UnitTest.ToolHelpers; +namespace Stryker.Configuration.UnitTest.ToolHelpers; [TestClass] public class BuildalyzerHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 6c3dd98b10..3f88e40f1a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -1564,11 +1564,32 @@ "ShellProgressBar": "[5.2.0, )", "Spectre.Console": "[0.49.1, )", "Spectre.Console.Analyzer": "[0.49.1, )", - "Stryker.DataCollector": "[4.1.0, )", - "Stryker.RegexMutators": "[4.1.0, )", + "Stryker.Abstractions": "[1.0.0, )", + "Stryker.Configuration": "[1.0.0, )", + "Stryker.DataCollector": "[1.0.0, )", + "Stryker.RegexMutators": "[1.0.0, )", "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, + "stryker.abstractions": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", + "Serilog": "[4.0.0, )" + } + }, + "stryker.configuration": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", + "Serilog": "[4.0.0, )", + "Stryker.Abstractions": "[1.0.0, )" + } + }, "stryker.datacollector": { "type": "Project", "dependencies": { diff --git a/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs b/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs index 11162b5137..2c9c21d0ef 100644 --- a/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs +++ b/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace Stryker.Core.Attributes +namespace Stryker.Configuration.Attributes { [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public class MutatorDescriptionAttribute : Attribute diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs index 8c3e459c2a..89e5ad8b38 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs @@ -5,11 +5,11 @@ using Azure; using Azure.Storage.Files.Shares; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Logging; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Json; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { public class AzureFileShareBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs index 3b1a93b3f4..15957e9df2 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs @@ -1,6 +1,7 @@ -using Stryker.Core.Options; +using Stryker.Configuration.Baseline; +using Stryker.Configuration; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { public static class BaselineProviderFactory { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs index de595dc0ad..1e14862677 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs @@ -1,9 +1,9 @@ -using Stryker.Core.Clients; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Clients; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Json; using System.Threading.Tasks; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { public class DashboardBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs index f191d0a802..7d469fac0f 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs @@ -1,12 +1,12 @@ using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Logging; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Json; using System.IO; using System.IO.Abstractions; using System.Threading.Tasks; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { public class DiskBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs index 6b3c0b3cfb..aa27a02eab 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs @@ -1,9 +1,9 @@ using LibGit2Sharp; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; using System; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { using Logging; using Microsoft.Extensions.Logging; diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IBaselineProvider.cs deleted file mode 100644 index 8c796123ee..0000000000 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IBaselineProvider.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Stryker.Core.Reporters.Json; -using System.Threading.Tasks; - -namespace Stryker.Core.Baseline.Providers -{ - public interface IBaselineProvider - { - Task Load(string version); - Task Save(JsonReport report, string version); - } -} diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs index 436d938aa2..f6f8c4f69f 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs @@ -1,6 +1,6 @@ using LibGit2Sharp; -namespace Stryker.Core.Baseline.Providers +namespace Stryker.Configuration.Baseline.Providers { public interface IGitInfoProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs index cb3ef76a55..f30dad13aa 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.Baseline.Utils +namespace Stryker.Configuration.Baseline.Utils { public class BaselineMutantHelper : IBaselineMutantHelper { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs index 17122a7002..fb2eb6e59d 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Stryker.Core.Mutants; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.Baseline.Utils +namespace Stryker.Configuration.Baseline.Utils { public interface IBaselineMutantHelper { diff --git a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs index 99ce8c6c52..7165a2f0a5 100644 --- a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs +++ b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs @@ -1,15 +1,15 @@ using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Logging; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Json; using System; using System.Collections.Generic; using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.Clients +namespace Stryker.Configuration.Clients { public interface IDashboardClient { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs index 35eacee14c..2e7c8b9676 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs @@ -7,12 +7,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Compiling +namespace Stryker.Configuration.Compiling { public interface ICSharpRollbackProcess { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs index ee6a51f640..c83148122d 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp; -namespace Stryker.Core.Compiling +namespace Stryker.Configuration.Compiling { public record CSharpRollbackProcessResult( CSharpCompilation Compilation, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs index b8d085adfc..9a24f2ebd2 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Core.Compiling +namespace Stryker.Configuration.Compiling { public record CompilingProcessResult( bool Success, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 7a976ad19e..31edd42a6c 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -11,14 +11,14 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Emit; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; - -namespace Stryker.Core.Compiling; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; + +namespace Stryker.Configuration.Compiling; public interface ICSharpCompilingProcess { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs index a9aeeddce4..136add6efb 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs @@ -7,15 +7,15 @@ using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.MutationTest; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.ProjectComponents.TestProjects; using IFileSystem = System.IO.Abstractions.IFileSystem; using ParsedInput = FSharp.Compiler.Syntax.ParsedInput; -namespace Stryker.Core.Compiling +namespace Stryker.Configuration.Compiling { public class FsharpCompilingProcess { diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs index 2fc39e9930..c8a960d8ff 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Initialisation; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.CoverageAnalysis +namespace Stryker.Configuration.CoverageAnalysis { public class CoverageAnalyser : ICoverageAnalyser { diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs index ea9c7dc661..a6ab284371 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Stryker.Core.Initialisation; -using Stryker.Core.Mutants; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.CoverageAnalysis +namespace Stryker.Configuration.CoverageAnalysis { public interface ICoverageAnalyser { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs index 35ddab27a4..0b2b97a7b3 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Core.DiffProviders +namespace Stryker.Configuration.DiffProviders { public class DiffResult { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs index a659784978..12e40e1796 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs @@ -2,12 +2,12 @@ using System.IO; using System.Linq; using LibGit2Sharp; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutants; -using Stryker.Core.Options; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; -namespace Stryker.Core.DiffProviders +namespace Stryker.Configuration.DiffProviders { public class GitDiffProvider : IDiffProvider { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs index 237639ff6a..71b2e49785 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.DiffProviders +namespace Stryker.Configuration.DiffProviders { public interface IDiffProvider { diff --git a/src/Stryker.Core/Stryker.Core/ExitCodes.cs b/src/Stryker.Core/Stryker.Core/ExitCodes.cs index d754ae5174..16271ba3ce 100644 --- a/src/Stryker.Core/Stryker.Core/ExitCodes.cs +++ b/src/Stryker.Core/Stryker.Core/ExitCodes.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core +namespace Stryker.Configuration { /// /// Known Stryker exit codes. diff --git a/src/Stryker.Core/Stryker.Core/FilePattern.cs b/src/Stryker.Core/Stryker.Core/FilePattern.cs index 44f7fb1dd2..f06e165c58 100644 --- a/src/Stryker.Core/Stryker.Core/FilePattern.cs +++ b/src/Stryker.Core/Stryker.Core/FilePattern.cs @@ -1,16 +1,18 @@ using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; -using Stryker.Core.Helpers; +using Stryker.Configuration.Options; +using Stryker.Configuration.Helpers; +using Stryker.Configuration; using System; using System.Collections.Generic; using System.Linq; -namespace Stryker.Core +namespace Stryker.Configuration { /// /// Contains information about which files and which parts of a file should be in- or excluded. /// - public sealed class FilePattern : IEquatable + public sealed class FilePattern : IEquatable, IFilePattern { private static readonly TextSpan _textSpanMaxValue = new TextSpan(0, int.MaxValue); diff --git a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs b/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs index 17df3f036f..91efa6597b 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Core.Helpers +namespace Stryker.Configuration.Helpers { // describe a strategy that is specialized in a given type // and support sub-specialization diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs index aa36cd0b2e..2c5649c937 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using FSharp.Compiler.Text; -namespace Stryker.Core.Helpers; +namespace Stryker.Configuration.Helpers; public static class RangeHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs index fc71514228..11872a404e 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Helpers +namespace Stryker.Configuration.Helpers { internal static class RoslynHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs index 52058976de..dfeacc4a98 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using Microsoft.CodeAnalysis.Text; -namespace Stryker.Core.Helpers +namespace Stryker.Configuration.Helpers { public static class TextSpanHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs b/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs index ca7f168344..af60ca1f8d 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.Helpers +namespace Stryker.Configuration.Helpers { // type based strategy pattern implementation: finds the proper implementation according the type of a given object // keeping a cache for faster resolution diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs index 5c12e678da..edfc1ea4c4 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs @@ -2,9 +2,9 @@ using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.Options; +using Stryker.Configuration; -namespace Stryker.Core.Initialisation.Buildalyzer +namespace Stryker.Configuration.Initialisation.Buildalyzer { public static class IAnalyzerResultCSharpExtensions { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs index 3c6e89f791..bdecd0da38 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs @@ -10,9 +10,9 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.Extensions.Logging; using NuGet.Frameworks; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Initialisation.Buildalyzer; +namespace Stryker.Configuration.Initialisation.Buildalyzer; public static class IAnalyzerResultExtensions { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs index dc5200d9f1..1fbf13f9db 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs @@ -5,7 +5,7 @@ using System.Text; using Mono.Cecil; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { // This (CrossPlatformAssemblyResolver) is a copy of Mono.Cecil's BaseAssemblyResolver with all the conditional compilation removed and changes made to "Resolve" // Original: https://github.com/jbevain/cecil/blob/7b8ee049a151204997eecf587c69acc2f67c8405/Mono.Cecil/BaseAssemblyResolver.cs diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs index f2916143ae..ef082f1b11 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs @@ -9,13 +9,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.MutantFilters.Extensions; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.MutantFilters.Extensions; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public class CsharpProjectComponentsBuilder : ProjectComponentsBuilder { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs index 7022c53b38..25591e7992 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis; using Mono.Cecil; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { [ExcludeFromCodeCoverage] public static class EmbeddedResourcesGenerator diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs index 58482e00e6..67e16722c4 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public class FolderCompositeCache { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs index 7c84ca5d6f..e91ca5db4e 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs @@ -3,10 +3,10 @@ using FSharp.Compiler.Text; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Control; -using Stryker.Core.Exceptions; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.SourceProjects; using System; using System.Collections.Generic; using System.IO; @@ -14,7 +14,7 @@ using static FSharp.Compiler.Syntax.ParsedInput; using IFileSystem = System.IO.Abstractions.IFileSystem; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { internal class FsharpProjectComponentsBuilder : ProjectComponentsBuilder { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs index cb00595131..1983ff5336 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; -using Stryker.Core.Testing; -using Stryker.Core.ToolHelpers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Testing; +using Stryker.Configuration.ToolHelpers; using System.IO; -namespace Stryker.Core.Initialisation; +namespace Stryker.Configuration.Initialisation; public interface IInitialBuildProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs index b06e3f2898..2415fd8ab1 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs @@ -1,10 +1,12 @@ using System.Diagnostics; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Options; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Logging; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public interface IInitialTestProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs index 98af6baae2..e21f5ee7a3 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs @@ -1,6 +1,7 @@ -using Stryker.Core.TestRunners; +using Stryker.Configuration; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public class InitialTestRun { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs index 6bb98ae03e..da06434db2 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs @@ -3,15 +3,15 @@ using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.TestRunners; - -namespace Stryker.Core.Initialisation; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration; + +namespace Stryker.Configuration.Initialisation; // For mocking purposes public interface IInitialisationProcess diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs index fdf8e093cb..f70b4eaa77 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs @@ -9,15 +9,15 @@ using Buildalyzer; using Buildalyzer.Environment; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Testing; - -namespace Stryker.Core.Initialisation; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Testing; + +namespace Stryker.Configuration.Initialisation; public interface IInputFileResolver { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs index 93384d79db..6c74dba277 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public enum Language { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs index d712d7d9cf..099ca3b9fd 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs @@ -2,12 +2,12 @@ using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; -using Stryker.Core.Testing; -using Stryker.Core.ToolHelpers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Testing; +using Stryker.Configuration.ToolHelpers; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public interface INugetRestoreProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs index 72200becc2..45f144d811 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs @@ -1,15 +1,15 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; using System.Xml.Linq; using System.Linq; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.ProjectComponents; using Buildalyzer; using System.IO; using System.IO.Abstractions; -namespace Stryker.Core.Initialisation; +namespace Stryker.Configuration.Initialisation; public abstract class ProjectComponentsBuilder { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs index df399d9793..d67573c5be 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs @@ -2,13 +2,13 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { public interface IProjectMutator { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs index 2dd88d9f9f..e367ca621a 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs @@ -6,17 +6,18 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Mono.Cecil; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.Reporters; -using Stryker.Core.TestRunners; -using Stryker.Core.TestRunners.VsTest; - -namespace Stryker.Core.Initialisation +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.TestRunners; +using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.Baseline; + +namespace Stryker.Configuration.Initialisation { public interface IProjectOrchestrator: IDisposable { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs index 1f888d52a9..a88ee0cfa5 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs @@ -1,13 +1,7 @@ using System; -namespace Stryker.Core.Initialisation +namespace Stryker.Configuration.Initialisation { - public interface ITimeoutValueCalculator - { - int CalculateTimeoutValue(int estimatedTime); - int DefaultTimeout { get; } - } - public class TimeoutValueCalculator : ITimeoutValueCalculator { private readonly int _extraMs; diff --git a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs index b254accbf7..179adb9a2d 100644 --- a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs +++ b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs @@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.InjectedHelpers +namespace Stryker.Configuration.InjectedHelpers { public class CodeInjection { diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs index 26e7d7de82..1c4caac06a 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs @@ -1,9 +1,9 @@ using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Base logic for all instrumentation helpers. It takes of generating a specific annotation diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs index e52ee5d5ef..e99b2d91f9 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Injects a mutation controlled by a conditional operator. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs index 0fb61f03fc..8289bdd378 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Injects initialization to default value for a parameter or a variable at the beginning of a method. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs index e65d133a6a..39c6a743d5 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs @@ -2,9 +2,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Injects 'return default(...)' statement at the end of a method diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs index 2817faac10..0fd0728ade 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using System; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Implements code instrumentation logic. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs index c10f87ce06..05abc7cc08 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Instrumentation; +namespace Stryker.Configuration.Instrumentation; /// /// Injects a mutation controlled by an if Statement. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs index 2ea31e2997..123bd28c08 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs @@ -2,9 +2,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.InjectedHelpers; +using Stryker.Configuration.InjectedHelpers; -namespace Stryker.Core.Instrumentation +namespace Stryker.Configuration.Instrumentation { /// /// Injects static tracking logic in static fields/properties' initializers. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs index d31d514055..666c751519 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs @@ -1,9 +1,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.InjectedHelpers; +using Stryker.Configuration.InjectedHelpers; -namespace Stryker.Core.Instrumentation +namespace Stryker.Configuration.Instrumentation { /// /// Injects a static marker, to help identification of mutations executed through a static constructor/method/property... diff --git a/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs b/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs index 9490603600..605b8077b8 100644 --- a/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs +++ b/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Logging; -namespace Stryker.Core.Logging +namespace Stryker.Configuration.Logging { public static class ApplicationLogging { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs index 23887157f8..360873d8dc 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs @@ -4,16 +4,17 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Baseline.Utils; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Json.SourceFiles; - -namespace Stryker.Core.MutantFilters +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Baseline.Utils; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporting; +using Stryker.Configuration; + +namespace Stryker.Configuration.MutantFilters { public class BaselineMutantFilter : IMutantFilter { @@ -72,7 +73,7 @@ private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadO return; } - SourceFile baselineFile = _baseline.Files[FilePathUtils.NormalizePathSeparators(file.RelativePath)]; + var baselineFile = _baseline.Files[FilePathUtils.NormalizePathSeparators(file.RelativePath)]; if (baselineFile is { }) { @@ -97,7 +98,7 @@ private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadO } } - private void SetMutantStatusToBaselineMutantStatus(JsonMutant baselineMutant, + private void SetMutantStatusToBaselineMutantStatus(IJsonMutant baselineMutant, IEnumerable matchingMutants) { if (matchingMutants.Count() == 1) diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs index 8cf7c94283..ee6ace5dd8 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs @@ -1,10 +1,10 @@ -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { public class BroadcastMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs index 7571e1493f..ed9fc2c8be 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { public class ExcludeFromCodeCoverageFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs index bdc5b6a350..b45b29b931 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs @@ -4,12 +4,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { /// /// Checks if the linq expression of the mutant should be excluded. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs index a3cf9ff979..162fc1e54f 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { /// /// Checks if the mutation type of the mutant should be excluded. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs index 97270e8d19..fe1e227a08 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { /// /// Checks if the mutation should be skipped depending on the file and position of the mutation. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs index 88d4a4c0ce..c2815361b9 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs @@ -4,7 +4,7 @@ using System; -namespace Stryker.Core.MutantFilters.Extensions +namespace Stryker.Configuration.MutantFilters.Extensions { using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs index cf38e8f7e0..a55ef359da 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { /// /// Allows to filter a set of mutants before the mutants are tested. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs index b82a5303a9..8c788e2bfa 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; -using Stryker.Core.Mutators; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { public class IgnoreBlockMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs index 6aa4922d15..6d648f647d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { /// /// Checks if the mutants are part of ignored method calls. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs index c1af7f0f1d..aa256182b3 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { // Filters are executed in the order they appear in in this enum. If you change this order you change the order or filter execution public enum MutantFilter diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs index 11cf27a452..ae8997295e 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs @@ -1,12 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.DiffProviders; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.DiffProviders; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { public static class MutantFilterFactory { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs index b85a73ff85..c08ee37e5d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs @@ -3,13 +3,13 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Core.DiffProviders; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.DiffProviders; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.MutantFilters +namespace Stryker.Configuration.MutantFilters { public class SinceMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs index 1c09c1ac23..6c1a6a0cf6 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using Stryker.Core.Options; +using Stryker.Configuration; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public abstract class BaseMutantOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs index 118a7bf9c5..206fd5424a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs @@ -6,13 +6,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Core.Helpers; -using Stryker.Core.Logging; -using Stryker.Core.Mutants.CsharpNodeOrchestrators; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.Helpers; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; -namespace Stryker.Core.Mutants; +namespace Stryker.Configuration.Mutants; /// public class CsharpMutantOrchestrator : BaseMutantOrchestrator diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs index 7731009401..f460f73cac 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutation for Accessors (get/set). Its purpose is to convert arrow expression accessor to body statement form when needed. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs index 4037133e1b..f37b3f1e92 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class AnonymousFunctionExpressionOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs index 838be6685e..5868a8ac40 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; -using Stryker.Core.Instrumentation; +using Stryker.Configuration.Helpers; +using Stryker.Configuration.Instrumentation; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// This class implements a roslyn type independent orchestrator for method, functions, getters.... diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs index d7db648d6c..64bda9f533 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Handles Methods/properties' accessors/constructors and finalizers. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs index 5b2648d23c..3bf8895ebb 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for syntax block diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs index 7617241dc9..51cc686ee8 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Mutators; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal static class CommentParser { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs index 1a0605bbfd..2f2af031c5 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class ConditionalExpressionOrchestrator :MemberAccessExpressionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs index 756c8e3f32..cfaf649081 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs @@ -1,7 +1,7 @@ using System; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Generic class for node types (and their children) that must not be mutated diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs index 027514866c..eaa976de97 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs @@ -1,9 +1,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class ExpressionBodiedPropertyOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs index 830992bb74..6856bb76d7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for expressions (and sub expressions). diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs index 7d2e602a4c..d685717901 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal interface INodeOrchestrator : ITypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs index 837822b70f..43afebbadf 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class InvocationExpressionOrchestrator: MemberAccessExpressionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs index 95efdf2856..7501f77eb0 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Handle const declarations. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs index f7a0847deb..16402ff0fc 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class LocalFunctionStatementOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs index 0c65fc869c..af31ba16c9 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; internal class MemberAccessExpressionOrchestrator : NodeSpecificOrchestrator where T:ExpressionSyntax { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs index bdf79c13c8..a2d1bc8541 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Base class for node types (and their children) that are member definitions diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs index 5fc4dc9972..3378a4a9e9 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Generic class to deal with syntax nodes which mutations must be injected at statement level diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs index cfdb006690..912ecc7d06 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// This purpose of each implementation of this class is to support one specific C# code construct during the mutation process. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs index 857d174ae8..8d37ab4fe7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// General handler for Statements. Remember to inherit from this class when you wand to create a statement specific logic. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs index f224acf556..ad3e2ec8ec 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Supports static constructor. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs index 044134d91d..69b9c18d03 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// Ensure static Fields are marked as static diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs index f6cc4595f3..c6e5e983f9 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs @@ -2,7 +2,7 @@ using System.Linq; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; /// /// This is the default orchestrator: it does not mutate the node, but it will orchestrate the mutations of its children. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs index 4071d5f9ff..06c0f02760 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs @@ -3,12 +3,12 @@ using FSharp.Compiler.Syntax; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; -using Stryker.Core.Logging; -using Stryker.Core.Mutants.FsharpOrchestrators; -using Stryker.Core.Mutators; -using Stryker.Core.Options; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants.FsharpOrchestrators; +using Stryker.Configuration.Mutators; +using Stryker.Configuration; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { /// public class FsharpMutantOrchestrator : BaseMutantOrchestrator, object> diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs index 69e9ba8e2b..a07f17ec29 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class DefaultOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs index 9d81044455..54a576743b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public interface IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs index eab823171e..8bbb86160d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class IfThenElseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs index ee8f299d5f..cdf809af29 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class LetOrUseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs index ce1e894f7d..7e78db7747 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class LetOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs index 3614048526..42eab1e9d4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs @@ -4,7 +4,7 @@ using static FSharp.Compiler.Syntax.SynConst; using static FSharp.Compiler.Syntax.SynPat; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { //this orchestrtor also places a mutation. This is to proof the code works //the mutation should come from a mutator, however mutators are currently not implemented diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs index bd1984136e..a73c303c77 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class NestedModuleOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs index e5e45e118b..4d6ad2a0fd 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Core.Mutants.FsharpOrchestrators +namespace Stryker.Configuration.Mutants.FsharpOrchestrators { public class OrchestratorFinder { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs new file mode 100644 index 0000000000..75b154e7f2 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs @@ -0,0 +1,20 @@ +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners; + +namespace Stryker.Core.Mutants; +public interface IMutant +{ + ITestGuids AssessingTests { get; set; } + bool CountForStats { get; } + ITestGuids CoveringTests { get; set; } + string DisplayName { get; } + int Id { get; set; } + bool IsStaticValue { get; set; } + ITestGuids KillingTests { get; set; } + bool MustBeTestedInIsolation { get; set; } + Mutation Mutation { get; set; } + MutantStatus ResultStatus { get; set; } + string ResultStatusReason { get; set; } + + void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, ITestGuids timedOutTests, bool sessionTimedOut); +} \ No newline at end of file diff --git a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs index a40a1ddace..13dc03fbc4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs @@ -1,25 +1,13 @@ +using Stryker.Configuration; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners; + namespace Stryker.Core.Mutants { - /// - /// This interface should only contain readonly properties to ensure that others than the mutation test process cannot modify mutants. - /// - public interface IReadOnlyMutant - { - int Id { get; } - Mutation Mutation { get; } - MutantStatus ResultStatus { get; } - string ResultStatusReason { get; } - ITestGuids CoveringTests { get; } - ITestGuids KillingTests { get; } - ITestGuids AssessingTests { get; } - bool CountForStats { get; } - bool IsStaticValue { get; } - } - /// /// Represents a single mutation on domain level /// - public class Mutant : IReadOnlyMutant + public class Mutant : IMutant { public int Id { get; set; } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs index c1ea57e7b8..4e39c3ccd9 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { /// /// Used to keep track of mutant info. For example during the rollback process. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs index e8ff490fa9..64c9480488 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.InjectedHelpers; -using Stryker.Core.Instrumentation; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.Instrumentation; -namespace Stryker.Core.Mutants; +namespace Stryker.Configuration.Mutants; /// /// Implements multiple (reversible) patterns for injecting code in the mutated assembly diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs index 913b61e0ab..6479b61d20 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs @@ -2,10 +2,10 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants.CsharpNodeOrchestrators; -using Stryker.Core.Mutators; +using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Mutants; +namespace Stryker.Configuration.Mutants; /// /// Describe the (syntax tree) context during mutation and ensure proper mutation injection. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs index f77bffb2c0..85e2608a33 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs @@ -5,10 +5,10 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; using RegexParser.Nodes; -using Stryker.Core.Helpers; -using Stryker.Core.Logging; +using Stryker.Configuration.Helpers; +using Stryker.Configuration.Logging; -namespace Stryker.Core.Mutants; +namespace Stryker.Configuration.Mutants; /// diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs index 3ab6ce0e9b..9bf02ecc8a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public sealed class TestDescription { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs index dabf66f112..cba373ed67 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public class TestGuidsList : ITestGuids diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs index 12f7f2af1d..a638e42817 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public class TestSet { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs index 955ef5ecae..bd604beede 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.Mutants +namespace Stryker.Configuration.Mutants { public class WrappedGuidsEnumeration : ITestGuids { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs index 1d1bf1645a..a9f6b4f61e 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs @@ -4,16 +4,16 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Core.Compiling; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.MutantFilters; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; - -namespace Stryker.Core.MutationTest +using Stryker.Configuration.Compiling; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.MutantFilters; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; + +namespace Stryker.Configuration.MutationTest { public class CsharpMutationProcess : IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs index 8ae89eaa25..4b27d0ffba 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs @@ -2,17 +2,17 @@ using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; -using Stryker.Core.Compiling; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Compiling; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; using System; using System.IO; using System.IO.Abstractions; using System.Linq; -namespace Stryker.Core.MutationTest +namespace Stryker.Configuration.MutationTest { public class FsharpMutationProcess : IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs index f5fe90d47e..084bd2765c 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.MutationTest +namespace Stryker.Configuration.MutationTest { public interface IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs index 8583d5a48f..8764395c38 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Initialisation; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.MutationTest +namespace Stryker.Configuration.MutationTest { /// /// Executes exactly one mutation test and stores the result diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs index 7f5f92bf27..30731b600d 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs @@ -1,9 +1,9 @@ -using Stryker.Core.Initialisation; -using Stryker.Core.ProjectComponents.SourceProjects; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.TestRunners; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.TestRunners; -namespace Stryker.Core.MutationTest +namespace Stryker.Configuration.MutationTest { /// /// Represents the state the application under test is in. diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs index 62170f69e1..fc39b4a875 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs @@ -3,17 +3,18 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Stryker.Core.CoverageAnalysis; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters; - -namespace Stryker.Core.MutationTest +using Stryker.Configuration.CoverageAnalysis; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.TestRunners; + +namespace Stryker.Configuration.MutationTest { public interface IMutationTestProcess { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs index 41a73a8e36..e7f22e2d01 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class ArrayCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs index 6019c2575d..94a9a55037 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; -using Stryker.Core.Mutants; +using Stryker.Configuration.Helpers; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators +namespace Stryker.Configuration.Mutators { public class AssignmentExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs index 56c272d711..7d18f2cd7c 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutators +namespace Stryker.Configuration.Mutators { public class BinaryExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs index 01d2067b6f..039ca69b63 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Helpers; -using Stryker.Core.Mutants; +using Stryker.Configuration.Helpers; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; class BlockMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs index ae97f01fea..c8cb034228 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class BooleanMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs index fded33eef4..a53c38cfc0 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class CheckedMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs index d8cba344be..80b1f60f27 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators +namespace Stryker.Configuration.Mutators { public class ConditionalExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/IMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/IMutator.cs deleted file mode 100644 index ec953cdd07..0000000000 --- a/src/Stryker.Core/Stryker.Core/Mutators/IMutator.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Microsoft.CodeAnalysis; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using System.Collections.Generic; - -namespace Stryker.Core.Mutators; - -public interface IMutator -{ - IEnumerable Mutate(SyntaxNode node, SemanticModel semanticModel, StrykerOptions options); -} diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs index 4b3eb7e164..a4e6c79d4b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class InitializerMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs index 20c6bec1d6..5d60a896df 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class InterpolatedStringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs index ed56930773..a0fc67f295 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Mutator implementation for is expression public class IsPatternExpressionMutator : PatternMutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs index 2e5a3c1364..d6c6c61e1a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs @@ -1,11 +1,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Mutants; using System; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Mutator Implementation for LINQ Mutations public class LinqMutator : MutatorBase @@ -130,46 +131,3 @@ private static InvocationExpressionSyntax FindEnclosingInvocation(ExpressionSynt return null; } } - - - -/// Enumeration for the different kinds of linq expressions -public enum LinqExpression -{ - None, - Distinct, - Reverse, - Average, - AsEnumerable, - OrderBy, - OrderByDescending, - FirstOrDefault, - First, - SingleOrDefault, - Single, - Last, - All, - Any, - Skip, - Take, - SkipWhile, - TakeWhile, - Min, - Max, - Sum, - Count, - ThenBy, - ThenByDescending, - Union, - Intersect, - Concat, - Except, - IntersectBy, - MaxBy, - MinBy, - Order, - OrderDescending, - SkipLast, - TakeLast, - UnionBy -} diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs index d54296b66b..0e145a8459 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Mutator Implementation for Math Mutations public class MathMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs index 9cf47cab01..9e101f9b2d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs @@ -1,17 +1,17 @@ -using Microsoft.CodeAnalysis; -using Stryker.Core.Mutants; -using Stryker.Core.Options; using System.Collections.Generic; using System.Linq; +using Microsoft.CodeAnalysis; +using Stryker.Configuration.Options; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// /// Mutators can implement this class to check the type of the node and cast the node to the expected type. /// Implementing this class is not obligatory for mutators. /// /// The type of SyntaxNode to cast to -public abstract class MutatorBase:IMutator where T : SyntaxNode +public abstract class MutatorBase : IMutator where T : SyntaxNode { /// /// Apply the given mutations to a single SyntaxNode @@ -22,7 +22,7 @@ public abstract class MutatorBase:IMutator where T : SyntaxNode public abstract MutationLevel MutationLevel { get; } - public IEnumerable Mutate(SyntaxNode node, SemanticModel semanticModel, StrykerOptions options) + public IEnumerable Mutate(SyntaxNode node, SemanticModel semanticModel, IStrykerOptions options) { if (MutationLevel <= options.MutationLevel && node is T tNode) { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs index b77e7d1e36..be2b88b1ac 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class NegateConditionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs index b559dd01fd..579764fd92 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace Stryker.Core.Mutators +namespace Stryker.Configuration.Mutators { public class NullCoalescingExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs index 2ffc16fece..6f27131f4b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators +namespace Stryker.Configuration.Mutators { public class ObjectCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs index 5d2e8a3786..05c0e50584 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Base Mutator implementation for expressions with patterns public abstract class PatternMutatorBase : MutatorBase where T : ExpressionSyntax diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs index 7eff54a584..6d6cd1d98f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class PostfixUnaryMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs index 1aaa6d4192..ded9ccd5ff 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class PrefixUnaryMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs index ac083068ba..a8674840d1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs @@ -2,15 +2,15 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; using Stryker.RegexMutators; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class RegexMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs index f4bc21104e..d444cadbc5 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class StatementMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs index 7730218596..85cc6ea80b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// /// Mutator that will mutate: diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs index f7aa80e43c..e28d6697e1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Mutator Implementation for String method Mutations public class StringMethodMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs index f2fe819e25..d1c3dd5b1b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs @@ -1,12 +1,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System; using System.Collections.Generic; using System.Text.RegularExpressions; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; public class StringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs index 1e732b7c44..ff65db03a7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs @@ -2,9 +2,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Mutators; +namespace Stryker.Configuration.Mutators; /// Mutator implementation for switch expression public class SwitchExpressionMutator : PatternMutatorBase diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs index 5bba4a5338..fec9d165ac 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public class CsharpFileLeaf : ProjectComponent, IFileLeaf { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs index 19e9f32e8a..2ea225a517 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public class CsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs index 2af9f742ba..5606543c42 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public interface IReadOnlyFolderComposite : IProjectComponent { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs index 7a44d72d90..2f286c6fda 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs @@ -1,8 +1,8 @@ using FSharp.Compiler.Syntax; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; using System.Collections.Generic; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public class FsharpFileLeaf : ProjectComponent, IFileLeaf { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs index b6b5e7b363..cc7e317dac 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public class FsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs index ea718e96a8..1cc7d61a9a 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public enum Health { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs index c56e1e047d..3d2479fd35 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public interface IReadOnlyFileLeaf : IReadOnlyProjectComponent { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs index 3eab76043b..68fe5ca05f 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.Options; using Stryker.Core.Mutants; -using Stryker.Core.Options; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public delegate void Display(IReadOnlyProjectComponent current); @@ -23,7 +24,7 @@ public interface IReadOnlyProjectComponent IEnumerable IgnoredMutants(); IEnumerable NotRunMutants(); - Health CheckHealth(Thresholds threshold); + Health CheckHealth(IThresholds threshold); IEnumerable GetAllFiles(); void Display(); double GetMutationScore(); @@ -87,7 +88,7 @@ public IEnumerable DetectedMutants() => Mutants /// double between 0 and 1 or NaN when no score could be calculated public double GetMutationScore() => DetectedMutants().Count() / (double)ValidMutants().Count(); - public Health CheckHealth(Thresholds threshold) + public Health CheckHealth(IThresholds threshold) { var mutationScore = GetMutationScore(); if (double.IsNaN(mutationScore)) diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs index d3b9686e9f..b1b3f39852 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Helpers; +using Stryker.Configuration.Helpers; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { /// /// Contains extension methods for project components. diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs index 9bdde16a5f..d5d84f8788 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.ProjectComponents +namespace Stryker.Configuration.ProjectComponents { public class Solution : ProjectComponent, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs index 376add176a..1076a8f033 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Buildalyzer; -using Stryker.Core.Initialisation; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.InjectedHelpers; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.InjectedHelpers; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.ProjectComponents.SourceProjects; +namespace Stryker.Configuration.ProjectComponents.SourceProjects; public class SourceProjectInfo : IProjectAndTests { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs index 0e615ad607..9bdc0ae606 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs @@ -1,7 +1,7 @@ using System; using Microsoft.CodeAnalysis; -namespace Stryker.Core.ProjectComponents.TestProjects +namespace Stryker.Configuration.ProjectComponents.TestProjects { public sealed class TestCase : IEquatable { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs index 2f7981f8f0..23ad2e2f6d 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs @@ -3,7 +3,7 @@ using System.Linq; using Microsoft.CodeAnalysis; -namespace Stryker.Core.ProjectComponents.TestProjects +namespace Stryker.Configuration.ProjectComponents.TestProjects { public sealed class TestFile : IEquatable { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs index 12415ca805..41df846b78 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs @@ -6,10 +6,10 @@ using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.Exceptions; -using Stryker.Core.MutantFilters.Extensions; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.MutantFilters.Extensions; -namespace Stryker.Core.ProjectComponents.TestProjects +namespace Stryker.Configuration.ProjectComponents.TestProjects { public sealed class TestProject : IEquatable { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs index ef2cda16c2..a776de4d73 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -4,10 +4,10 @@ using System.Linq; using Buildalyzer; using Microsoft.Extensions.Logging; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; -namespace Stryker.Core.ProjectComponents.TestProjects; +namespace Stryker.Configuration.ProjectComponents.TestProjects; public class TestProjectsInfo { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs index f0c56d4139..54b7f74006 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs @@ -1,12 +1,13 @@ using System.Collections.Generic; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { public class BaselineReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs index bfabe4936f..25b9b26077 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs @@ -2,11 +2,12 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { /// /// Broadcasts the report calls to all reporters in the list diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs index 76e2c1b308..bfbdceb6f4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs @@ -2,22 +2,25 @@ using System.Linq; using Spectre.Console; using Spectre.Console.Rendering; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; - -namespace Stryker.Core.Reporters +using Stryker.Configuration; +using Stryker.Configuration.Options; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.Reporters { /// /// The clear text reporter, prints a table with results. /// public class ClearTextReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IAnsiConsole _console; - public ClearTextReporter(StrykerOptions strykerOptions, IAnsiConsole console = null) + public ClearTextReporter(IStrykerOptions strykerOptions, IAnsiConsole console = null) { _options = strykerOptions; _console = console ?? AnsiConsole.Console; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs index cb342d73e6..566b29ef8a 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs @@ -3,12 +3,13 @@ using System.Linq; using System.Text; using Spectre.Console; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { /// /// The clear text tree reporter, prints a tree structure with results. diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs index d1d140e9a4..e21f056edf 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using Spectre.Console; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { /// /// The default reporter, prints a simple progress by printing dots diff --git a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs index 1446548e8e..25258473bb 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs @@ -2,18 +2,19 @@ using System.Linq; using Microsoft.Extensions.Logging; using Spectre.Console; -using Stryker.Core.Clients; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.WebBrowserOpener; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Clients; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.WebBrowserOpener; +using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { public class DashboardReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs index d656e82696..eea4eeac2c 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs @@ -1,10 +1,10 @@ using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { public class FilteredMutantsLogger { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs index dbc5c3d4f5..8492c8f118 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs @@ -3,16 +3,17 @@ using System.IO.Abstractions; using System.Linq; using Spectre.Console; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.Options.Inputs; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Html.RealTime; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.WebBrowserOpener; - -namespace Stryker.Core.Reporters.Html; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Options.Inputs; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Html.RealTime; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.WebBrowserOpener; +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.Reporters.Html; public class HtmlReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs index 20e9303a3f..47a2a5c32b 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace Stryker.Core.Reporters.Html.RealTime.Events; +namespace Stryker.Configuration.Reporters.Html.RealTime.Events; public class SseEvent { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs index 6b068cdf26..6b74cec5f5 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Core.Reporters.Html.RealTime.Events; +namespace Stryker.Configuration.Reporters.Html.RealTime.Events; public enum SseEventType { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs index 4d2064843b..4b87886ed3 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Reporters.Html.RealTime; +namespace Stryker.Configuration.Reporters.Html.RealTime; public interface IRealTimeMutantHandler { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs index cf559a59c4..d0db9b0ccd 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Html.RealTime.Events; -namespace Stryker.Core.Reporters.Html.RealTime; +namespace Stryker.Configuration.Reporters.Html.RealTime; public interface ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs index e4c3b29ff6..e80aad48fb 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Html.RealTime.Events; -using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Json.SourceFiles; -namespace Stryker.Core.Reporters.Html.RealTime; +namespace Stryker.Configuration.Reporters.Html.RealTime; public class RealTimeMutantHandler : IRealTimeMutantHandler { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs index d6cd5e4880..e642af419f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs @@ -5,9 +5,9 @@ using System.Net; using System.Net.Sockets; using System.Threading.Tasks; -using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Configuration.Reporters.Html.RealTime.Events; -namespace Stryker.Core.Reporters.Html.RealTime; +namespace Stryker.Configuration.Reporters.Html.RealTime; public class SseServer : ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs index 4ab60538c6..6f0671b7da 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs @@ -1,19 +1,20 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; -using Stryker.Core.Reporters.Json.SourceFiles; -using Stryker.Core.Reporters.Json.TestFiles; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporters.Json.TestFiles; +using Stryker.Configuration.Reporting; +using Stryker.Configuration; +using Stryker.Reporters.Json.SourceFiles; -namespace Stryker.Core.Reporters.Json +namespace Stryker.Configuration.Reporters.Json { - public class JsonReport + public class JsonReport : IJsonReport { public string SchemaVersion { get; init; } = "2"; public IDictionary Thresholds { get; init; } = new Dictionary(); public string ProjectRoot { get; init; } - public IDictionary Files { get; init; } = new Dictionary(); + public IDictionary Files { get; init; } = new Dictionary(); public IDictionary TestFiles { get; set; } = null; public JsonReport() { } @@ -31,9 +32,9 @@ private JsonReport(StrykerOptions options, IReadOnlyProjectComponent mutationRep public static JsonReport Build(StrykerOptions options, IReadOnlyProjectComponent mutationReport, TestProjectsInfo testProjectsInfo) => new(options, mutationReport, testProjectsInfo); - private IDictionary GenerateReportComponents(IReadOnlyProjectComponent component) + private IDictionary GenerateReportComponents(IReadOnlyProjectComponent component) { - var files = new Dictionary(); + var files = new Dictionary(); if (component is IReadOnlyFolderComposite folder) { Merge(files, GenerateFolderReportComponents(folder)); @@ -46,9 +47,9 @@ private IDictionary GenerateReportComponents(IReadOnlyProjec return files; } - private IDictionary GenerateFolderReportComponents(IReadOnlyFolderComposite folderComponent) + private IDictionary GenerateFolderReportComponents(IReadOnlyFolderComposite folderComponent) { - var files = new Dictionary(); + var files = new Dictionary(); foreach (var child in folderComponent.Children) { Merge(files, GenerateReportComponents(child)); @@ -57,7 +58,7 @@ private IDictionary GenerateFolderReportComponents(IReadOnly return files; } - private static IDictionary GenerateFileReportComponents(IReadOnlyFileLeaf fileComponent) => new Dictionary { { fileComponent.FullPath, new SourceFile(fileComponent) } }; + private static IDictionary GenerateFileReportComponents(IReadOnlyFileLeaf fileComponent) => new Dictionary { { fileComponent.FullPath, new SourceFile(fileComponent) } }; private void AddTestFiles(TestProjectsInfo testProjectsInfo) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index 7c8d8acd11..2387ee97ca 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; -namespace Stryker.Core.Reporters.Json +namespace Stryker.Configuration.Reporters.Json { internal static class JsonReportSerialization { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs index e1fb212e8c..08f3a908cf 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs @@ -2,12 +2,13 @@ using System.IO; using System.IO.Abstractions; using Spectre.Console; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters.Json +namespace Stryker.Configuration.Reporters.Json { public partial class JsonReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs index b0934279d5..f451827907 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs @@ -1,11 +1,12 @@ using Microsoft.CodeAnalysis; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters.Json +namespace Stryker.Configuration.Reporters.Json { - public class Location + public class Location : ILocation { - public Position Start { get; init; } - public Position End { get; init; } + public IPosition Start { get; init; } + public IPosition End { get; init; } public Location() { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs index 52b2e2c421..ec810b1182 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs @@ -1,8 +1,9 @@ using System; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters.Json +namespace Stryker.Configuration.Reporters.Json { - public class Position + public class Position : IPosition { private int _line; public int Line diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs index 390198d9a7..24e63cfd42 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs @@ -1,17 +1,17 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters.Json.SourceFiles +namespace Stryker.Configuration.Reporters.Json.SourceFiles { - public class JsonMutant + public class JsonMutant : IJsonMutant { public string Id { get; init; } public string MutatorName { get; init; } public string Description { get; init; } public string Replacement { get; init; } - public Location Location { get; init; } + public ILocation Location { get; init; } public string Status { get; init; } public string StatusReason { get; init; } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs index a1070bd544..3ba29a3a79 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs @@ -1,15 +1,17 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.ProjectComponents; +using Stryker.Configuration.Logging; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters.Json.SourceFiles +namespace Stryker.Reporters.Json.SourceFiles { - public class SourceFile + public class SourceFile : ISourceFile { public string Language { get; init; } public string Source { get; init; } - public ISet Mutants { get; init; } + public ISet Mutants { get; init; } public SourceFile() { } @@ -19,7 +21,7 @@ public SourceFile(IReadOnlyFileLeaf file, ILogger logger = null) Source = file.SourceCode; Language = "cs"; - Mutants = new HashSet(new UniqueJsonMutantComparer()); + Mutants = new HashSet(new UniqueJsonMutantComparer()); foreach (var mutant in file.Mutants) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs new file mode 100644 index 0000000000..7dacf49203 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs @@ -0,0 +1,40 @@ + +using System; +using Stryker.Configuration.Reporting; + +namespace Stryker.Configuration.Reporters.Json.TestFiles +{ + public sealed class JsonTest : IEquatable, IJsonTest + { + public string Id { get; } + public string Name { get; set; } + public ILocation Location { get; set; } + + public JsonTest(string id) => Id = id; + + public bool Equals(IJsonTest other) + { + if (ReferenceEquals(null, other)) + return false; + if (ReferenceEquals(this, other)) + return true; + return Id == other.Id; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) + return false; + if (ReferenceEquals(this, obj)) + return true; + return obj.GetType() == GetType() && Equals((JsonTest)obj); + } + + public override int GetHashCode() => Id != null ? Id.GetHashCode() : 0; + + public static bool operator ==(JsonTest left, JsonTest right) => Equals(left, right); + + public static bool operator !=(JsonTest left, JsonTest right) => !Equals(left, right); + + } +} diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs index df416615bf..494e1d2a17 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Reporters.Json.TestFiles +namespace Stryker.Configuration.Reporters.Json.TestFiles { - public class JsonTestFile + public class JsonTestFile : IJsonTestFile { public string Language { get; init; } public string Source { get; init; } - public ISet Tests { get; set; } + public ISet Tests { get; set; } public JsonTestFile() { } @@ -16,7 +16,7 @@ public JsonTestFile(TestFile testFile) { Source = testFile?.Source; Language = "cs"; - Tests = new HashSet(); + Tests = new HashSet(); AddTestFile(testFile); } @@ -25,7 +25,7 @@ public void AddTestFile(TestFile testFile) { foreach (var test in testFile?.Tests ?? Enumerable.Empty()) { - Tests.Add(new Test(test.Id.ToString()) + Tests.Add(new JsonTest(test.Id.ToString()) { Name = test.Name, Location = new Location(test.Node.GetLocation().GetMappedLineSpan()) diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/Test.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/Test.cs deleted file mode 100644 index 3a6a6d8d78..0000000000 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/Test.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using System; - -namespace Stryker.Core.Reporters.Json.TestFiles -{ - public sealed class Test : IEquatable - { - public string Id { get; } - public string Name { get; set; } - public Location Location { get; set; } - - public Test(string id) => Id = id; - - public bool Equals(Test other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return Id == other.Id; - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - return obj.GetType() == GetType() && Equals((Test)obj); - } - - public override int GetHashCode() => Id != null ? Id.GetHashCode() : 0; - - public static bool operator ==(Test left, Test right) => Equals(left, right); - - public static bool operator !=(Test left, Test right) => !Equals(left, right); - - } -} diff --git a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs index 2f8066fb56..9f87fea896 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs @@ -5,12 +5,13 @@ using System.Linq; using Grynwald.MarkdownGenerator; using Spectre.Console; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { /// /// Markdown result table reporter. diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs index ae730a1c72..7a60724a56 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs @@ -1,7 +1,7 @@ using ShellProgressBar; using System; -namespace Stryker.Core.Reporters.Progress +namespace Stryker.Configuration.Reporters.Progress { public interface IProgressBar { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs index f2e001b4a2..8446cd997e 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs @@ -1,8 +1,8 @@ using System; using Spectre.Console; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.Reporters.Progress +namespace Stryker.Configuration.Reporters.Progress { public interface IProgressBarReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs index bfc6d9e2f5..2a1e899ebf 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; -using Stryker.Core.ProjectComponents; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.ProjectComponents.TestProjects; -namespace Stryker.Core.Reporters.Progress +namespace Stryker.Configuration.Reporters.Progress { public class ProgressReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs index c7106e01d3..0359bfa569 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Core.Reporters.Progress +namespace Stryker.Configuration.Reporters.Progress { public interface IStopWatchProvider { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs index 0b6090a382..716b3b60db 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { public enum Reporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs index ba0c56d29d..f696996b5f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs @@ -1,12 +1,13 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Options; -using Stryker.Core.Reporters.Html; -using Stryker.Core.Reporters.Json; -using Stryker.Core.Reporters.Progress; +using Stryker.Configuration.Baseline.Providers; +using Stryker.Configuration; +using Stryker.Configuration.Reporters.Html; +using Stryker.Configuration.Reporters.Json; +using Stryker.Configuration.Reporters.Progress; +using Stryker.Configuration.Reporting; -namespace Stryker.Core.Reporters +namespace Stryker.Configuration.Reporters { public interface IReporterFactory { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs index e2bbfd98db..53ec6d3318 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs @@ -3,9 +3,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; +using Stryker.Configuration.Logging; -namespace Stryker.Core.Reporters.WebBrowserOpener +namespace Stryker.Configuration.Reporters.WebBrowserOpener { [ExcludeFromCodeCoverage] public class CrossPlatformBrowserOpener : IWebbrowserOpener diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs index ff67b9c3d1..d99fd050df 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Core.Reporters.WebBrowserOpener +namespace Stryker.Configuration.Reporters.WebBrowserOpener { public interface IWebbrowserOpener { diff --git a/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj b/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj index 064f47427c..9f869b6058 100644 --- a/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj +++ b/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj @@ -84,7 +84,9 @@ + + diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs index 9ca577f80d..bdbe24b632 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Options; +using Stryker.Configuration; -namespace Stryker.Core +namespace Stryker.Configuration { public class StrykerRunResult { diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs index d025014c73..cd083aaf77 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs @@ -5,16 +5,17 @@ using System.Diagnostics; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.MutationTest; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents; -using Stryker.Core.Reporters; - -namespace Stryker.Core +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.MutationTest; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents; +using Stryker.Configuration.Reporters; +using Stryker.Configuration.Options; + +namespace Stryker.Configuration { public interface IStrykerRunner { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs index de9024000a..032efc0493 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Core.TestRunners +namespace Stryker.Configuration.TestRunners { public enum CoverageConfidence { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs index 46aa167b8e..897728557a 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Core.TestRunners +namespace Stryker.Configuration.TestRunners { [Flags] public enum TestFrameworks diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs index 511632e92b..76615199c5 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Mutants; -using Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Mutants; +using Stryker.Configuration.TestRunners.VsTest; -namespace Stryker.Core.TestRunners +namespace Stryker.Configuration.TestRunners { public class TestRunResult { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs index 3922c53370..479c4f1ebd 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { public class DiscoveryEventHandler : ITestDiscoveryEventsHandler { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs index 9810eaf19a..38bef8f0fa 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs @@ -10,7 +10,7 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { public interface IRunResults { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs index f2a2a10b7d..3ad78c5d7c 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs @@ -1,12 +1,12 @@ using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces; -using Stryker.Core.Logging; +using Stryker.Configuration.Logging; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Threading; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { public interface IStrykerTestHostLauncher : ITestHostLauncher { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs index b89480412e..86f5054f3d 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs @@ -17,7 +17,7 @@ using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { internal class TestRun { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs index c5c18fd1df..3a5b834051 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs @@ -7,14 +7,14 @@ using Microsoft.TestPlatform.VsTestConsole.TranslationLayer; using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Serilog.Events; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ToolHelpers; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ToolHelpers; using Stryker.DataCollector; -namespace Stryker.Core.TestRunners.VsTest; +namespace Stryker.Configuration.TestRunners.VsTest; /// /// Handles VsTest setup and configuration. diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs index c09d871397..edf817c521 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Core.Mutants; +using Stryker.Configuration.Mutants; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { public sealed class VsTestDescription { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs index f6635136ba..0743769997 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs @@ -6,14 +6,14 @@ using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Stryker.Core.Exceptions; -using Stryker.Core.Initialisation; -using Stryker.Core.Initialisation.Buildalyzer; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; - -namespace Stryker.Core.TestRunners.VsTest; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; + +namespace Stryker.Configuration.TestRunners.VsTest; public sealed class VsTestRunner : IDisposable { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs index 7a0d04efcc..93cb1a0bc1 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs @@ -8,14 +8,14 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Core.Initialisation; -using Stryker.Core.Logging; -using Stryker.Core.Mutants; -using Stryker.Core.Options; -using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Configuration.Initialisation; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Mutants; +using Stryker.Configuration; +using Stryker.Configuration.ProjectComponents.TestProjects; using Stryker.DataCollector; -namespace Stryker.Core.TestRunners.VsTest +namespace Stryker.Configuration.TestRunners.VsTest { public sealed class VsTestRunnerPool : ITestRunner { diff --git a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs index 25384eca97..4acd9019e8 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Buildalyzer; -namespace Stryker.Core.Testing +namespace Stryker.Configuration.Testing { /// /// This is an interface to mock buildalyzer classes diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs index 75477fe8c3..007a37be76 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; -namespace Stryker.Core.Testing +namespace Stryker.Configuration.Testing { /// /// Used for mocking System.Process diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs index a950725c47..50dd7865de 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs @@ -9,7 +9,7 @@ using System.IO; using System.Runtime.InteropServices; -namespace Stryker.Core.Testing +namespace Stryker.Configuration.Testing { // integration with OS [ExcludeFromCodeCoverage] diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs index 89eb5fb8e6..c716acf02d 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Stryker.Core.Testing +namespace Stryker.Configuration.Testing { [ExcludeFromCodeCoverage] public class ProcessResult diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs b/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs index fe69c3cdde..220dbbd3d2 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs +++ b/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs @@ -3,10 +3,10 @@ using System.IO.Abstractions; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Core.Logging; -using Stryker.Core.Testing; +using Stryker.Configuration.Logging; +using Stryker.Configuration.Testing; -namespace Stryker.Core.ToolHelpers; +namespace Stryker.Configuration.ToolHelpers; public class MsBuildHelper { diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs b/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs index d5cd461cd0..12bbd8dd15 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs @@ -9,9 +9,9 @@ using System.Runtime.InteropServices; using Microsoft.Extensions.Logging; using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; -using Stryker.Core.Logging; +using Stryker.Configuration.Logging; -namespace Stryker.Core.ToolHelpers +namespace Stryker.Configuration.ToolHelpers { public interface IVsTestHelper { diff --git a/src/Stryker.Core/Stryker.Core/packages.lock.json b/src/Stryker.Core/Stryker.Core/packages.lock.json index b05981cffc..61b2a985bf 100644 --- a/src/Stryker.Core/Stryker.Core/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core/packages.lock.json @@ -1559,6 +1559,25 @@ "resolved": "21.0.26", "contentHash": "6XwIymB/HIHdu4UAWcW+kP1Q4untd4T01leOfPYObKzwoqKOfXTw6GneBpQZ5TLAq9TUc2yS4j6asK2e2NNXog==" }, + "stryker.abstractions": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", + "Serilog": "[4.0.0, )" + } + }, + "stryker.configuration": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", + "Serilog": "[4.0.0, )", + "Stryker.Abstractions": "[1.0.0, )" + } + }, "stryker.datacollector": { "type": "Project", "dependencies": { diff --git a/src/Stryker.Core/Stryker.Core/ExclusionPattern.cs b/src/Stryker.Options/ExclusionPattern.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/ExclusionPattern.cs rename to src/Stryker.Options/ExclusionPattern.cs index 1dd75a2dfc..359f6e1223 100644 --- a/src/Stryker.Core/Stryker.Core/ExclusionPattern.cs +++ b/src/Stryker.Options/ExclusionPattern.cs @@ -4,9 +4,9 @@ using System.Text.RegularExpressions; using DotNet.Globbing; -namespace Stryker.Core +namespace Stryker.Configuration.Options { - public readonly struct ExclusionPattern + public readonly struct ExclusionPattern : IExclusionPattern { private static readonly Regex _mutantSpanGroupRegex = new("(\\{(\\d+)\\.\\.(\\d+)\\})+$"); private static readonly Regex _mutantSpanRegex = new Regex("\\{(\\d+)\\.\\.(\\d+)\\}"); diff --git a/src/Stryker.Core/Stryker.Core/FilePathUtils.cs b/src/Stryker.Options/FilePathUtils.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/FilePathUtils.cs rename to src/Stryker.Options/FilePathUtils.cs index 26bd924696..1785f783e0 100644 --- a/src/Stryker.Core/Stryker.Core/FilePathUtils.cs +++ b/src/Stryker.Options/FilePathUtils.cs @@ -1,6 +1,4 @@ -using System.IO; - -namespace Stryker.Core +namespace Stryker.Configuration { public static class FilePathUtils { diff --git a/src/Stryker.Core/Stryker.Core/Options/BooleanValidationExtensions.cs b/src/Stryker.Options/Options/BooleanValidationExtensions.cs similarity index 87% rename from src/Stryker.Core/Stryker.Core/Options/BooleanValidationExtensions.cs rename to src/Stryker.Options/Options/BooleanValidationExtensions.cs index 0723155a1e..fc93c07af7 100644 --- a/src/Stryker.Core/Stryker.Core/Options/BooleanValidationExtensions.cs +++ b/src/Stryker.Options/Options/BooleanValidationExtensions.cs @@ -1,6 +1,4 @@ -using System.Linq; - -namespace Stryker.Core.Options +namespace Stryker.Configuration.Options { public static class BooleanValidationExtensions { diff --git a/src/Stryker.Core/Stryker.Core/Options/InputDefinition.cs b/src/Stryker.Options/Options/InputDefinition.cs similarity index 97% rename from src/Stryker.Core/Stryker.Core/Options/InputDefinition.cs rename to src/Stryker.Options/Options/InputDefinition.cs index 012b68500b..1ee6f171e2 100644 --- a/src/Stryker.Core/Stryker.Core/Options/InputDefinition.cs +++ b/src/Stryker.Options/Options/InputDefinition.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -namespace Stryker.Core.Options +namespace Stryker.Configuration.Options { public interface IInput { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/AdditionalTimeoutInput.cs b/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs similarity index 90% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/AdditionalTimeoutInput.cs rename to src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs index f2dc0acb26..4c462193ab 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/AdditionalTimeoutInput.cs +++ b/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class AdditionalTimeoutInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageSasInput.cs b/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageSasInput.cs rename to src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs index b1bc98581b..b14de5d710 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageSasInput.cs +++ b/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs @@ -1,9 +1,9 @@ using System.Linq; using System.Web; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class AzureFileStorageSasInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageUrlInput.cs b/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs similarity index 90% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageUrlInput.cs rename to src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs index cce0417620..16d6451f58 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/AzureFileStorageUrlInput.cs +++ b/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs @@ -1,8 +1,8 @@ using System; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class AzureFileStorageUrlInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/BasePathInput.cs b/src/Stryker.Options/Options/Inputs/BasePathInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/BasePathInput.cs rename to src/Stryker.Options/Options/Inputs/BasePathInput.cs index 667e4c29b2..3fe7c70f33 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/BasePathInput.cs +++ b/src/Stryker.Options/Options/Inputs/BasePathInput.cs @@ -1,8 +1,8 @@ using System.IO; using System.IO.Abstractions; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class BasePathInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineProviderInput.cs b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineProviderInput.cs rename to src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs index 7d7171e563..dbbce92cd7 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/BaselineProviderInput.cs +++ b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Reporters; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Reporters; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class BaselineProviderInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/BreakOnInitialTestFailureInput.cs b/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs similarity index 88% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/BreakOnInitialTestFailureInput.cs rename to src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs index ff11c0d3af..9988b3fe4b 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/BreakOnInitialTestFailureInput.cs +++ b/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class BreakOnInitialTestFailureInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ConcurrencyInput.cs b/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ConcurrencyInput.cs rename to src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs index 2fb2f2f443..0dd8426b73 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ConcurrencyInput.cs +++ b/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs @@ -1,9 +1,9 @@ using System; using Microsoft.Extensions.Logging; -using Stryker.Core.Exceptions; -using Stryker.Core.Logging; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Logging; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ConcurrencyInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ConfigurationInput.cs b/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs similarity index 85% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ConfigurationInput.cs rename to src/Stryker.Options/Options/Inputs/ConfigurationInput.cs index 112e930f79..bc55d692b9 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ConfigurationInput.cs +++ b/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs @@ -1,7 +1,7 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs; +namespace Stryker.Configuration.Options.Inputs; public class ConfigurationInput : Input { public override string Default => null; diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/CoverageAnalysisInput.cs b/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/CoverageAnalysisInput.cs rename to src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs index 874ce29d31..341a0d2922 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/CoverageAnalysisInput.cs +++ b/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Text; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Options; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class CoverageAnalysisInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardApiKeyInput.cs b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs similarity index 90% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardApiKeyInput.cs rename to src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs index 8923a47d32..586306a4f4 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardApiKeyInput.cs +++ b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Exceptions; -using Stryker.Core.Reporters; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Reporters; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class DashboardApiKeyInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardUrlInput.cs b/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs similarity index 90% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardUrlInput.cs rename to src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs index a890ef494e..98b7a15371 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DashboardUrlInput.cs +++ b/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class DashboardUrlInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DevModeInput.cs b/src/Stryker.Options/Options/Inputs/DevModeInput.cs similarity index 90% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DevModeInput.cs rename to src/Stryker.Options/Options/Inputs/DevModeInput.cs index 5670289623..b9c03dafc6 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DevModeInput.cs +++ b/src/Stryker.Options/Options/Inputs/DevModeInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class DevModeInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs similarity index 96% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs rename to src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs index 805ac68822..628c325e67 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DiffIgnoreChangesInput.cs +++ b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class DiffIgnoreChangesInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DisableBailInput.cs b/src/Stryker.Options/Options/Inputs/DisableBailInput.cs similarity index 85% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DisableBailInput.cs rename to src/Stryker.Options/Options/Inputs/DisableBailInput.cs index dc66468695..88f3b8a0c6 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DisableBailInput.cs +++ b/src/Stryker.Options/Options/Inputs/DisableBailInput.cs @@ -1,4 +1,6 @@ -namespace Stryker.Core.Options.Inputs +using Stryker.Configuration.Options; + +namespace Stryker.Configuration.Options.Inputs { public class DisableBailInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/DisableMixMutantsInput.cs b/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs similarity index 85% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/DisableMixMutantsInput.cs rename to src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs index 1a9ef309c8..7810eeb81f 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/DisableMixMutantsInput.cs +++ b/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs @@ -1,4 +1,6 @@ -namespace Stryker.Core.Options.Inputs +using Stryker.Configuration.Options; + +namespace Stryker.Configuration.Options.Inputs { public class DisableMixMutantsInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/FallbackVersionInput.cs b/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs similarity index 91% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/FallbackVersionInput.cs rename to src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs index f4710a2519..671ff1b34c 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/FallbackVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class FallbackVersionInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMethodsInput.cs b/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMethodsInput.cs rename to src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs index 62c38adcf2..e999eb74ef 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMethodsInput.cs +++ b/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class IgnoreMethodsInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMutationsInput.cs b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs similarity index 96% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMutationsInput.cs rename to src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs index fd3bfe697a..d23bddd042 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/IgnoreMutationsInput.cs +++ b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutators; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class IgnoreMutationsInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/LanguageVersionInput.cs b/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/LanguageVersionInput.cs rename to src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs index a487c7fb66..5e3e1adc09 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/LanguageVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; using System; using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class LanguageVersionInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/LogToFileInput.cs b/src/Stryker.Options/Options/Inputs/LogToFileInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/LogToFileInput.cs rename to src/Stryker.Options/Options/Inputs/LogToFileInput.cs index da3907420e..664be1c055 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/LogToFileInput.cs +++ b/src/Stryker.Options/Options/Inputs/LogToFileInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class LogToFileInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ModuleNameInput.cs b/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs similarity index 88% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ModuleNameInput.cs rename to src/Stryker.Options/Options/Inputs/ModuleNameInput.cs index f067613820..8a9432a118 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ModuleNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ModuleNameInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/MsBuildPathInput.cs b/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/MsBuildPathInput.cs rename to src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs index ee2566360c..54fe8eab4f 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/MsBuildPathInput.cs +++ b/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs @@ -4,9 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class MsBuildPathInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/MutateInput.cs b/src/Stryker.Options/Options/Inputs/MutateInput.cs similarity index 97% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/MutateInput.cs rename to src/Stryker.Options/Options/Inputs/MutateInput.cs index 48697d686a..8430af6d6a 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/MutateInput.cs +++ b/src/Stryker.Options/Options/Inputs/MutateInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class MutateInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/MutationLevelInput.cs b/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/MutationLevelInput.cs rename to src/Stryker.Options/Options/Inputs/MutationLevelInput.cs index 937b5a165d..238f0a0df1 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/MutationLevelInput.cs +++ b/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Stryker.Core.Exceptions; -using Stryker.Core.Mutators; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Mutators; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class MutationLevelInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportEnabledInput.cs b/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs similarity index 82% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportEnabledInput.cs rename to src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs index 504ae30baa..4d17e6477c 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportEnabledInput.cs +++ b/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class OpenReportEnabledInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportInput.cs b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportInput.cs rename to src/Stryker.Options/Options/Inputs/OpenReportInput.cs index dfdeeb0091..820ed028ff 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/OpenReportInput.cs +++ b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public enum ReportType { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/OutputPathInput.cs b/src/Stryker.Options/Options/Inputs/OutputPathInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/OutputPathInput.cs rename to src/Stryker.Options/Options/Inputs/OutputPathInput.cs index d7083be8d4..92ab15b5ab 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/OutputPathInput.cs +++ b/src/Stryker.Options/Options/Inputs/OutputPathInput.cs @@ -1,7 +1,7 @@ using System.IO.Abstractions; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class OutputPathInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectNameInput.cs b/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs similarity index 91% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectNameInput.cs rename to src/Stryker.Options/Options/Inputs/ProjectNameInput.cs index 8e70e0260c..82d8e305cc 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ProjectNameInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectVersionInput.cs b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs similarity index 87% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectVersionInput.cs rename to src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs index 166ff79369..a05d8962c2 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ProjectVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Core.Exceptions; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Reporters; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ProjectVersionInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ReportFileNameInput.cs b/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ReportFileNameInput.cs rename to src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs index 9861b7042f..b13d050012 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ReportFileNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; using System.IO.Abstractions; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ReportFileNameInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ReportersInput.cs b/src/Stryker.Options/Options/Inputs/ReportersInput.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ReportersInput.cs rename to src/Stryker.Options/Options/Inputs/ReportersInput.cs index ab5cfcf548..e7dc3bbe84 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ReportersInput.cs +++ b/src/Stryker.Options/Options/Inputs/ReportersInput.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Core.Exceptions; -using Stryker.Core.Reporters; +using Stryker.Configuration.Exceptions; +using Stryker.Configuration.Reporters; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ReportersInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/SinceInput.cs b/src/Stryker.Options/Options/Inputs/SinceInput.cs similarity index 87% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/SinceInput.cs rename to src/Stryker.Options/Options/Inputs/SinceInput.cs index b471bd828f..7c760dcefd 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/SinceInput.cs +++ b/src/Stryker.Options/Options/Inputs/SinceInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class SinceInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/SinceTargetInput.cs b/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/SinceTargetInput.cs rename to src/Stryker.Options/Options/Inputs/SinceTargetInput.cs index a2417a9584..f4c9291b01 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/SinceTargetInput.cs +++ b/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class SinceTargetInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/SolutionInput.cs b/src/Stryker.Options/Options/Inputs/SolutionInput.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/SolutionInput.cs rename to src/Stryker.Options/Options/Inputs/SolutionInput.cs index 2b9bcb63ea..cbaba5f421 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/SolutionInput.cs +++ b/src/Stryker.Options/Options/Inputs/SolutionInput.cs @@ -1,9 +1,9 @@ using System.IO.Abstractions; using System.Linq; using System.Text; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class SolutionInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/SourceProjectNameInput.cs b/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs similarity index 88% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/SourceProjectNameInput.cs rename to src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs index 9e5c33b181..5f872264a7 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/SourceProjectNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class SourceProjectNameInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/TargetFrameworkInput.cs b/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs similarity index 88% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/TargetFrameworkInput.cs rename to src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs index ebd098c130..723969d121 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/TargetFrameworkInput.cs +++ b/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs @@ -1,6 +1,6 @@ -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class TargetFrameworkInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/TestCaseFilterInput.cs b/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/TestCaseFilterInput.cs rename to src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs index ec36e8f5c4..19b0cac439 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/TestCaseFilterInput.cs +++ b/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class TestCaseFilterInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/TestProjectsInput.cs b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/TestProjectsInput.cs rename to src/Stryker.Options/Options/Inputs/TestProjectsInput.cs index c2fd0a276c..34c43b481a 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/TestProjectsInput.cs +++ b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs @@ -2,7 +2,7 @@ using System.IO; using System.Linq; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class TestProjectsInput : Input> { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdBreakInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdBreakInput.cs rename to src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs index ef5c4e4874..b36e85659b 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdBreakInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ThresholdBreakInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdHighInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs similarity index 91% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdHighInput.cs rename to src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs index dadf916cfb..8d94522ab7 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdHighInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ThresholdHighInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdLowInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdLowInput.cs rename to src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs index ef712ef644..9cb9081fd5 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/ThresholdLowInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class ThresholdLowInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/VerbosityInput.cs b/src/Stryker.Options/Options/Inputs/VerbosityInput.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/VerbosityInput.cs rename to src/Stryker.Options/Options/Inputs/VerbosityInput.cs index 94b422e42c..b2c30c72e9 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/VerbosityInput.cs +++ b/src/Stryker.Options/Options/Inputs/VerbosityInput.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using Serilog.Events; -using Stryker.Core.Exceptions; +using Stryker.Configuration.Exceptions; -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class VerbosityInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/Inputs/WithBaselineInput.cs b/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/Options/Inputs/WithBaselineInput.cs rename to src/Stryker.Options/Options/Inputs/WithBaselineInput.cs index 215c1a0148..103d8911b2 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Inputs/WithBaselineInput.cs +++ b/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core.Options.Inputs +namespace Stryker.Configuration.Options.Inputs { public class WithBaselineInput : Input { diff --git a/src/Stryker.Core/Stryker.Core/Options/LogOptions.cs b/src/Stryker.Options/Options/LogOptions.cs similarity index 62% rename from src/Stryker.Core/Stryker.Core/Options/LogOptions.cs rename to src/Stryker.Options/Options/LogOptions.cs index 295da554e7..e1ff8431c4 100644 --- a/src/Stryker.Core/Stryker.Core/Options/LogOptions.cs +++ b/src/Stryker.Options/Options/LogOptions.cs @@ -1,8 +1,8 @@ using Serilog.Events; -namespace Stryker.Core.Options +namespace Stryker.Configuration.Options { - public class LogOptions + public class LogOptions : ILogOptions { public bool LogToFile { get; init; } public LogEventLevel LogLevel { get; init; } diff --git a/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs b/src/Stryker.Options/Options/StrykerInputs.cs similarity index 98% rename from src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs rename to src/Stryker.Options/Options/StrykerInputs.cs index 004e999511..94bd54ddb9 100644 --- a/src/Stryker.Core/Stryker.Core/Options/StrykerInputs.cs +++ b/src/Stryker.Options/Options/StrykerInputs.cs @@ -1,8 +1,7 @@ -using System.IO.Abstractions; -using Stryker.Core.Mutators; -using Stryker.Core.Options.Inputs; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.Options +namespace Stryker.Configuration.Options { public interface IStrykerInputs { diff --git a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs b/src/Stryker.Options/Options/StrykerOptions.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs rename to src/Stryker.Options/Options/StrykerOptions.cs index 1879f91c1b..24e5ca5eb3 100644 --- a/src/Stryker.Core/Stryker.Core/Options/StrykerOptions.cs +++ b/src/Stryker.Options/Options/StrykerOptions.cs @@ -1,16 +1,15 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Text.RegularExpressions; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Core.Baseline.Providers; -using Stryker.Core.Mutators; -using Stryker.Core.Options.Inputs; -using Stryker.Core.Reporters; +using Stryker.Configuration; +using Stryker.Configuration.Baseline; +using Stryker.Configuration.Options; +using Stryker.Configuration.Reporting; +using Stryker.Configuration.Mutators; +using Stryker.Configuration.Options.Inputs; -namespace Stryker.Core.Options; +namespace Stryker.Configuration; -public class StrykerOptions +public class StrykerOptions : IStrykerOptions { /// /// A custom settable path to the msBuild exe for .NET Framework projects. When null stryker will search for the path itself. @@ -40,7 +39,7 @@ public class StrykerOptions /// In the context of a multi test project run this will be the root of the project under test /// public string WorkingDirectory { get => _workingDirectoryField ?? ProjectPath; init => _workingDirectoryField = value; } - + /// /// The path all output is written to. For example reports and logging files. /// @@ -64,7 +63,7 @@ public class StrykerOptions /// /// The configuration (in the VS sense) that should be used when building the project under test. /// - public string Configuration {get;init;} + public string Configuration { get; init; } /// /// The detected target framework for the current project under test. @@ -74,7 +73,7 @@ public class StrykerOptions /// /// The options passed to all logging systems /// - public LogOptions LogOptions { get; init; } + public ILogOptions LogOptions { get; init; } /// /// Mutators should be disabled when their level is higher than this mutation level. @@ -119,7 +118,7 @@ public class StrykerOptions /// /// The reports that should be activated when stryker is done testing. /// - public IEnumerable Reporters { get; init; } = []; + public IEnumerable Reporters { get; init; } = []; /// /// When true, the baseline feature should be enabled. @@ -129,7 +128,7 @@ public class StrykerOptions /// /// When the baseline feature is enabled, this selects the source of the baseline. /// - public BaselineProvider BaselineProvider { get; init; } + public IBaselineProvider BaselineProvider { get; init; } /// /// The url to connect to the Azure File Storage API @@ -166,7 +165,7 @@ public class StrykerOptions /// Context: When using the 'since' feature, all tests are run again if files in the test project change (as these could impact the test results) /// When the file is present in this option the tests should not run again as the file does not impact test results. /// - public IEnumerable DiffIgnoreChanges { get; init; } = Enumerable.Empty(); + public IEnumerable DiffIgnoreChanges { get; init; } = Enumerable.Empty(); /// /// When no previous report can be found for the 'since' feature, this commitish is used to se a baseline. @@ -224,8 +223,8 @@ public class StrykerOptions /// Instruct Stryker to break execution when at least one test failed on initial run. /// public bool BreakOnInitialTestFailure { get; set; } - + private readonly string _workingDirectoryField; - } +} diff --git a/src/Stryker.Core/Stryker.Core/Options/Thresholds.cs b/src/Stryker.Options/Options/Thresholds.cs similarity index 54% rename from src/Stryker.Core/Stryker.Core/Options/Thresholds.cs rename to src/Stryker.Options/Options/Thresholds.cs index 757f07e26e..4b4f67d02c 100644 --- a/src/Stryker.Core/Stryker.Core/Options/Thresholds.cs +++ b/src/Stryker.Options/Options/Thresholds.cs @@ -1,6 +1,8 @@ -namespace Stryker.Core.Options +using Stryker.Configuration.Options; + +namespace Stryker.Configuration { - public class Thresholds + public class Thresholds : IThresholds { public int High { get; init; } diff --git a/src/Stryker.Options/Stryker.Configuration.csproj b/src/Stryker.Options/Stryker.Configuration.csproj new file mode 100644 index 0000000000..2dfac21d34 --- /dev/null +++ b/src/Stryker.Options/Stryker.Configuration.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/src/Stryker.Options/packages.lock.json b/src/Stryker.Options/packages.lock.json new file mode 100644 index 0000000000..ff47969ff9 --- /dev/null +++ b/src/Stryker.Options/packages.lock.json @@ -0,0 +1,85 @@ +{ + "version": 2, + "dependencies": { + "net8.0": { + "DotNet.Glob": { + "type": "Direct", + "requested": "[3.1.3, )", + "resolved": "3.1.3", + "contentHash": "hOfHw7MLJw/tbXaFwR1oiDb+dIXDp8URTxp5Pco42OOhiw77wrUNx6v6syNygHZbWwYdXQocL2Mo1l5FnfDVjg==" + }, + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[1.2.4, )", + "resolved": "1.2.4", + "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Direct", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "7O4+dn0fNKykPpEB1i8/5EKzwD3fuu/shdbbnnsBmdiHMaBz6telOubDFwPwLQQ/PvOAWTFIWWTyAOmWvXRD2g==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Direct", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "iifqKy3KvCgPABHFbFlSxjEoE+OItZGuZ191NM/TWV750m1jMypr7BtrP65ET+OK2KNVupO8S8xCtxbNqw056A==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "Microsoft.CodeAnalysis.Common": "[4.10.0]", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + }, + "Serilog": { + "type": "Direct", + "requested": "[4.0.0, )", + "resolved": "4.0.0", + "contentHash": "2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } + }, + "stryker.abstractions": { + "type": "Project", + "dependencies": { + "DotNet.Glob": "[3.1.3, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", + "Serilog": "[4.0.0, )" + } + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "CentralTransitive", + "requested": "[3.3.4, )", + "resolved": "3.3.4", + "contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "CentralTransitive", + "requested": "[17.10.0, )", + "resolved": "17.10.0", + "contentHash": "KkwhjQevuDj0aBRoPLY6OLAhGqbPUEBuKLbaCs0kUVw29qiOYncdORd4mLVJbn9vGZ7/iFGQ/+AoJl0Tu5Umdg==", + "dependencies": { + "System.Reflection.Metadata": "1.6.0" + } + } + } + } +} \ No newline at end of file diff --git a/src/Stryker.sln b/src/Stryker.sln index 4a31b23236..37a0631c5d 100644 --- a/src/Stryker.sln +++ b/src/Stryker.sln @@ -35,6 +35,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipeline-templates", "pipel ..\pipeline-templates\update-package-lock-files-stage.yml = ..\pipeline-templates\update-package-lock-files-stage.yml EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stryker.Abstractions", "Stryker.Abstractions\Stryker.Abstractions.csproj", "{C9E6C641-94C1-41D2-BAA4-8BFE42749FBE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stryker.Configuration", "Stryker.Options\Stryker.Configuration.csproj", "{E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -69,6 +73,14 @@ Global {7C8C7670-4636-4C56-9E3E-22B987337EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C8C7670-4636-4C56-9E3E-22B987337EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C8C7670-4636-4C56-9E3E-22B987337EF2}.Release|Any CPU.Build.0 = Release|Any CPU + {C9E6C641-94C1-41D2-BAA4-8BFE42749FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9E6C641-94C1-41D2-BAA4-8BFE42749FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9E6C641-94C1-41D2-BAA4-8BFE42749FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9E6C641-94C1-41D2-BAA4-8BFE42749FBE}.Release|Any CPU.Build.0 = Release|Any CPU + {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 13b5fca9a88c7b8a23c6e43c03096a5888a8ac0d Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 30 Aug 2024 17:03:19 +0200 Subject: [PATCH 02/13] More refactors --- .../Baseline/BaselineProvider.cs | 2 +- .../Baseline/IBaselineProvider.cs | 4 +- .../Exceptions/CompilationException.cs | 2 +- .../Exceptions/GeneralStrykerException.cs | 2 +- .../Exceptions/InputException.cs | 2 +- .../Exceptions/NoTestProjectsException.cs | 2 +- src/Stryker.Abstractions/IMutant.cs | 22 + src/Stryker.Abstractions/IMutator.cs | 6 +- src/Stryker.Abstractions/IProjectAndTests.cs | 7 +- src/Stryker.Abstractions/IReadOnlyMutant.cs | 11 +- .../ITimeoutValueCalculator.cs | 2 +- src/Stryker.Abstractions/LinqExpression.cs | 2 +- src/Stryker.Abstractions/MutantStatus.cs | 2 +- src/Stryker.Abstractions/Mutation.cs | 4 +- src/Stryker.Abstractions/MutationLevel.cs | 2 +- src/Stryker.Abstractions/Mutator.cs | 33 +- .../Options/IExclusionPattern.cs | 2 +- .../Options/ILogOptions.cs | 2 +- .../Options/IStrykerOptions.cs | 12 +- .../Options/IThresholds.cs | 2 +- .../Options/OptimizationModes.cs | 2 +- .../Csharp/CsharpFileLeaf.cs | 37 -- .../Csharp/CsharpFolderComposite.cs | 9 - .../ProjectComponents/FolderComposite.cs | 68 --- .../Fsharp/FsharpFileLeaf.cs | 37 -- .../Fsharp/FsharpFolderComposite.cs | 9 - .../ProjectComponents/Health.cs | 2 +- .../ProjectComponents/IFileLeaf.cs | 2 +- .../{ => ProjectComponents}/IFilePattern.cs | 3 +- .../ProjectComponents/IProjectComponent.cs | 28 + .../IReadOnlyFolderComposite.cs | 8 + .../ProjectComponents/ITestCase.cs | 15 + .../ProjectComponents/ITestFile.cs | 16 + .../ProjectComponents/ITestProject.cs | 14 + .../ProjectComponents/ITestProjectsInfo.cs | 14 + .../ProjectComponents/ProjectComponent.cs | 122 ----- .../ProjectComponentsExtensions.cs | 40 -- .../ProjectComponents/Solution.cs | 42 -- .../SourceProjects/SourceProjectInfo.cs | 42 -- .../TestProjects/TestCase.cs | 18 - .../TestProjects/TestFile.cs | 37 -- .../TestProjects/TestProject.cs | 67 --- .../TestProjects/TestProjectsInfo.cs | 89 ---- .../Reporting/IJsonMutant.cs | 2 +- .../Reporting/IJsonReport.cs | 2 +- .../Reporting/IJsonTest.cs | 2 +- .../Reporting/IJsonTestFile.cs | 4 +- .../Reporting/ILocation.cs | 2 +- .../Reporting/IPosition.cs | 2 +- .../Reporting/IReporter.cs | 26 +- .../Reporting/ISourceFile.cs | 2 +- .../Reporting}/Reporter.cs | 2 +- .../Stryker.Abstractions.csproj | 7 + .../{TestRunners => Testing}/ITestGuids.cs | 5 +- src/Stryker.Abstractions/packages.lock.json | 502 +++++++++++++++++- .../CommandLineConfigReaderTests.cs | 4 +- .../ConfigBuilderTests.cs | 7 +- .../FileConfigReaderTests.cs | 10 +- .../Logging/InputBuilderTests.cs | 2 +- .../StrykerCLIInitCommandTests.cs | 4 +- .../Stryker.CLI.UnitTest/StrykerCLITests.cs | 14 +- .../Stryker.CLI.UnitTest/packages.lock.json | 9 +- .../Stryker.CLI/CommandLineConfig/CliInput.cs | 2 +- .../CommandLineConfigReader.cs | 6 +- src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs | 4 +- .../Stryker.CLI/FileConfigReader.cs | 4 +- .../Stryker.CLI/FileConfigWriter.cs | 2 +- .../Stryker.CLI/Logging/LoggingInitializer.cs | 4 +- src/Stryker.CLI/Stryker.CLI/Program.cs | 4 +- src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs | 4 +- .../Stryker.CLI/packages.lock.json | 9 +- .../Stryker.Core.UnitTest/AssertExtensions.cs | 2 +- .../AzureFileShareBaselineProviderTests.cs | 12 +- .../DashboardBaselineProviderTests.cs | 14 +- .../Providers/DiskBaselineProviderTests.cs | 13 +- .../Utils/BaselineMutantHelperTests.cs | 8 +- .../Clients/DashboardClientsTest.cs | 22 +- .../Compiling/CSharpCompilingProcessTests.cs | 25 +- .../Compiling/CSharpRollbackProcessTests.cs | 20 +- .../DashboardCompare/GitInfoProviderTests.cs | 8 +- .../DiffProviders/GitDiffProviderTests.cs | 22 +- .../ExclusionPatternTests.cs | 3 +- .../Stryker.Core.UnitTest/FilePatternTests.cs | 3 +- .../Fsharp/FsharpFileDetectionTests.cs | 7 +- .../Helpers/RangeHelperTests.cs | 4 +- .../Helpers/TextSpanHelperTests.cs | 4 +- .../IgnoreIfAttribute.cs | 2 +- .../Initialisation/BuildAnalyzerTestsBase.cs | 6 +- .../AnalyzerResultExtensionsTests.cs | 4 +- .../InitialBuildProcessTests.cs | 8 +- .../Initialisation/InitialTestProcessTests.cs | 13 +- .../InitialisationProcessTests.cs | 23 +- .../Initialisation/InputFileResolverTests.cs | 15 +- .../NugetRestoreProcessTests.cs | 8 +- .../Initialisation/ProjectMutatorTests.cs | 19 +- .../ProjectOrchestratorTests.cs | 23 +- .../TimeoutValueCalculatorTests.cs | 4 +- .../InjectedHelpers/InjectedHelperTests.cs | 4 +- .../LoggerMockExtensions.cs | 2 +- .../Stryker.Core.UnitTest/MockExtensions.cs | 4 +- .../BaselineMutantFilterTests.cs | 43 +- .../ExcludeFromCodeCoverageFilterTests.cs | 8 +- .../ExcludeLinqExpressionFilterTests.cs | 16 +- .../ExcludeMutationMutantFilterTests.cs | 10 +- .../FilePatternMutantFilterTests.cs | 10 +- .../IgnoreBlockMutantFilterTests.cs | 8 +- .../IgnoredMethodMutantFilterTests.cs | 10 +- .../MutantFilters/MutantFilterFactoryTests.cs | 21 +- .../MutantFilters/SinceMutantFilterTests.cs | 12 +- .../Mutants/CsharpMutantOrchestratorTests.cs | 9 +- .../Mutants/MutantOrchestratorTestsBase.cs | 10 +- .../Mutants/MutantPlacerTests.cs | 13 +- .../Mutants/MutantTests.cs | 4 +- .../CSharpMutationTestProcessTests.cs | 16 +- .../MutationTest/FullRunScenario.cs | 15 +- .../MutationTest/MutationTestExecutorTests.cs | 12 +- .../MutationTest/MutationTestProcessTests.cs | 23 +- .../Mutators/AbstractMutatorTests.cs | 8 +- .../Mutators/ArrayCreationMutatorTests.cs | 4 +- .../AssignmentStatementMutatorTests.cs | 4 +- .../Mutators/BinaryExpressionMutatorTests.cs | 4 +- .../Mutators/BlockMutatorTests.cs | 6 +- .../Mutators/BooleanMutatorTests.cs | 4 +- .../Mutators/CheckedMutatorTests.cs | 4 +- .../ConditionalExpressionMutatorTests.cs | 6 +- .../Mutators/InitializerMutatorTests.cs | 4 +- .../InterpolatedStringMutatorTests.cs | 4 +- .../IsPatternExpressionMutatorTests.cs | 4 +- .../Mutators/LinqMutatorTest.cs | 6 +- .../Mutators/MathMutatorTest.cs | 4 +- .../Mutators/NegateConditionMutatorTests.cs | 4 +- .../NullCoalescingExpressionMutatorTests.cs | 4 +- .../Mutators/ObjectCreationMutatorTests.cs | 4 +- .../Mutators/PostfixUnaryMutatorTests.cs | 4 +- .../Mutators/PrefixUnaryMutatorTests.cs | 4 +- .../Mutators/RegexMutatorTest.cs | 4 +- .../Mutators/StatementMutatorTests.cs | 4 +- .../Mutators/StringEmptyMutatorTests.cs | 6 +- .../Mutators/StringMethodMutatorTests.cs | 4 +- .../Mutators/StringMutatorTests.cs | 4 +- .../Mutators/SwitchExpressionMutatorTests.cs | 4 +- .../Mutators/TestMutator.cs | 4 +- .../Inputs/AdditionalTimeoutMsInputTests.cs | 6 +- .../Inputs/AzureFileStorageSasInputTests.cs | 8 +- .../Inputs/AzureFileStorageUrlInputTests.cs | 8 +- .../Options/Inputs/BasePathInputTests.cs | 6 +- .../Inputs/BaselineProviderInputTests.cs | 10 +- .../BreakOnInitialTestFailureInputTests.cs | 4 +- .../Options/Inputs/ConcurrencyInputTests.cs | 6 +- .../Options/Inputs/ConfigurationInputTests.cs | 6 +- .../Inputs/DashboardApiKeyInputTests.cs | 10 +- .../Options/Inputs/DashboardUrlInputTests.cs | 6 +- .../Options/Inputs/DevModeInputTests.cs | 4 +- .../Inputs/DiffIgnoreChangesInputTests.cs | 4 +- .../Options/Inputs/DisableBailInputTests.cs | 6 +- .../Inputs/DisableMixMutantsInputTests.cs | 7 +- .../Inputs/FallbackVersionInputTests.cs | 4 +- .../Options/Inputs/IgnoreMethodsInputTests.cs | 4 +- .../Inputs/IgnoreMutationsInputTests.cs | 12 +- .../Inputs/LanguageVersionInputTests.cs | 6 +- .../Options/Inputs/LogToFileInputTests.cs | 6 +- .../Options/Inputs/ModuleNameInputTests.cs | 6 +- .../Options/Inputs/MsBuildPathInputTests.cs | 6 +- .../Options/Inputs/MutateInputTests.cs | 4 +- .../Options/Inputs/MutationLevelInputTests.cs | 8 +- .../Inputs/OpenReportEnabledInputTests.cs | 4 +- .../Options/Inputs/OpenReportInputTests.cs | 6 +- .../Inputs/OptimizationModeInputTests.cs | 9 +- .../Options/Inputs/OutputPathInputTests.cs | 6 +- .../Options/Inputs/ProjectNameInputTests.cs | 4 +- .../Inputs/ProjectVersionInputTests.cs | 8 +- .../Inputs/ReportFileNameInputTests.cs | 6 +- .../Options/Inputs/ReportOpenerTests.cs | 6 +- .../Options/Inputs/ReportersInputTests.cs | 8 +- .../Options/Inputs/SinceInputTests.cs | 6 +- .../Options/Inputs/SinceTargetInputTests.cs | 6 +- .../Options/Inputs/SolutionInputTests.cs | 6 +- .../Inputs/SourceProjectNameInputTests.cs | 6 +- .../Inputs/TargetFrameworkInputTests.cs | 6 +- .../Inputs/TestCaseFilterInputTests.cs | 4 +- .../Options/Inputs/TestProjectsInputTests.cs | 5 +- .../Inputs/ThresholdBreakInputTests.cs | 6 +- .../Options/Inputs/ThresholdHighInputTests.cs | 6 +- .../Options/Inputs/ThresholdLowInputTests.cs | 6 +- .../Options/Inputs/VerbosityInputTests.cs | 6 +- .../Options/Inputs/WithBaselineInputTests.cs | 4 +- .../Options/StrykerInputsTests.cs | 11 +- .../CsharpProjectComponentTests.cs | 8 +- .../SourceProjects/SourceProjectInfoTests.cs | 6 +- .../TestProjects/TestCaseTests.cs | 4 +- .../TestProjects/TestFileTests.cs | 4 +- .../TestProjects/TestProjectTests.cs | 4 +- .../TestProjects/TestProjectsInfoTests.cs | 7 +- .../Reporters/BaselineReporterTests.cs | 14 +- .../Reporters/BroadcastReporterTests.cs | 12 +- .../Reporters/ClearTextReporterTests.cs | 16 +- .../Reporters/ClearTextTreeReporterTests.cs | 14 +- .../Reporters/ConsoleDotReporterTests.cs | 6 +- .../Reporters/DashboardReporterTests.cs | 18 +- .../Reporters/Html/HtmlReporterTests.cs | 16 +- .../Html/RealTime/Events/SseEventTest.cs | 4 +- .../Html/RealTime/Events/SseEventTypeTest.cs | 4 +- .../RealTime/RealTimeMutantHandlerTest.cs | 10 +- .../Reporters/Html/RealTime/SseServerTest.cs | 6 +- .../Reporters/Json/JsonReporterTests.cs | 14 +- .../Reporters/Json/MockJsonReport.cs | 8 +- .../Json/MockJsonReportFileComponent.cs | 7 +- .../Reporters/MarkdownSummaryReporterTests.cs | 8 +- .../Progress/ProgressBarReporterTests.cs | 6 +- .../Progress/ProgressReporterTests.cs | 6 +- .../Reporters/ReportTestHelper.cs | 8 +- .../Reporters/ReporterFactoryTests.cs | 14 +- .../Reporters/StatusReporterTests.cs | 10 +- .../Stryker.Core.UnitTest/StringExtensions.cs | 2 +- .../StrykerRunResultTests.cs | 4 +- .../StrykerRunnerTests.cs | 26 +- .../Stryker.Core.UnitTest/TestBase.cs | 4 +- .../Stryker.Core.UnitTest/TestHelper.cs | 2 +- .../TestRunners/CoverageCaptureTests.cs | 2 +- .../TestRunners/CoverageCollectorTests.cs | 2 +- .../TestRunners/VsTestMockingHelper.cs | 22 +- .../TestRunners/VsTestRunnerPoolTests.cs | 17 +- .../VsTextContextInformationTests.cs | 13 +- .../ToolHelpers/BuildalyzerHelperTests.cs | 4 +- .../Stryker.Core.UnitTest/packages.lock.json | 9 +- .../AzureFileShareBaselineProvider.cs | 8 +- .../Providers/BaselineProviderFactory.cs | 6 +- .../Providers/DashboardBaselineProvider.cs | 8 +- .../Providers/DiskBaselineProvider.cs | 8 +- .../Baseline/Providers/GitInfoProvider.cs | 6 +- .../Baseline/Providers/IGitInfoProvider.cs | 2 +- .../Baseline/Utils/BaselineMutantHelper.cs | 6 +- .../Baseline/Utils/IBaselineMutantHelper.cs | 6 +- .../Stryker.Core/Clients/DashboardClient.cs | 10 +- .../Compiling/CSharpRollbackProcess.cs | 10 +- .../Compiling/CSharpRollbackProcessResult.cs | 2 +- .../Compiling/CompilingProcessResult.cs | 2 +- .../Compiling/CsharpCompilingProcess.cs | 16 +- .../Compiling/FsharpCompilingProcess.cs | 12 +- .../CoverageAnalysis/CoverageAnalyser.cs | 12 +- .../CoverageAnalysis/ICoverageAnalyser.cs | 8 +- .../Stryker.Core/DiffProviders/DiffResult.cs | 2 +- .../DiffProviders/GitDiffProvider.cs | 11 +- .../DiffProviders/IDiffProvider.cs | 4 +- src/Stryker.Core/Stryker.Core/ExitCodes.cs | 2 +- .../Stryker.Core/Helpers/ITypeHandler.cs | 2 +- .../Stryker.Core/Helpers/RangeHelper.cs | 2 +- .../Stryker.Core/Helpers/RoslynHelper.cs | 4 +- .../Stryker.Core/Helpers/TextSpanHelper.cs | 2 +- .../Stryker.Core/Helpers/TypeBasedStrategy.cs | 2 +- .../IAnalyzerResultCSharpExtensions.cs | 4 +- .../Buildalyzer/IAnalyzerResultExtensions.cs | 4 +- .../CrossPlatformAssemblyResolver.cs | 2 +- .../CsharpProjectComponentsBuilder.cs | 16 +- .../EmbeddedResourcesGenerator.cs | 2 +- .../Initialisation/FolderCompositeCache.cs | 2 +- .../FsharpProjectComponentsBuilder.cs | 14 +- .../Initialisation/InitialBuildProcess.cs | 10 +- .../Initialisation/InitialTestProcess.cs | 9 +- .../Initialisation/InitialTestRun.cs | 5 +- .../Initialisation/InitialisationProcess.cs | 17 +- .../Initialisation/InputFileResolver.cs | 18 +- .../Stryker.Core/Initialisation/Language.cs | 2 +- .../Initialisation/NugetRestoreProcess.cs | 10 +- .../ProjectComponentsBuilder.cs | 11 +- .../Initialisation/ProjectMutator.cs | 12 +- .../Initialisation/ProjectOrchestrator.cs | 23 +- .../Initialisation/TimeoutValueCalculator.cs | 2 +- .../InjectedHelpers/CodeInjection.cs | 2 +- .../Instrumentation/BaseEngine.cs | 4 +- .../ConditionalInstrumentationEngine.cs | 2 +- .../DefaultInitializationEngine.cs | 4 +- .../Instrumentation/EndingReturnEngine.cs | 4 +- .../Instrumentation/IInstrumentCode.cs | 2 +- .../IfInstrumentationEngine.cs | 2 +- .../StaticInitializerMarkerEngine.cs | 4 +- .../StaticInstrumentationEngine.cs | 4 +- .../Logging/ApplicationLogging.cs | 2 +- .../MutantFilters/BaselineMutantFilter.cs | 24 +- .../MutantFilters/BroadcastMutantFilter.cs | 8 +- .../ExcludeFromCodeCoverageFilter.cs | 8 +- .../ExcludeLinqExpressionFilter.cs | 10 +- .../ExcludeMutationMutantFilter.cs | 8 +- .../MutantFilters/FilePatternMutantFilter.cs | 8 +- .../GeneratedCodeFilterExtension.cs | 2 +- .../MutantFilters/IMutantFilter.cs | 7 +- .../MutantFilters/IgnoreBlockMutantFilter.cs | 10 +- .../IgnoredMethodMutantFilter.cs | 8 +- .../MutantFilters/MutantFilter.cs | 2 +- .../MutantFilters/MutantFilterFactory.cs | 12 +- .../MutantFilters/SinceMutantFilter.cs | 15 +- .../Mutants/BaseMutantOrchestrator.cs | 5 +- .../Mutants/CsharpMutantOrchestrator.cs | 12 +- .../AccessorSyntaxOrchestrator.cs | 4 +- ...AnonymousFunctionExpressionOrchestrator.cs | 2 +- .../BaseFunctionOrchestrator.cs | 6 +- .../BaseMethodDeclarationOrchestrator.cs | 4 +- .../BlockOrchestrator.cs | 2 +- .../CsharpNodeOrchestrators/CommentParser.cs | 6 +- .../ConditionalExpressionOrchestrator.cs | 2 +- .../DoNotMutateOrchestrator.cs | 2 +- .../ExpressionBodiedPropertyOrchestrator.cs | 4 +- .../ExpressionSpecificOrchestrator.cs | 5 +- .../INodeOrchestrator.cs | 4 +- .../InvocationExpressionOrchestrator.cs | 4 +- .../LocalDeclarationOrchestrator.cs | 2 +- .../LocalFunctionStatementOrchestrator.cs | 4 +- .../MemberAccessExpressionOrchestrator.cs | 2 +- .../MemberDefinitionOrchestrator.cs | 2 +- .../MutateAtStatementLevelOrchestrator.cs | 2 +- .../NodeSpecificOrchestrator.cs | 3 +- .../StatementSpecificOrchestrator.cs | 2 +- .../StaticConstructorOrchestrator.cs | 4 +- .../StaticFieldDeclarationOrchestrator.cs | 4 +- .../SyntaxNodeOrchestrator.cs | 3 +- .../Mutants/FsharpMutantOrchestrator.cs | 10 +- .../DefaultOrchestrator.cs | 2 +- .../FsharpOrchestrators/IFsharpTypehandle.cs | 2 +- .../IfThenElseOrchestrator.cs | 2 +- .../LetOrUseOrchestrator.cs | 2 +- .../FsharpOrchestrators/LetOrchestrator.cs | 2 +- .../FsharpOrchestrators/MatchOrchestrator.cs | 2 +- .../NestedModuleOrchestrator.cs | 2 +- .../FsharpOrchestrators/OrchestratorFinder.cs | 2 +- .../Stryker.Core/Mutants/IMutant.cs | 20 - .../Stryker.Core/Mutants/Mutant.cs | 6 +- .../Stryker.Core/Mutants/MutantInfo.cs | 2 +- .../Stryker.Core/Mutants/MutantPlacer.cs | 7 +- .../Stryker.Core/Mutants/MutationContext.cs | 7 +- .../Stryker.Core/Mutants/MutationStore.cs | 7 +- .../Stryker.Core/Mutants/TestDescription.cs | 2 +- .../Stryker.Core/Mutants/TestGuidsList.cs | 5 +- .../Stryker.Core/Mutants/TestSet.cs | 2 +- .../Mutants/WrappedGuidsEnumeration.cs | 4 +- .../MutationTest/CsharpMutationProcess.cs | 20 +- .../MutationTest/FsharpMutationProcess.cs | 12 +- .../MutationTest/IMutationProcess.cs | 2 +- .../MutationTest/MutationTestExecutor.cs | 10 +- .../MutationTest/MutationTestInput.cs | 11 +- .../MutationTest/MutationTestProcess.cs | 29 +- .../Mutators/ArrayCreationMutator.cs | 4 +- .../Mutators/AssignmentStatementMutator.cs | 6 +- .../Mutators/BinaryExpressionMutator.cs | 6 +- .../Stryker.Core/Mutators/BlockMutator.cs | 6 +- .../Stryker.Core/Mutators/BooleanMutator.cs | 4 +- .../Stryker.Core/Mutators/CheckedMutator.cs | 4 +- .../Mutators/ConditionalExpressionMutator.cs | 4 +- .../Mutators/InitializerMutator.cs | 4 +- .../Mutators/InterpolatedStringMutator.cs | 4 +- .../Mutators/IsPatternExpressionMutator.cs | 4 +- .../Stryker.Core/Mutators/LinqMutator.cs | 6 +- .../Stryker.Core/Mutators/MathMutator.cs | 4 +- .../Stryker.Core/Mutators/MutatorBase.cs | 6 +- .../Mutators/NegateConditionMutator.cs | 4 +- .../NullCoalescingExpressionMutator.cs | 4 +- .../Mutators/ObjectCreationMutator.cs | 4 +- .../Mutators/PatternMutatorBase.cs | 4 +- .../Mutators/PostfixUnaryMutator.cs | 4 +- .../Mutators/PrefixUnaryMutator.cs | 4 +- .../Stryker.Core/Mutators/RegexMutator.cs | 6 +- .../Stryker.Core/Mutators/StatementMutator.cs | 4 +- .../Mutators/StringEmptyMutator.cs | 4 +- .../Mutators/StringMethodMutator.cs | 4 +- .../Stryker.Core/Mutators/StringMutator.cs | 4 +- .../Mutators/SwitchExpressionMutator.cs | 4 +- .../Csharp/CsharpFileLeaf.cs | 4 +- .../Csharp/CsharpFolderComposite.cs | 2 +- .../ProjectComponents/FolderComposite.cs | 15 +- .../Fsharp/FsharpFileLeaf.cs | 4 +- .../Fsharp/FsharpFolderComposite.cs | 2 +- .../Stryker.Core/ProjectComponents/Health.cs | 10 - .../ProjectComponents/IFileLeaf.cs | 19 - .../ProjectComponents/ProjectComponent.cs | 40 +- .../ProjectComponentsExtensions.cs | 4 +- .../ProjectComponents/Solution.cs | 4 +- .../SourceProjects/SourceProjectInfo.cs | 10 +- .../TestProjects/TestCase.cs | 8 +- .../TestProjects/TestFile.cs | 6 +- .../TestProjects/TestProject.cs | 14 +- .../TestProjects/TestProjectsInfo.cs | 8 +- .../Reporters/BaselineReporter.cs | 15 +- .../Reporters/BroadcastReporter.cs | 10 +- .../Reporters/ClearTextReporter.cs | 16 +- .../Reporters/ClearTextTreeReporter.cs | 11 +- .../Reporters/ConsoleDotProgressReporter.cs | 10 +- .../Reporters/DashboardReporter.cs | 23 +- .../Reporters/FilteredMutantsLogger.cs | 8 +- .../Reporters/Html/HtmlReporter.cs | 21 +- .../Html/RealTime/Events/SseEvent.cs | 2 +- .../Html/RealTime/Events/SseEventType.cs | 2 +- .../Html/RealTime/IRealTimeMutantHandler.cs | 4 +- .../Reporters/Html/RealTime/ISseServer.cs | 4 +- .../Html/RealTime/RealTimeMutantHandler.cs | 10 +- .../Reporters/Html/RealTime/SseServer.cs | 4 +- .../Stryker.Core/Reporters/Json/JsonReport.cs | 15 +- .../Reporters/Json/JsonReportSerialization.cs | 2 +- .../Reporters/Json/JsonReporter.cs | 11 +- .../Stryker.Core/Reporters/Json/Location.cs | 4 +- .../Stryker.Core/Reporters/Json/Position.cs | 4 +- .../Reporters/Json/SourceFiles/JsonMutant.cs | 4 +- .../Reporters/Json/SourceFiles/SourceFile.cs | 8 +- .../Reporters/Json/TestFiles/JsonTest.cs | 4 +- .../Reporters/Json/TestFiles/JsonTestFile.cs | 4 +- .../Reporters/MarkdownSummaryReporter.cs | 11 +- .../Reporters/Progress/ProgressBar.cs | 2 +- .../Reporters/Progress/ProgressBarReporter.cs | 4 +- .../Reporters/Progress/ProgressReporter.cs | 10 +- .../Reporters/Progress/StopWatchProvider.cs | 2 +- .../Stryker.Core/Reporters/ReporterFactory.cs | 14 +- .../CrossPlatformBrowserOpener.cs | 4 +- .../WebBrowserOpener/IWebbrowserOpener.cs | 2 +- .../Stryker.Core/StrykerRunResult.cs | 4 +- .../Stryker.Core/StrykerRunner.cs | 21 +- .../TestRunners/CoverageRunResult.cs | 2 +- .../TestRunners/ITestRunResult.cs | 18 + .../Stryker.Core}/TestRunners/ITestRunner.cs | 9 +- .../TestRunners/TestFrameworks.cs | 2 +- .../Stryker.Core/TestRunners/TestRunResult.cs | 11 +- .../VsTest/DiscoveryEventHandler.cs | 2 +- .../TestRunners/VsTest/RunEventHandler.cs | 2 +- .../VsTest/StrykerVstestHostLauncher.cs | 4 +- .../TestRunners/VsTest/TestRun.cs | 2 +- .../VsTest/VsTestContextInformation.cs | 12 +- .../TestRunners/VsTest/VsTestDescription.cs | 4 +- .../TestRunners/VsTest/VsTestRunner.cs | 18 +- .../TestRunners/VsTest/VsTestRunnerPool.cs | 12 +- .../Stryker.Core/Testing/Buildalyzer.cs | 2 +- .../Stryker.Core/Testing/ProcessExecutor.cs | 2 +- .../Stryker.Core/Testing/ProcessExtensions.cs | 2 +- .../Stryker.Core/Testing/ProcessResult.cs | 2 +- .../Stryker.Core/ToolHelpers/MsBuildHelper.cs | 6 +- .../Stryker.Core/ToolHelpers/VsTestHelper.cs | 4 +- .../Stryker.Core/packages.lock.json | 9 +- src/Stryker.Options/ExclusionPattern.cs | 3 +- .../FilePattern.cs | 17 +- .../Options/BooleanValidationExtensions.cs | 2 +- .../Options/InputDefinition.cs | 2 +- .../Options/Inputs/AdditionalTimeoutInput.cs | 4 +- .../Inputs/AzureFileStorageSasInput.cs | 6 +- .../Inputs/AzureFileStorageUrlInput.cs | 6 +- .../Options/Inputs/BasePathInput.cs | 4 +- .../Options/Inputs/BaselineProviderInput.cs | 10 +- .../Inputs/BreakOnInitialTestFailureInput.cs | 2 +- .../Options/Inputs/ConcurrencyInput.cs | 6 +- .../Options/Inputs/ConfigurationInput.cs | 4 +- .../Options/Inputs/CoverageAnalysisInput.cs | 6 +- .../Options/Inputs/DashboardApiKeyInput.cs | 8 +- .../Options/Inputs/DashboardUrlInput.cs | 4 +- .../Options/Inputs/DevModeInput.cs | 2 +- .../Options/Inputs/DiffIgnoreChangesInput.cs | 2 +- .../Options/Inputs/DisableBailInput.cs | 4 +- .../Options/Inputs/DisableMixMutantsInput.cs | 4 +- .../Options/Inputs/FallbackVersionInput.cs | 4 +- .../Options/Inputs/IgnoreMethodsInput.cs | 2 +- .../Options/Inputs/IgnoreMutationsInput.cs | 6 +- .../Options/Inputs/LanguageVersionInput.cs | 4 +- .../Options/Inputs/LogToFileInput.cs | 4 +- .../Options/Inputs/ModuleNameInput.cs | 4 +- .../Options/Inputs/MsBuildPathInput.cs | 4 +- .../Options/Inputs/MutateInput.cs | 8 +- .../Options/Inputs/MutationLevelInput.cs | 6 +- .../Options/Inputs/OpenReportEnabledInput.cs | 2 +- .../Options/Inputs/OpenReportInput.cs | 4 +- .../Options/Inputs/OutputPathInput.cs | 4 +- .../Options/Inputs/ProjectNameInput.cs | 2 +- .../Options/Inputs/ProjectVersionInput.cs | 6 +- .../Options/Inputs/ReportFileNameInput.cs | 4 +- .../Options/Inputs/ReportersInput.cs | 6 +- .../Options/Inputs/SinceInput.cs | 4 +- .../Options/Inputs/SinceTargetInput.cs | 4 +- .../Options/Inputs/SolutionInput.cs | 4 +- .../Options/Inputs/SourceProjectNameInput.cs | 4 +- .../Options/Inputs/TargetFrameworkInput.cs | 4 +- .../Options/Inputs/TestCaseFilterInput.cs | 2 +- .../Options/Inputs/TestProjectsInput.cs | 2 +- .../Options/Inputs/ThresholdBreakInput.cs | 4 +- .../Options/Inputs/ThresholdHighInput.cs | 4 +- .../Options/Inputs/ThresholdLowInput.cs | 4 +- .../Options/Inputs/VerbosityInput.cs | 4 +- .../Options/Inputs/WithBaselineInput.cs | 2 +- src/Stryker.Options/Options/LogOptions.cs | 2 +- src/Stryker.Options/Options/StrykerInputs.cs | 7 +- src/Stryker.Options/Options/StrykerOptions.cs | 22 +- src/Stryker.Options/Options/Thresholds.cs | 4 +- src/Stryker.Options/packages.lock.json | 496 ++++++++++++++++- .../Attributes/MutatorDescriptionAttribute.cs | 3 +- src/Stryker.Utilities/EnumExtension.cs | 30 ++ .../FilePathUtils.cs | 2 +- .../Stryker.Utilities.csproj | 9 + src/Stryker.Utilities/packages.lock.json | 13 + src/Stryker.sln | 6 + 491 files changed, 2731 insertions(+), 2226 deletions(-) create mode 100644 src/Stryker.Abstractions/IMutant.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs rename src/Stryker.Abstractions/{ => ProjectComponents}/IFilePattern.cs (86%) create mode 100644 src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ITestCase.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ITestFile.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ITestProject.cs create mode 100644 src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/Solution.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs rename src/{Stryker.Core/Stryker.Core/Reporters => Stryker.Abstractions/Reporting}/Reporter.cs (84%) rename src/Stryker.Abstractions/{TestRunners => Testing}/ITestGuids.cs (83%) delete mode 100644 src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs delete mode 100644 src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs delete mode 100644 src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs create mode 100644 src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs rename src/{Stryker.Abstractions => Stryker.Core/Stryker.Core}/TestRunners/ITestRunner.cs (75%) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/FilePattern.cs (89%) rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Attributes/MutatorDescriptionAttribute.cs (93%) create mode 100644 src/Stryker.Utilities/EnumExtension.cs rename src/{Stryker.Options => Stryker.Utilities}/FilePathUtils.cs (95%) create mode 100644 src/Stryker.Utilities/Stryker.Utilities.csproj create mode 100644 src/Stryker.Utilities/packages.lock.json diff --git a/src/Stryker.Abstractions/Baseline/BaselineProvider.cs b/src/Stryker.Abstractions/Baseline/BaselineProvider.cs index c558dae967..ef7f3d81ea 100644 --- a/src/Stryker.Abstractions/Baseline/BaselineProvider.cs +++ b/src/Stryker.Abstractions/Baseline/BaselineProvider.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Baseline +namespace Stryker.Abstractions.Baseline { public enum BaselineProvider { diff --git a/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs index 29ced100de..84989730a1 100644 --- a/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs +++ b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Baseline +namespace Stryker.Abstractions.Baseline { public interface IBaselineProvider { diff --git a/src/Stryker.Abstractions/Exceptions/CompilationException.cs b/src/Stryker.Abstractions/Exceptions/CompilationException.cs index d97f6a380a..052b992bcd 100644 --- a/src/Stryker.Abstractions/Exceptions/CompilationException.cs +++ b/src/Stryker.Abstractions/Exceptions/CompilationException.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Exceptions; +namespace Stryker.Abstractions.Exceptions; /// /// Represents errors which are related to roslyn compilation errors that we cannot fix, diff --git a/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs index 63503189b8..c2546fb5c2 100644 --- a/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs +++ b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Stryker.Configuration.Exceptions +namespace Stryker.Abstractions.Exceptions { /// /// Represents errors which are caused by known exceptions in Stryker. diff --git a/src/Stryker.Abstractions/Exceptions/InputException.cs b/src/Stryker.Abstractions/Exceptions/InputException.cs index 888edcaabd..6b1024d58e 100644 --- a/src/Stryker.Abstractions/Exceptions/InputException.cs +++ b/src/Stryker.Abstractions/Exceptions/InputException.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Stryker.Configuration.Exceptions; +namespace Stryker.Abstractions.Exceptions; /// /// Represents errors which are related to user input. diff --git a/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs index 9ee2d43e4b..90aee2db91 100644 --- a/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs +++ b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Exceptions; +namespace Stryker.Abstractions.Exceptions; /// /// Represents error when no test projects are found in the solution or configured for stryker. diff --git a/src/Stryker.Abstractions/IMutant.cs b/src/Stryker.Abstractions/IMutant.cs new file mode 100644 index 0000000000..fa0e9a087b --- /dev/null +++ b/src/Stryker.Abstractions/IMutant.cs @@ -0,0 +1,22 @@ +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions; + +namespace Stryker.Abstractions.Mutants; + +public interface IMutant : IReadOnlyMutant +{ + new int Id { get; set; } + new Mutation Mutation { get; set; } + new MutantStatus ResultStatus { get; set; } + new string ResultStatusReason { get; set; } + new ITestGuids CoveringTests { get; set; } + new ITestGuids KillingTests { get; set; } + new ITestGuids AssessingTests { get; set; } + new bool CountForStats { get; set; } + new bool IsStaticValue { get; set; } + + string DisplayName { get; set; } + bool MustBeTestedInIsolation { get; set; } + + void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, ITestGuids timedOutTests, bool sessionTimedOut); +} diff --git a/src/Stryker.Abstractions/IMutator.cs b/src/Stryker.Abstractions/IMutator.cs index 0feff1be40..a7f012b98e 100644 --- a/src/Stryker.Abstractions/IMutator.cs +++ b/src/Stryker.Abstractions/IMutator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; -using Stryker.Configuration.Options; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public interface IMutator { diff --git a/src/Stryker.Abstractions/IProjectAndTests.cs b/src/Stryker.Abstractions/IProjectAndTests.cs index a36dad62db..d1e03124c6 100644 --- a/src/Stryker.Abstractions/IProjectAndTests.cs +++ b/src/Stryker.Abstractions/IProjectAndTests.cs @@ -1,11 +1,10 @@ -using System.Collections.Generic; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.Initialisation; +namespace Stryker.Abstractions.Initialisation; public interface IProjectAndTests { - TestProjectsInfo TestProjectsInfo { get;} + ITestProjectsInfo TestProjectsInfo { get;} string HelperNamespace { get; } diff --git a/src/Stryker.Abstractions/IReadOnlyMutant.cs b/src/Stryker.Abstractions/IReadOnlyMutant.cs index 23a7fe2ca8..9a46090c2a 100644 --- a/src/Stryker.Abstractions/IReadOnlyMutant.cs +++ b/src/Stryker.Abstractions/IReadOnlyMutant.cs @@ -1,12 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration; +namespace Stryker.Abstractions; /// /// This interface should only contain readonly properties to ensure that others than the mutation test process cannot modify mutants. diff --git a/src/Stryker.Abstractions/ITimeoutValueCalculator.cs b/src/Stryker.Abstractions/ITimeoutValueCalculator.cs index d335f0fee4..29734667ab 100644 --- a/src/Stryker.Abstractions/ITimeoutValueCalculator.cs +++ b/src/Stryker.Abstractions/ITimeoutValueCalculator.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration; +namespace Stryker.Abstractions; public interface ITimeoutValueCalculator { diff --git a/src/Stryker.Abstractions/LinqExpression.cs b/src/Stryker.Abstractions/LinqExpression.cs index 699c7a8742..604af83250 100644 --- a/src/Stryker.Abstractions/LinqExpression.cs +++ b/src/Stryker.Abstractions/LinqExpression.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration; +namespace Stryker.Abstractions; /// Enumeration for the different kinds of linq expressions public enum LinqExpression diff --git a/src/Stryker.Abstractions/MutantStatus.cs b/src/Stryker.Abstractions/MutantStatus.cs index a9da1fc198..a703f3b695 100644 --- a/src/Stryker.Abstractions/MutantStatus.cs +++ b/src/Stryker.Abstractions/MutantStatus.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public enum MutantStatus { diff --git a/src/Stryker.Abstractions/Mutation.cs b/src/Stryker.Abstractions/Mutation.cs index fbd01677bd..4c44e4ac23 100644 --- a/src/Stryker.Abstractions/Mutation.cs +++ b/src/Stryker.Abstractions/Mutation.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { /// /// Represents a single mutation on code level diff --git a/src/Stryker.Abstractions/MutationLevel.cs b/src/Stryker.Abstractions/MutationLevel.cs index d54ac2d09b..675ebb4ec9 100644 --- a/src/Stryker.Abstractions/MutationLevel.cs +++ b/src/Stryker.Abstractions/MutationLevel.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public enum MutationLevel { diff --git a/src/Stryker.Abstractions/Mutator.cs b/src/Stryker.Abstractions/Mutator.cs index 4d7770cea6..6b6f286be9 100644 --- a/src/Stryker.Abstractions/Mutator.cs +++ b/src/Stryker.Abstractions/Mutator.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Reflection; -using Stryker.Configuration.Attributes; +using Stryker.Utilities.Attributes; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public enum Mutator { @@ -48,27 +43,3 @@ public enum Mutator [MutatorDescription("Conditional operators")] Conditional } - -public static class EnumExtension -{ - public static IEnumerable GetDescriptions(this T e) where T : IConvertible - { - if (e is not Enum) return Array.Empty(); - var type = e.GetType(); - var values = Enum.GetValues(type); - - foreach (int val in values) - { - if (val != e.ToInt32(CultureInfo.InvariantCulture)) - { - continue; - } - var memInfo = type.GetMember(type.GetEnumName(val)); - - var descriptions = memInfo[0].GetCustomAttributes(false).Select(descriptionAttribute => descriptionAttribute.Description); - return descriptions; - } - - return Array.Empty(); - } -} diff --git a/src/Stryker.Abstractions/Options/IExclusionPattern.cs b/src/Stryker.Abstractions/Options/IExclusionPattern.cs index aa8def3aa1..ffee021ed5 100644 --- a/src/Stryker.Abstractions/Options/IExclusionPattern.cs +++ b/src/Stryker.Abstractions/Options/IExclusionPattern.cs @@ -1,7 +1,7 @@ using DotNet.Globbing; -namespace Stryker.Configuration.Options; +namespace Stryker.Abstractions.Options; public interface IExclusionPattern { diff --git a/src/Stryker.Abstractions/Options/ILogOptions.cs b/src/Stryker.Abstractions/Options/ILogOptions.cs index 9996ba61db..a8bd74f196 100644 --- a/src/Stryker.Abstractions/Options/ILogOptions.cs +++ b/src/Stryker.Abstractions/Options/ILogOptions.cs @@ -1,6 +1,6 @@ using Serilog.Events; -namespace Stryker.Configuration.Options; +namespace Stryker.Abstractions.Options; public interface ILogOptions { diff --git a/src/Stryker.Abstractions/Options/IStrykerOptions.cs b/src/Stryker.Abstractions/Options/IStrykerOptions.cs index 0619ed4d39..21ad30162c 100644 --- a/src/Stryker.Abstractions/Options/IStrykerOptions.cs +++ b/src/Stryker.Abstractions/Options/IStrykerOptions.cs @@ -1,13 +1,11 @@ -using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Options; +namespace Stryker.Abstractions.Options; public interface IStrykerOptions { diff --git a/src/Stryker.Abstractions/Options/IThresholds.cs b/src/Stryker.Abstractions/Options/IThresholds.cs index a21567e194..38ffae6399 100644 --- a/src/Stryker.Abstractions/Options/IThresholds.cs +++ b/src/Stryker.Abstractions/Options/IThresholds.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options; +namespace Stryker.Abstractions.Options; public interface IThresholds { diff --git a/src/Stryker.Abstractions/Options/OptimizationModes.cs b/src/Stryker.Abstractions/Options/OptimizationModes.cs index aa28924c6f..d11a349fe9 100644 --- a/src/Stryker.Abstractions/Options/OptimizationModes.cs +++ b/src/Stryker.Abstractions/Options/OptimizationModes.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { // Optimization options [Flags] diff --git a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs deleted file mode 100644 index fec9d165ac..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFileLeaf.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.CodeAnalysis; -using Stryker.Configuration.Mutants; -using System.Collections.Generic; - -namespace Stryker.Configuration.ProjectComponents -{ - public class CsharpFileLeaf : ProjectComponent, IFileLeaf - { - public string SourceCode { get; set; } - - /// - /// The original unmutated syntax tree - /// - public SyntaxTree SyntaxTree { get; set; } - - /// - /// The mutated syntax tree - /// - public SyntaxTree MutatedSyntaxTree { get; set; } - - public override IEnumerable Mutants { get; set; } - - public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; - - public override IEnumerable MutatedSyntaxTrees => new List { MutatedSyntaxTree }; - - public override IEnumerable> GetAllFiles() - { - yield return this; - } - - public override void Display() - { - DisplayFile(this); - } - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs deleted file mode 100644 index 2ea225a517..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/Csharp/CsharpFolderComposite.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Microsoft.CodeAnalysis; - -namespace Stryker.Configuration.ProjectComponents -{ - public class CsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite - { - - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs deleted file mode 100644 index 521eea2821..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/FolderComposite.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Stryker.Configuration; -using Stryker.Configuration.Mutants; - -namespace Stryker.Configuration.ProjectComponents -{ - public interface IReadOnlyFolderComposite : IProjectComponent - { - IEnumerable Children { get; } - void Add(IProjectComponent child); - void AddRange(IEnumerable children); - } - - public class FolderComposite : ProjectComponent, IReadOnlyFolderComposite - { - private readonly List _children = []; - public readonly List _compilationSyntaxTrees = []; - - public IEnumerable Children => _children; - - public override IEnumerable Mutants - { - get => Children.SelectMany(x => x.Mutants); - set => throw new NotSupportedException("Folders do not contain mutants."); - } - - /// - /// Add a syntax tree to this folder that is needed in compilation but should not be mutated - /// - public void AddCompilationSyntaxTree(T syntaxTree) => _compilationSyntaxTrees.Add(syntaxTree); - public override IEnumerable CompilationSyntaxTrees => _compilationSyntaxTrees.Union(ChildCompilationSyntaxTree); - private IEnumerable ChildCompilationSyntaxTree => Children.Cast>().SelectMany(c => c.CompilationSyntaxTrees); - public override IEnumerable MutatedSyntaxTrees => Children.Cast>().SelectMany(c => c.MutatedSyntaxTrees); - - public void Add(IProjectComponent child) - { - child.Parent = this; - _children.Add(child); - } - - public void AddRange(IEnumerable children) - { - foreach (var child in children) - { - Add(child); - } - } - - public override IEnumerable GetAllFiles() => Children.SelectMany(x => x.GetAllFiles()); - public override void Display() - { - // only walk this branch of the tree if it belongs to the source project, otherwise we have nothing to display. - if (MutatedSyntaxTrees.Any()) - { - DisplayFolder(this); - - foreach (var child in Children) - { - child.DisplayFile = DisplayFile; - child.DisplayFolder = DisplayFolder; - child.Display(); - } - } - } - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs deleted file mode 100644 index 2f286c6fda..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFileLeaf.cs +++ /dev/null @@ -1,37 +0,0 @@ -using FSharp.Compiler.Syntax; -using Stryker.Configuration.Mutants; -using System.Collections.Generic; - -namespace Stryker.Configuration.ProjectComponents -{ - public class FsharpFileLeaf : ProjectComponent, IFileLeaf - { - public string SourceCode { get; set; } - - /// - /// The original unmutated syntaxtree - /// - public ParsedInput SyntaxTree { get; set; } - - /// - /// The mutated syntax tree - /// - public ParsedInput MutatedSyntaxTree { get; set; } - - public override IEnumerable Mutants { get; set; } - - public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; - - public override IEnumerable MutatedSyntaxTrees => new List { MutatedSyntaxTree }; - - public override IEnumerable> GetAllFiles() - { - yield return this; - } - - public override void Display() - { - DisplayFile(this); - } - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs deleted file mode 100644 index cc7e317dac..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/Fsharp/FsharpFolderComposite.cs +++ /dev/null @@ -1,9 +0,0 @@ -using FSharp.Compiler.Syntax; - -namespace Stryker.Configuration.ProjectComponents -{ - public class FsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite - { - - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/Health.cs b/src/Stryker.Abstractions/ProjectComponents/Health.cs index 1cc7d61a9a..109be743a8 100644 --- a/src/Stryker.Abstractions/ProjectComponents/Health.cs +++ b/src/Stryker.Abstractions/ProjectComponents/Health.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public enum Health { diff --git a/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs b/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs index 3d2479fd35..d69872eff1 100644 --- a/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs +++ b/src/Stryker.Abstractions/ProjectComponents/IFileLeaf.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public interface IReadOnlyFileLeaf : IReadOnlyProjectComponent { diff --git a/src/Stryker.Abstractions/IFilePattern.cs b/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs similarity index 86% rename from src/Stryker.Abstractions/IFilePattern.cs rename to src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs index 7eb5aeddd7..f38d307bfe 100644 --- a/src/Stryker.Abstractions/IFilePattern.cs +++ b/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs @@ -1,7 +1,8 @@ using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; -namespace Stryker.Configuration; +namespace Stryker.Abstractions.ProjectComponents; + public interface IFilePattern { Glob Glob { get; } diff --git a/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs b/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs new file mode 100644 index 0000000000..1f80e9f138 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs @@ -0,0 +1,28 @@ +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface IReadOnlyProjectComponent +{ + string FullPath { get; } + IEnumerable Mutants { get; } + IReadOnlyFolderComposite Parent { get; } + string RelativePath { get; set; } + public Display DisplayFile { get; set; } + public Display DisplayFolder { get; set; } + IEnumerable TotalMutants(); + IEnumerable ValidMutants(); + IEnumerable UndetectedMutants(); + IEnumerable DetectedMutants(); + IEnumerable InvalidMutants(); + IEnumerable IgnoredMutants(); + IEnumerable NotRunMutants(); + + Health CheckHealth(IThresholds threshold); + IEnumerable GetAllFiles(); + void Display(); + double GetMutationScore(); +} + +public delegate void Display(IReadOnlyProjectComponent current); diff --git a/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs new file mode 100644 index 0000000000..bb073d5620 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs @@ -0,0 +1,8 @@ +namespace Stryker.Abstractions.ProjectComponents; + +public interface IReadOnlyFolderComposite : IReadOnlyProjectComponent +{ + IEnumerable Children { get; } + void Add(IReadOnlyProjectComponent child); + void AddRange(IEnumerable children); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestCase.cs b/src/Stryker.Abstractions/ProjectComponents/ITestCase.cs new file mode 100644 index 0000000000..0d56180144 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ITestCase.cs @@ -0,0 +1,15 @@ +using System; +using Microsoft.CodeAnalysis; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface ITestCase +{ + Guid Id { get; init; } + string Name { get; init; } + SyntaxNode Node { get; init; } + + bool Equals(object obj); + bool Equals(ITestCase other); + int GetHashCode(); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs b/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs new file mode 100644 index 0000000000..f9effbb4d6 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs @@ -0,0 +1,16 @@ +using Microsoft.CodeAnalysis; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface ITestFile +{ + string FilePath { get; init; } + string Source { get; init; } + SyntaxTree SyntaxTree { get; init; } + IEnumerable Tests { get; } + + void AddTest(Guid id, string name, SyntaxNode node); + bool Equals(object obj); + bool Equals(ITestFile other); + int GetHashCode(); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs b/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs new file mode 100644 index 0000000000..6c6bcbc4af --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs @@ -0,0 +1,14 @@ +using Buildalyzer; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface ITestProject +{ + IAnalyzerResult AnalyzerResult { get; } + string ProjectFilePath { get; } + IEnumerable TestFiles { get; } + + bool Equals(object obj); + bool Equals(ITestProject other); + int GetHashCode(); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs b/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs new file mode 100644 index 0000000000..5a4faf76a1 --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs @@ -0,0 +1,14 @@ +using Buildalyzer; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface ITestProjectsInfo +{ + IEnumerable AnalyzerResults { get; } + IEnumerable TestFiles { get; } + IEnumerable TestProjects { get; set; } + + void BackupOriginalAssembly(IAnalyzerResult sourceProject); + IReadOnlyList GetTestAssemblies(); + void RestoreOriginalAssembly(IAnalyzerResult sourceProject); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs b/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs deleted file mode 100644 index 84427453fe..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/ProjectComponent.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Stryker.Configuration; -using Stryker.Configuration.Options; -using Stryker.Configuration.Mutants; -using Stryker.Options; - -namespace Stryker.Configuration.ProjectComponents -{ - public delegate void Display(IReadOnlyProjectComponent current); - - public interface IReadOnlyProjectComponent - { - string FullPath { get; } - IEnumerable Mutants { get; } - IReadOnlyFolderComposite Parent { get; } - string RelativePath { get; set; } - public Display DisplayFile { get; set; } - public Display DisplayFolder { get; set; } - IEnumerable TotalMutants(); - IEnumerable ValidMutants(); - IEnumerable UndetectedMutants(); - IEnumerable DetectedMutants(); - IEnumerable InvalidMutants(); - IEnumerable IgnoredMutants(); - IEnumerable NotRunMutants(); - - Health CheckHealth(IThresholds threshold); - IEnumerable GetAllFiles(); - void Display(); - double GetMutationScore(); - } - - public interface IProjectComponent : IReadOnlyProjectComponent - { - new string FullPath { get; set; } - new IEnumerable Mutants { get; set; } - new IReadOnlyFolderComposite Parent { get; set; } - new string RelativePath { get; set; } - } - - public abstract class ProjectComponent : IProjectComponent - { - public string FullPath { get; set; } - /// - /// Relative path to project file - /// - public string RelativePath { get; set; } - - public IReadOnlyFolderComposite Parent { get; set; } - - public Display DisplayFile { get; set; } - - public Display DisplayFolder { get; set; } - - public virtual IEnumerable Mutants { get; set; } - - public abstract IEnumerable GetAllFiles(); - - public abstract void Display(); - - public IEnumerable TotalMutants() => ValidMutants() - .Union(InvalidMutants()) - .Union(IgnoredMutants()); - - public IEnumerable ValidMutants() => UndetectedMutants() - .Union(DetectedMutants()); - - public IEnumerable InvalidMutants() => Mutants - .Where(m => m.ResultStatus == MutantStatus.CompileError); - - public IEnumerable UndetectedMutants() => Mutants - .Where(m => - m.ResultStatus is MutantStatus.Survived or MutantStatus.NoCoverage); - - public IEnumerable IgnoredMutants() => Mutants - .Where(m => m.ResultStatus == MutantStatus.Ignored); - - public IEnumerable NotRunMutants() => Mutants - .Where(m => m.ResultStatus == MutantStatus.Pending); - - public IEnumerable DetectedMutants() => Mutants - .Where(m => - m.ResultStatus is MutantStatus.Killed or MutantStatus.Timeout); - - /// - /// Returns the mutation score for this folder / file - /// - /// double between 0 and 1 or NaN when no score could be calculated - public double GetMutationScore() => DetectedMutants().Count() / (double)ValidMutants().Count(); - - public Health CheckHealth(IThresholds threshold) - { - var mutationScore = GetMutationScore(); - if (double.IsNaN(mutationScore)) - { - // The mutation score is outside the bounds we can work with, so we don't have any health status - return Health.None; - } - - return (mutationScore*100) switch - { - var score when score >= threshold.High => Health.Good, - var score when score < threshold.High && score >= threshold.Low => Health.Warning, - _ => Health.Danger - }; - } - } - - public abstract class ProjectComponent : ProjectComponent - { - /// - /// All syntax trees that should be a part of the compilation - /// - public abstract IEnumerable CompilationSyntaxTrees { get; } - /// - /// Only those syntax trees that were changed by the mutation process - /// - public abstract IEnumerable MutatedSyntaxTrees { get; } - } - -} diff --git a/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs deleted file mode 100644 index b1b3f39852..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/ProjectComponentsExtensions.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Stryker.Configuration.Helpers; - -namespace Stryker.Configuration.ProjectComponents -{ - /// - /// Contains extension methods for project components. - /// - public static class IProjectComponentsExtensions - { - /// - /// Checks with the given s whether all parts of the component are excluded. - /// - /// The file to check. - /// The file patters to check with. - /// If any parts of the file are included false; otherwise true. - public static bool IsComponentExcluded(this IReadOnlyProjectComponent projectComponent, IEnumerable filePatterns) - { - var includePattern = filePatterns.Where(x => !x.IsExclude).ToList(); - var excludePattern = filePatterns.Where(x => x.IsExclude).ToList(); - - // Get in- and excluded spans - var includedSpans = includePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); - var excludedSpans = excludePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); - - // If there are only included spans, the file is not excluded. - if ((includedSpans.Any() && !excludedSpans.Any()) || projectComponent.Parent?.Parent == null) - { - return false; - } - - return !includedSpans.RemoveOverlap(excludedSpans).Any(); - - bool MatchesFilePattern(FilePattern pattern) => - pattern.Glob.IsMatch(projectComponent.FullPath) || - pattern.Glob.IsMatch(projectComponent.RelativePath); - } - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/Solution.cs b/src/Stryker.Abstractions/ProjectComponents/Solution.cs deleted file mode 100644 index d5d84f8788..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/Solution.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Stryker.Configuration.Mutants; - -namespace Stryker.Configuration.ProjectComponents -{ - public class Solution : ProjectComponent, IReadOnlyFolderComposite - { - private readonly IList _children = new List(); - - public IEnumerable Children => _children; - - public override IEnumerable Mutants - { - get => Children.SelectMany(x => x.Mutants); - set => throw new NotSupportedException("Folders do not contain mutants."); - } - - public void Add(IProjectComponent child) => _children.Add(child); - - public void AddRange(IEnumerable children) - { - foreach (var child in children) - { - Add(child); - } - } - - public override void Display() - { - foreach (var child in Children) - { - child.DisplayFile = DisplayFile; - child.DisplayFolder = DisplayFolder; - child.Display(); - } - } - - public override IEnumerable GetAllFiles() => Children.SelectMany(x => x.GetAllFiles()); - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs b/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs deleted file mode 100644 index 1076a8f033..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/SourceProjects/SourceProjectInfo.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using Buildalyzer; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.ProjectComponents.TestProjects; - -namespace Stryker.Configuration.ProjectComponents.SourceProjects; - -public class SourceProjectInfo : IProjectAndTests -{ - private readonly List _warnings = []; - - public Action OnProjectBuilt {get;set;} - - public IAnalyzerResult AnalyzerResult { get; set; } - - /// - /// The Folder/File structure found in the project under test. - /// - public IProjectComponent ProjectContents { get; set; } - - public bool IsFullFramework => AnalyzerResult.TargetsFullFramework(); - - public string HelperNamespace => CodeInjector.HelperNamespace; - - public CodeInjection CodeInjector { get;} = new(); - - public TestProjectsInfo TestProjectsInfo { get; set; } - - public IReadOnlyCollection Warnings => _warnings; - - public IReadOnlyList GetTestAssemblies() => - TestProjectsInfo.GetTestAssemblies(); - - public string LogError(string error) - { - _warnings.Add(error); - return error; - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs deleted file mode 100644 index 9bdc0ae606..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestCase.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using Microsoft.CodeAnalysis; - -namespace Stryker.Configuration.ProjectComponents.TestProjects -{ - public sealed class TestCase : IEquatable - { - public Guid Id { get; init; } - public string Name { get; init; } - public SyntaxNode Node { get; init; } - - public bool Equals(TestCase other) => other.Id == Id && other.Name == Name && other.Node.Span == Node.Span; - - public override bool Equals(object obj) => obj is TestCase @case && Equals(@case); - - public override int GetHashCode() => (Id, Name).GetHashCode(); - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs deleted file mode 100644 index 23ad2e2f6d..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestFile.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.CodeAnalysis; - -namespace Stryker.Configuration.ProjectComponents.TestProjects -{ - public sealed class TestFile : IEquatable - { - public SyntaxTree SyntaxTree { get; init; } - public string FilePath { get; init; } - public string Source { get; init; } - public IEnumerable Tests { get; private set; } = new List(); - - public void AddTest(Guid id, string name, SyntaxNode node) - { - if (Tests.Any(test => test.Id == id)) - { - return; - } - - ((IList)Tests).Add(new TestCase - { - Id = id, - Name = name, - Node = node - }); - } - - public bool Equals(TestFile other) => other!=null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); - - public override bool Equals(object obj) => obj is TestFile file && Equals(file); - - // Stryker disable once bitwise: Bitwise mutation does not change functional usage of GetHashCode - public override int GetHashCode() => FilePath.GetHashCode() ^ Source.GetHashCode(); - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs deleted file mode 100644 index 41df846b78..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProject.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO.Abstractions; -using System.Linq; -using System.Text; -using Buildalyzer; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.MutantFilters.Extensions; - -namespace Stryker.Configuration.ProjectComponents.TestProjects -{ - public sealed class TestProject : IEquatable - { - public IAnalyzerResult AnalyzerResult { get; } - - public string ProjectFilePath => AnalyzerResult.ProjectFilePath; - public IEnumerable TestFiles { get; } - - public TestProject(IFileSystem fileSystem, IAnalyzerResult testProjectAnalyzerResult) - { - AssertValidTestProject(testProjectAnalyzerResult); - - fileSystem ??= new FileSystem(); - - AnalyzerResult = testProjectAnalyzerResult; - - var testFiles = new List(); - foreach (var file in testProjectAnalyzerResult.SourceFiles) - { - var sourceCode = fileSystem.File.ReadAllText(file); - var syntaxTree = CSharpSyntaxTree.ParseText(sourceCode, - path: file, - encoding: Encoding.UTF32, - options: new CSharpParseOptions(LanguageVersion.Latest, DocumentationMode.None, preprocessorSymbols: testProjectAnalyzerResult.PreprocessorSymbols)); - - if (!syntaxTree.IsGenerated()) - { - testFiles.Add(new TestFile - { - SyntaxTree = syntaxTree, - FilePath = file, - Source = sourceCode - }); - } - } - - TestFiles = testFiles; - } - - private static void AssertValidTestProject(IAnalyzerResult testProjectAnalyzerResult) - { - if (testProjectAnalyzerResult.References.Any(r => r.Contains("Microsoft.VisualStudio.QualityTools.UnitTestFramework"))) - { - throw new InputException("Please upgrade your test projects to MsTest V2. Stryker.NET uses VSTest which does not support MsTest V1.", - @"See https://devblogs.microsoft.com/devops/upgrade-to-mstest-v2/ for upgrade instructions."); - } - } - - public bool Equals(TestProject other) => other.AnalyzerResult.Equals(AnalyzerResult) && other.TestFiles.SequenceEqual(TestFiles); - - public override bool Equals(object obj) => obj is TestProject project && Equals(project); - - public override int GetHashCode() => AnalyzerResult.GetHashCode(); - } -} diff --git a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs deleted file mode 100644 index a776de4d73..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.IO.Abstractions; -using System.Linq; -using Buildalyzer; -using Microsoft.Extensions.Logging; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; - -namespace Stryker.Configuration.ProjectComponents.TestProjects; - -public class TestProjectsInfo -{ - private readonly IFileSystem _fileSystem; - private readonly ILogger _logger; - - public IEnumerable TestProjects { get; set; } - - public IEnumerable TestFiles => TestProjects.SelectMany(testProject => testProject.TestFiles).Distinct(); - - public IEnumerable AnalyzerResults => TestProjects.Select(testProject => testProject.AnalyzerResult); - - public IReadOnlyList GetTestAssemblies() => - AnalyzerResults.Select(a => a.GetAssemblyPath()).ToList(); - - public TestProjectsInfo(IFileSystem fileSystem, ILogger logger = null) - { - _fileSystem = fileSystem ?? new FileSystem(); - _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger(); - TestProjects = []; - } - - public static TestProjectsInfo operator +(TestProjectsInfo a, TestProjectsInfo b) => - new(a._fileSystem, a._logger) - { - TestProjects = a.TestProjects.Union(b.TestProjects) - }; - - public void RestoreOriginalAssembly(IAnalyzerResult sourceProject) - { - foreach (var testProject in AnalyzerResults) - { - var injectionPath = GetInjectionFilePath(testProject, sourceProject); - var backupFilePath = GetBackupName(injectionPath); - - if (!_fileSystem.File.Exists(backupFilePath)) - { - continue; - } - try - { - _fileSystem.File.Copy(backupFilePath, injectionPath, true); - } - catch (IOException ex) - { - _logger.LogWarning(ex, "Failed to restore output assembly {Path}. Mutated assembly is still in place.", injectionPath); - } - } - } - - public void BackupOriginalAssembly(IAnalyzerResult sourceProject) - { - foreach (var testProject in AnalyzerResults) - { - var injectionPath = GetInjectionFilePath(testProject, sourceProject); - var backupFilePath = GetBackupName(injectionPath); - if (!_fileSystem.Directory.Exists(sourceProject.GetAssemblyDirectoryPath())) - { - _fileSystem.Directory.CreateDirectory(sourceProject.GetAssemblyDirectoryPath()); - } - if (_fileSystem.File.Exists(injectionPath)) - { - // Only create backup if there isn't already a backup - if (!_fileSystem.File.Exists(backupFilePath)) - { - _fileSystem.File.Move(injectionPath, backupFilePath, false); - } - } - else - { - _logger.LogWarning("Could not locate source assembly {injectionPath}", injectionPath); - } - } - } - - public static string GetInjectionFilePath(IAnalyzerResult testProject, IAnalyzerResult sourceProject) => Path.Combine(testProject.GetAssemblyDirectoryPath(), sourceProject.GetAssemblyFileName()); - - private static string GetBackupName(string injectionPath) => injectionPath + ".stryker-unchanged"; -} diff --git a/src/Stryker.Abstractions/Reporting/IJsonMutant.cs b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs index 576ac04316..43a3cca04c 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonMutant.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface IJsonMutant { diff --git a/src/Stryker.Abstractions/Reporting/IJsonReport.cs b/src/Stryker.Abstractions/Reporting/IJsonReport.cs index 5a358ba093..fdf1ffd857 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonReport.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonReport.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface IJsonReport { diff --git a/src/Stryker.Abstractions/Reporting/IJsonTest.cs b/src/Stryker.Abstractions/Reporting/IJsonTest.cs index 22cd772859..69278f306d 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonTest.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonTest.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface IJsonTest { diff --git a/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs index ddfa0c94db..0dde428f3b 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface IJsonTestFile { diff --git a/src/Stryker.Abstractions/Reporting/ILocation.cs b/src/Stryker.Abstractions/Reporting/ILocation.cs index 588f0bc46c..53ed41adf3 100644 --- a/src/Stryker.Abstractions/Reporting/ILocation.cs +++ b/src/Stryker.Abstractions/Reporting/ILocation.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface ILocation { diff --git a/src/Stryker.Abstractions/Reporting/IPosition.cs b/src/Stryker.Abstractions/Reporting/IPosition.cs index 0aa0ee3c2b..ecba70e31c 100644 --- a/src/Stryker.Abstractions/Reporting/IPosition.cs +++ b/src/Stryker.Abstractions/Reporting/IPosition.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface IPosition { diff --git a/src/Stryker.Abstractions/Reporting/IReporter.cs b/src/Stryker.Abstractions/Reporting/IReporter.cs index 07395901c2..f7df907d2d 100644 --- a/src/Stryker.Abstractions/Reporting/IReporter.cs +++ b/src/Stryker.Abstractions/Reporting/IReporter.cs @@ -1,17 +1,15 @@ -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; + +public interface IReporter { - public interface IReporter - { - // Will get called when the project has been mutated - void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo); - // Will get called on start before first mutation is tested - void OnStartMutantTestRun(IEnumerable mutantsToBeTested); - // Will get called when a mutation has been tested - void OnMutantTested(IReadOnlyMutant result); - // Will get called when all mutations have been tested - void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo); - } + // Will get called when the project has been mutated + void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo); + // Will get called on start before first mutation is tested + void OnStartMutantTestRun(IEnumerable mutantsToBeTested); + // Will get called when a mutation has been tested + void OnMutantTested(IReadOnlyMutant result); + // Will get called when all mutations have been tested + void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo); } diff --git a/src/Stryker.Abstractions/Reporting/ISourceFile.cs b/src/Stryker.Abstractions/Reporting/ISourceFile.cs index 183cd3231d..768bdfdad9 100644 --- a/src/Stryker.Abstractions/Reporting/ISourceFile.cs +++ b/src/Stryker.Abstractions/Reporting/ISourceFile.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Configuration.Reporting; +namespace Stryker.Abstractions.Reporting; public interface ISourceFile { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs b/src/Stryker.Abstractions/Reporting/Reporter.cs similarity index 84% rename from src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs rename to src/Stryker.Abstractions/Reporting/Reporter.cs index 716b3b60db..671e25f185 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Reporter.cs +++ b/src/Stryker.Abstractions/Reporting/Reporter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { public enum Reporter { diff --git a/src/Stryker.Abstractions/Stryker.Abstractions.csproj b/src/Stryker.Abstractions/Stryker.Abstractions.csproj index a55b5a2a43..fcc3b11fbc 100644 --- a/src/Stryker.Abstractions/Stryker.Abstractions.csproj +++ b/src/Stryker.Abstractions/Stryker.Abstractions.csproj @@ -7,10 +7,17 @@ + + + + + + + diff --git a/src/Stryker.Abstractions/TestRunners/ITestGuids.cs b/src/Stryker.Abstractions/Testing/ITestGuids.cs similarity index 83% rename from src/Stryker.Abstractions/TestRunners/ITestGuids.cs rename to src/Stryker.Abstractions/Testing/ITestGuids.cs index fc7521c254..407eeb48e6 100644 --- a/src/Stryker.Abstractions/TestRunners/ITestGuids.cs +++ b/src/Stryker.Abstractions/Testing/ITestGuids.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace Stryker.Configuration.TestRunners +namespace Stryker.Abstractions.TestRunners { // represents a simple list of test identifier with some properties public interface ITestGuids diff --git a/src/Stryker.Abstractions/packages.lock.json b/src/Stryker.Abstractions/packages.lock.json index 84690a782c..f6ff741e01 100644 --- a/src/Stryker.Abstractions/packages.lock.json +++ b/src/Stryker.Abstractions/packages.lock.json @@ -2,6 +2,23 @@ "version": 2, "dependencies": { "net8.0": { + "Buildalyzer": { + "type": "Direct", + "requested": "[7.0.2, )", + "resolved": "7.0.2", + "contentHash": "LCbBUL22CaMwGJKGomc+DVsL+NNeWs5wxw6ov6/e6sKY+Jij4BM7JnUqjg3htP9AgmU8JBsfs7xTvWfUyaoHnA==", + "dependencies": { + "Buildalyzer.Logger": "7.0.2", + "MSBuild.StructuredLogger": "2.1.815", + "Microsoft.Build": "17.0.1", + "Microsoft.Build.Tasks.Core": "17.0.1", + "Microsoft.CodeAnalysis.CSharp": "4.0.0", + "Microsoft.CodeAnalysis.VisualBasic": "4.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "MsBuildPipeLogger.Server": "1.1.6", + "NuGet.Frameworks": "6.9.1" + } + }, "DotNet.Glob": { "type": "Direct", "requested": "[3.1.3, )", @@ -14,6 +31,17 @@ "resolved": "1.2.4", "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" }, + "Microsoft.CodeAnalysis.Common": { + "type": "Direct", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "7O4+dn0fNKykPpEB1i8/5EKzwD3fuu/shdbbnnsBmdiHMaBz6telOubDFwPwLQQ/PvOAWTFIWWTyAOmWvXRD2g==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + }, "Microsoft.CodeAnalysis.CSharp": { "type": "Direct", "requested": "[4.10.0, )", @@ -41,11 +69,258 @@ "resolved": "4.0.0", "contentHash": "2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==" }, + "TestableIO.System.IO.Abstractions.Wrappers": { + "type": "Direct", + "requested": "[21.0.26, )", + "resolved": "21.0.26", + "contentHash": "lvrJF2Oz/4vp5rVIndW9RC/cxGfErnE+Bt/jVNFu7/po+7n8UNZDjgUGrbRGtQfW6zkaUPx/WTONT1Tf9iacdQ==", + "dependencies": { + "TestableIO.System.IO.Abstractions": "21.0.26" + } + }, + "Buildalyzer.Logger": { + "type": "Transitive", + "resolved": "7.0.2", + "contentHash": "awL4TbcBjWAgmeWbi7G6OkUIr0OEPwZASC09Frd6A84LmKSZWOICgZ9vUTCtwlVtepr6FJNTVHxWR6HopfbwLQ==" + }, + "Microsoft.Build": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "sNhRGwqVoyj9+PTg5D/ntbB4TPRAx/sCF0qmJ2bB93c62KniyPGPbahf0FXD1rpeQitXDo52p3F5kRZBg+l0dw==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections.Immutable": "5.0.0", + "System.Configuration.ConfigurationManager": "4.7.0", + "System.Reflection.Metadata": "1.6.0", + "System.Security.Principal.Windows": "4.7.0", + "System.Text.Encoding.CodePages": "4.0.1", + "System.Text.Json": "5.0.2", + "System.Threading.Tasks.Dataflow": "4.9.0" + } + }, + "Microsoft.Build.Framework": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "znFg/TGxwtXISkNMWstaCcl7l2zM4p7vYsXWL9HyJw2w9/F1cpq50H76xksXo/dH2ZKTgc3uG4jkLboL4rZfbg==", + "dependencies": { + "System.Security.Permissions": "4.7.0" + } + }, + "Microsoft.Build.Tasks.Core": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "+AGJSLh9RCkgq3G9VpiXBD+GeTmw5VAgYfcOPud4zk1FeMSctAUXVDJzenDIYKe2aawjFHMZUjUfji0Qd5SCBQ==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.Build.Utilities.Core": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.CodeDom": "4.4.0", + "System.Collections.Immutable": "5.0.0", + "System.Reflection.Metadata": "1.6.0", + "System.Resources.Extensions": "4.6.0", + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Cryptography.Xml": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Threading.Tasks.Dataflow": "4.9.0" + } + }, + "Microsoft.Build.Utilities.Core": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "Ot9B3GOVthAMs903+dyvpcAwimxPkGs7QVGqZ49KjmgIB51VrcJXt/L9l6BpssIRuwf4wOWZOuGTkgFJtmwgVg==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections.Immutable": "5.0.0", + "System.Configuration.ConfigurationManager": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Text.Encoding.CodePages": "4.0.1" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.NET.StringTools": { + "type": "Transitive", + "resolved": "1.0.0", + "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", + "dependencies": { + "System.Memory": "4.5.4", + "System.Runtime.CompilerServices.Unsafe": "5.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "3.1.0", + "contentHash": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "Microsoft.Win32.SystemEvents": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0" + } + }, + "MSBuild.StructuredLogger": { + "type": "Transitive", + "resolved": "2.1.815", + "contentHash": "5UfWYgsWBGI3w0npjYLeXPv8TUcNmGB/QBhoYLDeYTosuvmG6pz6HPb+xPg/Boi1bmw2Bgnjo+XopcwzCbZAqg==", + "dependencies": { + "Microsoft.Build.Framework": "16.10.0", + "Microsoft.Build.Utilities.Core": "16.10.0" + } + }, + "MsBuildPipeLogger.Server": { + "type": "Transitive", + "resolved": "1.1.6", + "contentHash": "rls0hb7plSfVFCqScDxTqtGpIlMfoQEchqjmK/YtXDML11GU5jI+oCi9YsikGulJVUv/vLSY6Ktah0uXwv25EA==", + "dependencies": { + "Microsoft.Build": "15.3.409" + } + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "4.4.0", + "contentHash": "2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==" + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Collections.Immutable": { "type": "Transitive", "resolved": "8.0.0", "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, + "System.Configuration.ConfigurationManager": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "/anOTeSZCNNI2zDilogWrZ8pNqCmYbzGNexUnNhjW8k0sHqEZ2nHJBp147jBV3hGYswu5lINpNg1vxR7bnqvVA==", + "dependencies": { + "System.Security.Cryptography.ProtectedData": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Drawing.Common": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "Microsoft.Win32.SystemEvents": "4.7.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Reflection.Metadata": { "type": "Transitive", "resolved": "8.0.0", @@ -54,22 +329,237 @@ "System.Collections.Immutable": "8.0.0" } }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.Extensions": { + "type": "Transitive", + "resolved": "4.6.0", + "contentHash": "6aVCk8oTFZNT3Tx1jjiPi6+aipiJ3qMZYttAREKTRJidP50YvNeOn4PXrqzfA5qC23fLReq2JYp+nJwzj62HGw==" + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "System.Security.Principal.Windows": "4.7.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "4WQjFuypWtxb/bl/YwEE7LYGn4fgpsikFfBU6xwEm4YBYiRAhXAEJ62lILBu2JJSFbClIAntFTGfDZafn8yZTg==" + }, + "System.Security.Cryptography.Pkcs": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "0Srzh6YlhjuMxaqMyeCCdZs22cucaUAG6SKDd3gNHBJmre0VZ71ekzWu9rvLD4YXPetyNdPvV6Qst+8C++9v3Q==", + "dependencies": { + "System.Security.Cryptography.Cng": "4.7.0" + } + }, + "System.Security.Cryptography.ProtectedData": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ==" + }, + "System.Security.Cryptography.Xml": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "B6pAyxMvXGbZemb+ER877KSr6OKis+qAdxhhKKK36I6sgj2js8mbcEVviZEHYV8XRTWjbKsAq8Z/zoaegA30dA==", + "dependencies": { + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Security.Permissions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "dkOV6YYVBnYRa15/yv004eCGRBVADXw8qRbbNiCn/XpdJSUXkkUeIvdvFHkvnko4CdKMqG8yRHC4ox83LSlMsQ==", + "dependencies": { + "System.Security.AccessControl": "4.7.0", + "System.Windows.Extensions": "4.7.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==" + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "h4z6rrA/hxWf4655D18IIZ0eaLRa3tQC/j+e26W+VinIHY0l07iEXaAvO0YSYq3MvCjMYy8Zs5AdC1sxNQOB7Q==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "5.0.2", + "contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==" + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.0.11", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "dependencies": { + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Dataflow": { + "type": "Transitive", + "resolved": "4.9.0", + "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" + }, + "System.Windows.Extensions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "CeWTdRNfRaSh0pm2gDTJFwVaXfTq6Xwv/sA887iwPTneW7oMtMlpvDIO+U60+3GWTB7Aom6oQwv5VZVUhQRdPQ==", + "dependencies": { + "System.Drawing.Common": "4.7.0" + } + }, + "TestableIO.System.IO.Abstractions": { + "type": "Transitive", + "resolved": "21.0.26", + "contentHash": "6XwIymB/HIHdu4UAWcW+kP1Q4untd4T01leOfPYObKzwoqKOfXTw6GneBpQZ5TLAq9TUc2yS4j6asK2e2NNXog==" + }, + "stryker.utilities": { + "type": "Project" + }, "Microsoft.CodeAnalysis.Analyzers": { "type": "CentralTransitive", "requested": "[3.3.4, )", "resolved": "3.3.4", "contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==" }, - "Microsoft.CodeAnalysis.Common": { + "Microsoft.CodeAnalysis.VisualBasic": { "type": "CentralTransitive", "requested": "[4.10.0, )", - "resolved": "4.10.0", - "contentHash": "7O4+dn0fNKykPpEB1i8/5EKzwD3fuu/shdbbnnsBmdiHMaBz6telOubDFwPwLQQ/PvOAWTFIWWTyAOmWvXRD2g==", + "resolved": "4.0.0", + "contentHash": "FK+OGUMUh9O6/GCwyIy4c/sOrarF36/yEY07BbXVYMql1qCqHGWfyWXyCQKQ6m/KqReCqW6aO4cK7kK/AYBpyA==", "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.4", - "System.Collections.Immutable": "8.0.0", - "System.Reflection.Metadata": "8.0.0" + "Microsoft.CodeAnalysis.Common": "[4.0.0]" } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "6.0.0", + "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Diagnostics.DiagnosticSource": "6.0.0" + } + }, + "NuGet.Frameworks": { + "type": "CentralTransitive", + "requested": "[6.10.1, )", + "resolved": "6.9.1", + "contentHash": "DaKh3lenPUvzGccPkbI97BIvA27z+/UsL3ankfoZlX/4vBVDK5N1sheFTQ+GuJf+IgSzsJz/A21SPUpQLHwUtA==" } } } diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs index 30a114188c..4e21146bf2 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/CommandLineConfigReaderTests.cs @@ -1,9 +1,9 @@ using System.Linq; using McMaster.Extensions.CommandLineUtils; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; +using Stryker.Abstractions.Options; using Stryker.CLI.CommandLineConfig; -using Stryker.Configuration; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs index 9f0d5e9ad4..97ab2b54c8 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/ConfigBuilderTests.cs @@ -3,10 +3,11 @@ using Moq; using Shouldly; using Stryker.CLI.CommandLineConfig; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs index d2128caadf..245c7c024c 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs @@ -1,12 +1,12 @@ using System.IO; using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration; -using Stryker.Configuration.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Reporters; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs index f325363419..93e3785474 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/Logging/InputBuilderTests.cs @@ -5,7 +5,7 @@ using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Options; +using Stryker.Abstractions.Options; using Stryker.CLI.Logging; namespace Stryker.CLI.UnitTest diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs index 32d60ec331..413729dcf9 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs @@ -8,8 +8,8 @@ using Spectre.Console.Testing; using Stryker.CLI.Clients; using Stryker.CLI.Logging; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Stryker.CLI.UnitTest; diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs index 03a04efb12..57b69feb60 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs @@ -11,13 +11,13 @@ using Spectre.Console.Testing; using Stryker.CLI.Clients; using Stryker.CLI.Logging; -using Stryker.Configuration; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Options; +using Stryker.Abstractions.Options; namespace Stryker.CLI.UnitTest { @@ -113,7 +113,7 @@ public void OnMutationScoreBelowThresholdBreak_ShouldReturn_ExitCodeBreakThresho var strykerRunResult = new StrykerRunResult(options, 0.3); mock.Setup(x => x.RunMutationTest(It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((c, l, p) => Configuration.Logging.ApplicationLogging.LoggerFactory = l) + .Callback((c, l, p) => Abstractions.Logging.ApplicationLogging.LoggerFactory = l) .Returns(strykerRunResult) .Verifiable(); diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 5d4dc494a6..1e2f19d6f0 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -1610,10 +1610,14 @@ "stryker.abstractions": { "type": "Project", "dependencies": { + "Buildalyzer": "[7.0.2, )", "DotNet.Glob": "[3.1.3, )", "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", - "Serilog": "[4.0.0, )" + "Serilog": "[4.0.0, )", + "Stryker.Utilities": "[1.0.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, "stryker.configuration": { @@ -1639,6 +1643,9 @@ "RegexParser": "[0.5.1, )" } }, + "stryker.utilities": { + "type": "Project" + }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", "requested": "[12.19.0, )", diff --git a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs index ad15a8d0cf..08809d7b43 100644 --- a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs +++ b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CliInput.cs @@ -1,5 +1,5 @@ using McMaster.Extensions.CommandLineUtils; -using Stryker.Configuration; +using Stryker.Abstractions.Options; namespace Stryker.CLI; diff --git a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs index ef0dcb431d..47c2113de1 100644 --- a/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs +++ b/src/Stryker.CLI/Stryker.CLI/CommandLineConfig/CommandLineConfigReader.cs @@ -4,9 +4,9 @@ using System.Linq; using McMaster.Extensions.CommandLineUtils; using Spectre.Console; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Options.Inputs; namespace Stryker.CLI.CommandLineConfig { diff --git a/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs b/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs index 09e5eba134..eb06191489 100644 --- a/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs +++ b/src/Stryker.CLI/Stryker.CLI/ConfigBuilder.cs @@ -1,8 +1,8 @@ using System.IO; using McMaster.Extensions.CommandLineUtils; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options; using Stryker.CLI.CommandLineConfig; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs b/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs index b7e3787979..f5c8895cba 100644 --- a/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs +++ b/src/Stryker.CLI/Stryker.CLI/FileConfigReader.cs @@ -5,8 +5,8 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; diff --git a/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs b/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs index 7cf8be930b..3dc31f7bdb 100644 --- a/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs +++ b/src/Stryker.CLI/Stryker.CLI/FileConfigWriter.cs @@ -1,6 +1,6 @@ using System.Linq; using System.Text.Json; -using Stryker.Configuration; +using Stryker.Abstractions.Options; namespace Stryker.CLI; diff --git a/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs b/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs index 8f5cdd7d22..66d982b44a 100644 --- a/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs +++ b/src/Stryker.CLI/Stryker.CLI/Logging/LoggingInitializer.cs @@ -2,8 +2,8 @@ using System.IO; using System.IO.Abstractions; using Spectre.Console; -using Stryker.Configuration; -using Stryker.Configuration; +using Stryker.Abstractions.Options; +using Stryker.Utilities; namespace Stryker.CLI.Logging { diff --git a/src/Stryker.CLI/Stryker.CLI/Program.cs b/src/Stryker.CLI/Stryker.CLI/Program.cs index 7be42d1267..28849c2701 100644 --- a/src/Stryker.CLI/Stryker.CLI/Program.cs +++ b/src/Stryker.CLI/Stryker.CLI/Program.cs @@ -1,6 +1,6 @@ using Spectre.Console; -using Stryker.Configuration; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.Exceptions; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs index cfe4b879a9..7fefaaa8f2 100644 --- a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs +++ b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs @@ -6,11 +6,11 @@ using Microsoft.Extensions.Logging; using NuGet.Versioning; using Spectre.Console; +using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.CLI.Clients; using Stryker.CLI.CommandLineConfig; using Stryker.CLI.Logging; -using Stryker.Configuration; -using Stryker.Configuration; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index a17666d4fe..e1e9b57284 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -1431,10 +1431,14 @@ "stryker.abstractions": { "type": "Project", "dependencies": { + "Buildalyzer": "[7.0.2, )", "DotNet.Glob": "[3.1.3, )", "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", - "Serilog": "[4.0.0, )" + "Serilog": "[4.0.0, )", + "Stryker.Utilities": "[1.0.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, "stryker.configuration": { @@ -1460,6 +1464,9 @@ "RegexParser": "[0.5.1, )" } }, + "stryker.utilities": { + "type": "Project" + }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", "requested": "[12.19.0, )", diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs index 102ed97605..889e7b72a3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs @@ -5,7 +5,7 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { /// /// Making asserting syntax trees more easy diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs index 27c0f19f52..7f16668189 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs @@ -8,14 +8,14 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.UnitTest.Reporters; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Baseline.Providers +namespace Stryker.Abstractions.UnitTest.Baseline.Providers { [TestClass] public class AzureFileShareBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs index d38a803780..bf923f34fe 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs @@ -1,14 +1,14 @@ using System.Threading.Tasks; using Moq; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Clients; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.UnitTest.Reporters; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Clients; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Baseline.Providers +namespace Stryker.Abstractions.UnitTest.Baseline.Providers { [TestClass] public class DashboardBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs index 7e89dc0b89..c7e669db35 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs @@ -2,14 +2,15 @@ using System.Threading.Tasks; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.UnitTest.Reporters; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.UnitTest.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.Baseline.Providers +namespace Stryker.Abstractions.UnitTest.Baseline.Providers { [TestClass] public class DiskBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs index 94a8e18339..028000ade8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs @@ -1,11 +1,11 @@ using System.IO; using Shouldly; -using Stryker.Configuration.Baseline.Utils; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Baseline.Utils; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Baseline.Utils +namespace Stryker.Abstractions.UnitTest.Baseline.Utils { [TestClass] public class BaselineMutantHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs index 353d9e92b2..8c8212df60 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs @@ -9,17 +9,17 @@ using Moq; using Moq.Protected; using Shouldly; -using Stryker.Configuration.Clients; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; -using Stryker.Configuration.UnitTest.Reporters.Json; - -namespace Stryker.Configuration.UnitTest.Clients +using Stryker.Abstractions.Clients; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.UnitTest.Reporters.Json; +using Stryker.Abstractions.Mutants; + +namespace Stryker.Abstractions.UnitTest.Clients { [TestClass] public class DashboardClientsTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs index 2afc419dc3..db2b96364c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs @@ -10,19 +10,22 @@ using Microsoft.CodeAnalysis.CSharp; using Moq; using Shouldly; -using Stryker.Configuration.Compiling; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Compiling; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Compiling; +namespace Stryker.Abstractions.UnitTest.Compiling; [TestClass] public class CSharpCompilingProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs index 802cf1d8c9..4f550b8ce1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs @@ -12,16 +12,16 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Compiling; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.SourceProjects; - -namespace Stryker.Configuration.UnitTest.Compiling +using Stryker.Abstractions.Compiling; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.SourceProjects; + +namespace Stryker.Abstractions.UnitTest.Compiling { [TestClass] public class CSharpRollbackProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs index 43ecaa7da3..c4aca92676 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs @@ -5,11 +5,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; -namespace Stryker.Configuration.UnitTest.DashboardCompare +namespace Stryker.Abstractions.UnitTest.DashboardCompare { [TestClass] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs index da14c948b0..aa621d6644 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs @@ -5,12 +5,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.DiffProviders; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; - -namespace Stryker.Configuration.UnitTest.DiffProviders +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.DiffProviders; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.Options; +using Stryker.Utilities; + +namespace Stryker.Abstractions.UnitTest.DiffProviders { [TestClass] public class GitDiffProviderTests : TestBase @@ -213,7 +215,7 @@ public void ScanDiff_Throws_Stryker_Input_Exception_When_Commit_null() public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles() { // Arrange - var diffIgnoreFiles = new[] { new ExclusionPattern("/c/Users/JohnDoe/Project/Tests/Test.cs") }; + var diffIgnoreFiles = new IExclusionPattern[] { new ExclusionPattern("/c/Users/JohnDoe/Project/Tests/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -289,7 +291,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles() public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Single_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new ExclusionPattern("/c/Users/JohnDoe/Project/*/Test.cs") }; + var diffIgnoreFiles = new IExclusionPattern[] { new ExclusionPattern("/c/Users/JohnDoe/Project/*/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -365,7 +367,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Singl public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Multi_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new ExclusionPattern("**/Test.cs") }; + var diffIgnoreFiles = new IExclusionPattern[] { new ExclusionPattern("**/Test.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() @@ -441,7 +443,7 @@ public void ScanDiffReturnsListOfFiles_ExcludingTestFilesInDiffIgnoreFiles_Multi public void ScanDiffReturnsListOfFiles_ExcludingFilesInDiffIgnoreFiles_Multi_Asterisk() { // Arrange - var diffIgnoreFiles = new[] { new ExclusionPattern("**/file.cs") }; + var diffIgnoreFiles = new IExclusionPattern[] { new ExclusionPattern("**/file.cs") }; var basePath = FilePathUtils.NormalizePathSeparators("/c/Users/JohnDoe/Project/Tests"); var options = new StrykerOptions() diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs index a864bbfad9..6ea8891c47 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs @@ -1,8 +1,9 @@ using System; using Shouldly; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { [TestClass] public class ExclusionPatternTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs index 236bc6f761..79accb53dc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { [TestClass] public class FilePatternTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs index f22a191306..20a7a65de8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs @@ -7,10 +7,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.Fsharp +namespace Stryker.Abstractions.UnitTest.Fsharp { [TestClass] public class FsharpFileDetectionTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs index 92c728e1e5..88117bf7dc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -2,12 +2,12 @@ using System.Linq; using FSharp.Compiler.Text; using Shouldly; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Range = FSharp.Compiler.Text.Range; -namespace Stryker.Configuration.UnitTest.Helpers +namespace Stryker.Abstractions.UnitTest.Helpers { [TestClass] public class RangeHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs index b15acd2a6c..c33629fe97 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs @@ -3,10 +3,10 @@ using System.Linq; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Helpers +namespace Stryker.Abstractions.UnitTest.Helpers { [TestClass] public class TextSpanHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs index 42da84dfa4..93d4ff1c15 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest; +namespace Stryker.Abstractions.UnitTest; /// /// An extension to the [Ignore] attribute. Instead of using test lists / test categories to conditionally diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs index f4a492aca6..1cd1edb424 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs @@ -7,10 +7,10 @@ using Buildalyzer.Construction; using Buildalyzer.Environment; using Moq; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Testing; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Testing; -namespace Stryker.Configuration.UnitTest.Initialisation; +namespace Stryker.Abstractions.UnitTest.Initialisation; public class BuildAnalyzerTestsBase : TestBase { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs index d62eba4987..dd5a98557c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Abstractions.Initialisation.Buildalyzer; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Initialisation.Buildalyzer; +namespace Stryker.Abstractions.UnitTest.Initialisation.Buildalyzer; [TestClass] public class AnalyzerResultExtensionsTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs index a50ddd18d1..b2f38784fd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs @@ -3,12 +3,12 @@ using System.IO; using Moq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Testing; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Testing; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Initialisation; +namespace Stryker.Abstractions.UnitTest.Initialisation; [TestClass] public class InitialBuildProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs index 693a9a6769..304be75d73 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs @@ -4,14 +4,15 @@ using System.Threading; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.UnitTest.Initialisation +namespace Stryker.Abstractions.UnitTest.Initialisation { [TestClass] public class InitialTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs index 17c257fb26..868d67adef 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs @@ -6,18 +6,19 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.UnitTest.Initialisation +namespace Stryker.Abstractions.UnitTest.Initialisation { [TestClass] public class InitialisationProcessTests : TestBase @@ -124,7 +125,7 @@ public void InitialisationProcess_ShouldThrowIfHalfTestsAreFailing() var failedTests = new TestGuidsList(failedTest); initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())).Returns( new InitialTestRun( - new TestRunResult(Array.Empty() ,ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(),TimeSpan.Zero), new TimeoutValueCalculator(0) )); // failing test + new TestRunResult(Array.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(),TimeSpan.Zero), new TimeoutValueCalculator(0) )); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs index b6565747cf..bf8958b05b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs @@ -12,15 +12,16 @@ using Moq; using NuGet.Frameworks; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; using static NuGet.Frameworks.FrameworkConstants; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.Initialisation; +namespace Stryker.Abstractions.UnitTest.Initialisation; [TestClass] public class InputFileResolverTests : BuildAnalyzerTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs index 5422bc28fb..1e0c497dcd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs @@ -3,11 +3,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Testing; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Testing; -namespace Stryker.Configuration.UnitTest.Initialisation; +namespace Stryker.Abstractions.UnitTest.Initialisation; [TestClass] public class NugetRestoreProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs index 260299e23d..b587206e1c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs @@ -6,18 +6,19 @@ using Buildalyzer; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.UnitTest.Initialisation +namespace Stryker.Abstractions.UnitTest.Initialisation { [TestClass] public class ProjectMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs index 2ba1683cc7..6d1e9e896e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs @@ -9,17 +9,18 @@ using Serilog; using Serilog.Events; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.Reporting; - -namespace Stryker.Configuration.UnitTest.Initialisation; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.TestRunners; + +namespace Stryker.Abstractions.UnitTest.Initialisation; [TestClass] public class ProjectOrchestratorTests : BuildAnalyzerTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs index 1a2163153a..93038ae577 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration.Initialisation; +using Stryker.Abstractions.Initialisation; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Initialisation +namespace Stryker.Abstractions.UnitTest.Initialisation { [TestClass] public class TimeoutValueCalculatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs index f6d9f9f028..1c2d02c26f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs @@ -1,14 +1,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.InjectedHelpers; +using Stryker.Abstractions.InjectedHelpers; using System; using System.Collections.Generic; using System.IO.Pipes; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.InjectedHelpers +namespace Stryker.Abstractions.UnitTest.InjectedHelpers { [TestClass] public class InjectedHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs index 56c053a623..e702be5e26 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs @@ -2,7 +2,7 @@ using Moq; using System; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { public static class LoggerMockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs index 04f380f236..e24bf7a3da 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs @@ -1,9 +1,9 @@ using Moq; -using Stryker.Configuration.Testing; +using Stryker.Abstractions.Testing; using System.Collections.Generic; using System.IO; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { public static class MockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs index a4850c33d7..c6c85bad87 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs @@ -1,22 +1,25 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Baseline.Utils; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; -using Stryker.Configuration.UnitTest.Reporters.Json; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Stryker.Configuration.UnitTest.MutantFilters +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Baseline.Utils; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.UnitTest.Reporters.Json; +using Stryker.Abstractions.Mutants; +using Stryker.Reporters.Json.SourceFiles; + +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class BaselineMutantFilterTests : TestBase @@ -201,7 +204,7 @@ public void FilterMutants_WhenMutantSourceCodeIsNull_MutantIsReturned() new Mutant() }; - var jsonMutants = new HashSet + var jsonMutants = new HashSet { new JsonMutant() }; @@ -209,7 +212,7 @@ public void FilterMutants_WhenMutantSourceCodeIsNull_MutantIsReturned() // Setup Mocks var jsonReportFileComponent = new MockJsonReportFileComponent("", "", jsonMutants); - var jsonFileComponents = new Dictionary + var jsonFileComponents = new Dictionary { ["foo.cs"] = jsonReportFileComponent }; @@ -217,7 +220,7 @@ public void FilterMutants_WhenMutantSourceCodeIsNull_MutantIsReturned() var baseline = new MockJsonReport(null, jsonFileComponents); baselineProvider.Setup(mock => mock.Load(It.IsAny())) - .Returns(Task.FromResult((JsonReport)baseline)); + .Returns(Task.FromResult((IJsonReport)baseline)); baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns(string.Empty); @@ -275,7 +278,7 @@ public void FilterMutants_WhenMutantMatchesSourceCode_StatusIsSetToJsonMutant() var baseline = new MockJsonReport(null, jsonFileComponents); baselineProvider.Setup(mock => mock.Load(It.IsAny())) - .Returns(Task.FromResult(baseline as JsonReport)); + .Returns(Task.FromResult(baseline as IJsonReport)); baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); baselineMutantHelper.Setup(mock => mock.GetMutantMatchingSourceCode( @@ -334,7 +337,7 @@ public void FilterMutants_WhenMultipleMatchingMutants_ResultIsSetToNotRun() // Setup Mocks var jsonReportFileComponent = new MockJsonReportFileComponent("", "", jsonMutants); - var jsonFileComponents = new Dictionary + var jsonFileComponents = new Dictionary { ["foo.cs"] = jsonReportFileComponent }; @@ -342,7 +345,7 @@ public void FilterMutants_WhenMultipleMatchingMutants_ResultIsSetToNotRun() var baseline = new MockJsonReport(null, jsonFileComponents); baselineProvider.Setup(mock => mock.Load(It.IsAny())) - .Returns(Task.FromResult(baseline as JsonReport)); + .Returns(Task.FromResult(baseline as IJsonReport)); baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); baselineMutantHelper.Setup(mock => mock.GetMutantMatchingSourceCode( diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs index 9f5e4e0322..a07c5d4cc0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class ExcludeFromCodeCoverageFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs index 335291182f..aa456a5b5f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs @@ -5,14 +5,14 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration; - -namespace Stryker.Configuration.UnitTest.MutantFilters +using Stryker.Abstractions; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions; + +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class ExcludeLinqExpressionFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs index 0f7eaf9b6e..a380a3fc52 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs @@ -1,11 +1,11 @@ using Shouldly; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class ExcludeMutationMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs index c01d3a1357..97dd09ddc0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs @@ -3,13 +3,13 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class FilePatternMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs index b72eaa9f6c..da82dae358 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class IgnoreBlockMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs index ba215804aa..4c44dfccd2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs @@ -6,13 +6,13 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using Shouldly; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class IgnoredMethodMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs index 66fbdf544e..dea02c4a84 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs @@ -1,20 +1,17 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.DiffProviders; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Json; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration; -using Stryker.Configuration; - -namespace Stryker.Configuration.UnitTest.MutantFilters +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.DiffProviders; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters.Json; + +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class MutantFilterFactoryTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs index b84d7b6228..65ddb6744a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs @@ -1,10 +1,10 @@ using Moq; using Shouldly; -using Stryker.Configuration.DiffProviders; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.DiffProviders; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -12,7 +12,7 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutantFilters +namespace Stryker.Abstractions.UnitTest.MutantFilters { [TestClass] public class SinceMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs index d61eb9b18a..f5e6d17f22 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs @@ -2,11 +2,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Mutants; +namespace Stryker.Abstractions.UnitTest.Mutants; [TestClass] public class CsharpMutantOrchestratorTests : MutantOrchestratorTestsBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs index 42d4a2e22f..52d3e0e291 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; -namespace Stryker.Configuration.UnitTest.Mutants +namespace Stryker.Abstractions.UnitTest.Mutants { /// /// This base class provides helper to test source file mutation diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs index 164a865a8a..3bbcb8305c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs @@ -6,14 +6,15 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Mutants +namespace Stryker.Abstractions.UnitTest.Mutants { [TestClass] public class MutantPlacerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs index 87b612fc6d..e6d116e384 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs @@ -1,9 +1,9 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.UnitTest.Mutants +namespace Stryker.Abstractions.UnitTest.Mutants { [TestClass] public class MutantTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs index fe2f80ddbd..da9720306f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs @@ -6,16 +6,16 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Moq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mutation = Stryker.Configuration.Mutants.Mutation; +using Mutation = Stryker.Abstractions.Mutants.Mutation; -namespace Stryker.Configuration.UnitTest.MutationTest +namespace Stryker.Abstractions.UnitTest.MutationTest { [TestClass] public class CSharpMutationTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs index 1a831d2669..ae584b8c4c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Linq; using Moq; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; - -namespace Stryker.Configuration.UnitTest.MutationTest; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Abstractions.Options; + +namespace Stryker.Abstractions.UnitTest.MutationTest; /// /// This class simplifies the creation of run scenarios diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs index 7fd9c1eb77..ace8840387 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs @@ -3,14 +3,14 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.MutationTest +namespace Stryker.Abstractions.UnitTest.MutationTest { [TestClass] public class MutationTestExecutorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs index 984168ed3a..5508e743b5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs @@ -5,19 +5,20 @@ using System.Reflection; using Moq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.MutationTest +namespace Stryker.Abstractions.UnitTest.MutationTest { [TestClass] public class MutationTestProcessTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs index 6f5f7a46c9..a8ff403a0f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs @@ -2,16 +2,16 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class AbstractMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs index 97dbd11f42..a123a55928 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class ArrayCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs index 2c8796535a..395eccf336 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class AssignmentStatementMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs index d22201183b..1a973cddae 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class BinaryExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs index d7864fa842..d5c4fa948d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class BlockMutatorTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs index b45eb493a5..fabbb025cb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class BooleanMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs index cb76c5a007..a8a160d286 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class CheckedMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs index c66d6ebaea..947ddb6da4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.UnitTest.Mutators; +namespace Stryker.Abstractions.UnitTest.Mutators; [TestClass] public class ConditionalExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs index 2f85eb836d..9780565e26 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class InitializerMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs index 0687cf73ea..dbf4cc22b6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class InterpolatedStringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs index c002b3cf7f..abcc2afbfe 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class IsPatternExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs index a717d70ec0..7c5b133b53 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs @@ -2,12 +2,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration; +using Stryker.Abstractions; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class LinqMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs index 95364482e2..6252f94faf 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs @@ -5,10 +5,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class MathMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs index ad0182ee78..b0f79ae784 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; -namespace Stryker.Configuration.UnitTest.Mutators; +namespace Stryker.Abstractions.UnitTest.Mutators; [TestClass] public class NegateConditionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs index 5ee5343eec..4e8fb3c417 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs @@ -1,12 +1,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators; +namespace Stryker.Abstractions.UnitTest.Mutators; [TestClass] public class NullCoalescingExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs index 45aa4598ec..d4665e2a16 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class ObjectCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs index c214a46e4d..cec84d3cd0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class PostfixUnaryMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs index 9df4655122..35c4a8ffb0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class PrefixUnaryMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs index c22cf95be9..ca7e67a1b1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class RegexMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs index 589f8b8e26..a93caa0193 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class StatementMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs index a55c3828d9..6c3a5b3154 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class StringEmptyMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs index 371ceb934b..5ff79571af 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.UnitTest.Mutators; +namespace Stryker.Abstractions.UnitTest.Mutators; [TestClass] public class StringMethodMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs index 0bc0dc9600..96871644a3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class StringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs index 36c24ffbb6..a58267d373 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { [TestClass] public class SwitchExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs index 1d87da31f0..13be99e5e2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Attributes; +using Stryker.Utilities.Attributes; -namespace Stryker.Configuration.UnitTest.Mutators +namespace Stryker.Abstractions.UnitTest.Mutators { public enum TestMutator { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs index c8f7ac18f6..83cc7b8071 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class AdditionalTimeoutMsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs index c638d9fb2b..d403cd54fc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Baseline; +using Stryker.Abstractions.Baseline; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageSasInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs index f738dab467..bf0ed841a7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Baseline; +using Stryker.Abstractions.Baseline; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageUrlInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs index b5a5761f85..f5cd10b666 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class BasePathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs index 62d4c1461f..d31e2ec169 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Baseline; +using Stryker.Abstractions.Baseline; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class BaselineProviderInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs index 0e8cec0840..618093f403 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class BreakOnInitialTestFailureInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs index 1ac6334a1c..ae549dec98 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs @@ -2,11 +2,11 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ConcurrencyInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs index a10d756a80..89f4d51ce9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs @@ -1,9 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs; +namespace Stryker.Abstractions.UnitTest.Options.Inputs; [TestClass] public class ConfigurationInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs index f35a491917..1454627443 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs @@ -1,12 +1,12 @@ using System; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Baseline; +using Stryker.Abstractions.Baseline; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DashboardApiKeyInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs index d5d5ec23ac..8c78313a7e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DashboardUrlInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs index 6c56494732..7f50fc816f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DevModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs index 23dc109dae..c45956226f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs @@ -1,9 +1,9 @@ using System.Linq; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DiffIgnoreChangesInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs index 1d3198f9a3..2aa2f889f8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs @@ -1,9 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DisableBailInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs index 1d9353a62e..02e34fbabd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs @@ -1,9 +1,10 @@ using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class DisableMixMutantsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs index 5259fdc8a6..bc635b05b8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class FallbackVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs index 26eb82031f..6499e6ccda 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs @@ -1,9 +1,9 @@ using System.Linq; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class IgnoreMethodsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs index 7c0a665489..2a0890a9c9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using System.Linq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.UnitTest.Mutators; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.UnitTest.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration; +using Stryker.Abstractions; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class IgnoreMutationsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs index 0f6ca66c7e..a9f4e504ef 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs @@ -3,11 +3,11 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class LanguageVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs index 8d51a09239..d736ef8e4f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class LogToFileInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs index c6f8907692..af0763a6e6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ModuleNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs index c0e6cacdca..d6df02a5e0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class MsBuildPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs index 350146571e..5d1729c75e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs @@ -1,10 +1,10 @@ using System.IO; using System.Linq; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class MutateInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs index 64ddcb2a2e..cacd909b86 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs @@ -1,10 +1,10 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class MutationLevelInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs index 1aeb56612d..e57f069467 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class OpenReportEnabledInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs index 98d2dbaa37..8d1f91e040 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class OpenReportInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs index bc63ae2076..c79e6ad616 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs @@ -1,10 +1,11 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class OptimizationModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs index 1e05669ea7..715894d4a0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs @@ -1,10 +1,10 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class OutputPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs index 47f43d5fb5..bda3292964 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs @@ -1,8 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs index 5dec42de23..569528acf5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs @@ -1,11 +1,11 @@ using System.Linq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ProjectVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs index ceee980f08..6918aec6bd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs @@ -1,10 +1,10 @@ using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ReportFileNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs index 1651748e71..9d784df329 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ReportOpenerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs index 3c8c9325df..146c4a5e7f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs @@ -1,11 +1,11 @@ using System.Linq; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ReportersInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs index 99a0552bd9..4ecdc09dbb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class SinceInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs index 7fde97d86c..023fbb1bd2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class SinceTargetInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs index fc934c7a91..886bb11f70 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs @@ -1,11 +1,11 @@ using System.IO; using System.IO.Abstractions.TestingHelpers; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class SolutionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs index 1eb8ac7cd3..331f91ce41 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class SourceProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs index 0427883916..adf5a800aa 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class TargetFrameworkInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs index c5c2e93594..0164ba49aa 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class TestCaseFilterInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs index be0058e25c..aa31eb0841 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs @@ -1,9 +1,10 @@ using System.IO; using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class TestProjectsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs index b50a79bee4..e36091db05 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ThresholdBreakInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs index c293bfa740..6d6e7053b0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ThresholdHighInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs index 42df742b5d..c4dff4eea6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs @@ -1,9 +1,9 @@ using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class ThresholdLowInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs index 6f962ef8fd..d167f14169 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs @@ -1,10 +1,10 @@ using Serilog.Events; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class VerbosityInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs index 6284e5c269..d470dc2952 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Options.Inputs +namespace Stryker.Abstractions.UnitTest.Options.Inputs { [TestClass] public class WithBaselineInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs index 0aec2f4fed..6fcc0898a4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs @@ -1,12 +1,13 @@ using System.IO; using Shouldly; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Baseline; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.Options +namespace Stryker.Abstractions.UnitTest.Options { [TestClass] public class StrykerInputsTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs index 43de2a995b..a41349a0d7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs @@ -1,11 +1,11 @@ using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.ProjectComponents +namespace Stryker.Abstractions.UnitTest.ProjectComponents { [TestClass] public class CsharpProjectComponentTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs index 64e9613a7e..9961d4af5f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.ProjectComponents.SourceProjects; -namespace Stryker.Configuration.UnitTest.ProjectComponents.SourceProjects +namespace Stryker.Abstractions.UnitTest.ProjectComponents.SourceProjects { [TestClass] public class SourceProjectInfoTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs index f53abb0eb6..b66b7782e8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestCaseTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs index 1c3ca3d2a1..d456819835 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; using Shouldly; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestFileTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs index 8d5cbc5d44..eb31659dda 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs @@ -4,10 +4,10 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Shouldly; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs index 7b931196be..00561a48b5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs @@ -8,11 +8,12 @@ using Microsoft.Extensions.Logging.Abstractions; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectsInfoTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs index 3c45e2c0d6..7b60542cb2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs @@ -1,13 +1,13 @@ using Moq; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporters.Json; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporters.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Baseline; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class BaselineReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs index 4143d0608f..70b5f12f2b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs @@ -2,14 +2,14 @@ using System.IO.Abstractions.TestingHelpers; using Moq; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class BroadcastReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs index 26a5f45094..c05ff0e65f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs @@ -6,14 +6,14 @@ using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration; - -namespace Stryker.Configuration.UnitTest.Reporters +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions; + +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class ClearTextReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs index b09c8266a1..327ac3ee44 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs @@ -5,15 +5,15 @@ using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class ClearTextTreeReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs index 41115196d3..9d8b81704f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs @@ -1,11 +1,11 @@ using Shouldly; using Spectre.Console.Testing; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class ConsoleDotReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs index cf3c6130dd..259eaf3896 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs @@ -1,17 +1,17 @@ using System.Linq; using System.Threading.Tasks; using Moq; -using Stryker.Configuration.Clients; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; -using Stryker.Configuration.Reporters.WebBrowserOpener; +using Stryker.Abstractions.Clients; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporters.WebBrowserOpener; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class DashboardReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs index 205cead0db..aa4baac924 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs @@ -5,16 +5,16 @@ using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Html; -using Stryker.Configuration.Reporters.Html.RealTime; -using Stryker.Configuration.Reporters.WebBrowserOpener; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Html; +using Stryker.Abstractions.Reporters.Html.RealTime; +using Stryker.Abstractions.Reporters.WebBrowserOpener; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Html +namespace Stryker.Abstractions.UnitTest.Reporters.Html { [TestClass] public class HtmlReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs index 0ba701bcfb..26da9ed200 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs @@ -1,7 +1,7 @@ -using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs index b36d741db8..2962687c29 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs @@ -1,9 +1,9 @@ using System; using Shouldly; -using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTypeTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs index 6651d23aac..888eb3a14f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs @@ -2,13 +2,13 @@ using Microsoft.CodeAnalysis.CSharp; using Moq; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters.Html.RealTime; -using Stryker.Configuration.Reporters.Html.RealTime.Events; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters.Html.RealTime; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime; [TestClass] public class RealTimeMutantHandlerTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs index 247ad0813d..d270061d82 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs @@ -4,11 +4,11 @@ using System.Threading.Tasks; using LaunchDarkly.EventSource; using Shouldly; -using Stryker.Configuration.Reporters.Html.RealTime; -using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Html.RealTime; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime; [TestClass] public class SseServerTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs index 77ad547d07..690bd7e8b9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs @@ -13,14 +13,14 @@ using Moq; using Newtonsoft.Json; using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Json +namespace Stryker.Abstractions.UnitTest.Reporters.Json { [TestClass] public class JsonReporterTests : TestBase @@ -65,7 +65,7 @@ public void JsonMutantLocation_FromValidFileLinePositionSpanShouldAdd1ToLineAndC new LinePosition(2, 2), new LinePosition(4, 5)); - var jsonMutantLocation = new Configuration.Reporters.Json.Location(lineSpan); + var jsonMutantLocation = new Abstractions.Reporters.Json.Location(lineSpan); jsonMutantLocation.Start.Line.ShouldBe(3); jsonMutantLocation.Start.Column.ShouldBe(3); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs index 77cc8a3ec1..a0d0836abc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.UnitTest.Reporters.Json +namespace Stryker.Abstractions.UnitTest.Reporters.Json { public class MockJsonReport : JsonReport { public MockJsonReport( IDictionary thresholds, - IDictionary files + IDictionary files ) { Thresholds = thresholds; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs index d0305dfb53..d218b878fb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs @@ -1,14 +1,15 @@ using System.Collections.Generic; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporting; +using Stryker.Reporters.Json.SourceFiles; -namespace Stryker.Configuration.UnitTest.Reporters.Json; +namespace Stryker.Abstractions.UnitTest.Reporters.Json; public class MockJsonReportFileComponent : SourceFile { public MockJsonReportFileComponent( string language, string source, - ISet mutants + ISet mutants ) { Language = language; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs index 4d7450f374..d8396c2593 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs @@ -2,12 +2,12 @@ using System.IO.Abstractions.TestingHelpers; using Shouldly; using Spectre.Console.Testing; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class MarkdownSummaryReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs index b71d19707a..3083a623d5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs @@ -1,10 +1,10 @@ using Moq; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters.Progress; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Progress +namespace Stryker.Abstractions.UnitTest.Reporters.Progress { [TestClass] public class ProgressBarReporterTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs index bd01af99c4..73ff21b45c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs @@ -1,9 +1,9 @@ using Moq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters.Progress; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters.Progress +namespace Stryker.Abstractions.UnitTest.Reporters.Progress { [TestClass] public class ProgressReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs index 3af526fc48..7d83e3370b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs @@ -2,11 +2,11 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { public static class ReportTestHelper { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs index fef1973e02..1dcdc6b06f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs @@ -2,15 +2,15 @@ using System.Linq; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Reporters.Html; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Progress; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporters.Html; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class ReporterFactoryTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs index e24c9366e0..1aba666533 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs @@ -1,16 +1,16 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.Reporters +namespace Stryker.Abstractions.UnitTest.Reporters { [TestClass] public class StatusReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs index 7cbb88757d..48b3395bb0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { internal static class StringExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs index 7bceb9015d..28f3ae8e17 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs @@ -1,8 +1,8 @@ using Shouldly; -using Stryker.Configuration; +using Stryker.Abstractions; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { [TestClass] public class StrykerRunResultTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs index 1f6ff27884..e9d76f53a7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs @@ -5,21 +5,21 @@ using Microsoft.Extensions.Logging; using Moq; using Shouldly; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.TestRunners; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest +namespace Stryker.Abstractions.UnitTest { [TestClass] public class StrykerRunnerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs index 5e3a9fc97e..7d136e72ea 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Logging; -namespace Stryker.Configuration.UnitTest; +namespace Stryker.Abstractions.UnitTest; public abstract class TestBase { protected TestBase() => diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs index 614f2213c8..52ba5388ff 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs @@ -3,7 +3,7 @@ using Buildalyzer; using Moq; -namespace Stryker.Configuration.UnitTest; +namespace Stryker.Abstractions.UnitTest; public static class TestHelper { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs index d4efd152ee..45c24ec467 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCaptureTests.cs @@ -5,7 +5,7 @@ using System.Xml; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.TestRunners +namespace Stryker.Abstractions.UnitTest.TestRunners { [TestClass] public class CoverageCaptureTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs index 5d1756ecbe..64b63b7f30 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs @@ -8,7 +8,7 @@ using Stryker.DataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Configuration.UnitTest.TestRunners +namespace Stryker.Abstractions.UnitTest.TestRunners { [TestClass] public class CoverageCollectorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs index 777af5a2d3..bdcb2cc617 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs @@ -16,20 +16,20 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollector.InProcDataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; -using Stryker.Configuration.ToolHelpers; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Abstractions.ToolHelpers; using Stryker.DataCollector; +using Stryker.Utilities; using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Configuration.UnitTest.TestRunners; +namespace Stryker.Abstractions.UnitTest.TestRunners; /// /// This class has a set of methods that can be used to mock VsTest behavior. diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs index 874e8bcdbd..5b025e8e02 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs @@ -5,16 +5,17 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Moq; using Shouldly; -using Stryker.Configuration.CoverageAnalysis; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.CoverageAnalysis; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.UnitTest.TestRunners +namespace Stryker.Abstractions.UnitTest.TestRunners { /// /// This class hosts the VsTestRunner related tests. The design of VsTest implies the creation of many mocking objects, so the tests may be hard to read. diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs index fe6182eba3..31af84ab76 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs @@ -13,14 +13,15 @@ using Moq; using Serilog.Events; using Shouldly; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners.VsTest; -using Stryker.Configuration.ToolHelpers; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Abstractions.ToolHelpers; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Utilities; -namespace Stryker.Configuration.UnitTest.TestRunners +namespace Stryker.Abstractions.UnitTest.TestRunners { [TestClass] public class VsTextContextInformationTests: TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs index e6cdaac28c..9a77b9a17d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs @@ -4,9 +4,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Configuration.Initialisation.Buildalyzer; +using Stryker.Abstractions.Initialisation.Buildalyzer; -namespace Stryker.Configuration.UnitTest.ToolHelpers; +namespace Stryker.Abstractions.UnitTest.ToolHelpers; [TestClass] public class BuildalyzerHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index 3f88e40f1a..f8d939342d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -1574,10 +1574,14 @@ "stryker.abstractions": { "type": "Project", "dependencies": { + "Buildalyzer": "[7.0.2, )", "DotNet.Glob": "[3.1.3, )", "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", - "Serilog": "[4.0.0, )" + "Serilog": "[4.0.0, )", + "Stryker.Utilities": "[1.0.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, "stryker.configuration": { @@ -1603,6 +1607,9 @@ "RegexParser": "[0.5.1, )" } }, + "stryker.utilities": { + "type": "Project" + }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", "requested": "[12.19.0, )", diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs index 89e5ad8b38..2f46f67943 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs @@ -5,11 +5,11 @@ using Azure; using Azure.Storage.Files.Shares; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Json; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Json; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { public class AzureFileShareBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs index 15957e9df2..5feabf24ea 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs @@ -1,7 +1,7 @@ -using Stryker.Configuration.Baseline; -using Stryker.Configuration; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { public static class BaselineProviderFactory { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs index 1e14862677..979b1b46a3 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs @@ -1,9 +1,9 @@ -using Stryker.Configuration.Clients; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Json; +using Stryker.Abstractions.Clients; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Json; using System.Threading.Tasks; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { public class DashboardBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs index 7d469fac0f..2a0df43ba9 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs @@ -1,12 +1,12 @@ using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Json; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Json; using System.IO; using System.IO.Abstractions; using System.Threading.Tasks; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { public class DiskBaselineProvider : IBaselineProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs index aa27a02eab..e4a6871448 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs @@ -1,9 +1,9 @@ using LibGit2Sharp; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; using System; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { using Logging; using Microsoft.Extensions.Logging; diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs index f6f8c4f69f..ff4eaf1553 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs @@ -1,6 +1,6 @@ using LibGit2Sharp; -namespace Stryker.Configuration.Baseline.Providers +namespace Stryker.Abstractions.Baseline.Providers { public interface IGitInfoProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs index f30dad13aa..3c139081f5 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporters.Json.SourceFiles; -namespace Stryker.Configuration.Baseline.Utils +namespace Stryker.Abstractions.Baseline.Utils { public class BaselineMutantHelper : IBaselineMutantHelper { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs index fb2eb6e59d..7f42f31eb0 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Baseline.Utils +namespace Stryker.Abstractions.Baseline.Utils { public interface IBaselineMutantHelper { diff --git a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs index 7165a2f0a5..e89b2025ad 100644 --- a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs +++ b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs @@ -1,15 +1,15 @@ using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Json; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Json; using System; using System.Collections.Generic; using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporters.Json.SourceFiles; -namespace Stryker.Configuration.Clients +namespace Stryker.Abstractions.Clients { public interface IDashboardClient { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs index 2e7c8b9676..72179553b7 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs @@ -7,12 +7,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.Compiling +namespace Stryker.Abstractions.Compiling { public interface ICSharpRollbackProcess { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs index c83148122d..a175c42cc7 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp; -namespace Stryker.Configuration.Compiling +namespace Stryker.Abstractions.Compiling { public record CSharpRollbackProcessResult( CSharpCompilation Compilation, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs index 9a24f2ebd2..3b6368b120 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Configuration.Compiling +namespace Stryker.Abstractions.Compiling { public record CompilingProcessResult( bool Success, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 31edd42a6c..9d8caa0c09 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -11,14 +11,14 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Emit; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; - -namespace Stryker.Configuration.Compiling; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; + +namespace Stryker.Abstractions.Compiling; public interface ICSharpCompilingProcess { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs index 136add6efb..091c4da21c 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs @@ -7,15 +7,15 @@ using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.ProjectComponents.TestProjects; using IFileSystem = System.IO.Abstractions.IFileSystem; using ParsedInput = FSharp.Compiler.Syntax.ParsedInput; -namespace Stryker.Configuration.Compiling +namespace Stryker.Abstractions.Compiling { public class FsharpCompilingProcess { diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs index c8a960d8ff..ce90f865d6 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.CoverageAnalysis +namespace Stryker.Abstractions.CoverageAnalysis { public class CoverageAnalyser : ICoverageAnalyser { diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs index a6ab284371..feee3fc152 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.CoverageAnalysis +namespace Stryker.Abstractions.CoverageAnalysis { public interface ICoverageAnalyser { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs index 0b2b97a7b3..d01d7153fb 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Configuration.DiffProviders +namespace Stryker.Abstractions.DiffProviders { public class DiffResult { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs index 12e40e1796..530675b17f 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs @@ -2,12 +2,13 @@ using System.IO; using System.Linq; using LibGit2Sharp; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Utilities; -namespace Stryker.Configuration.DiffProviders +namespace Stryker.Abstractions.DiffProviders { public class GitDiffProvider : IDiffProvider { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs index 71b2e49785..900c5b27b9 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.DiffProviders +namespace Stryker.Abstractions.DiffProviders { public interface IDiffProvider { diff --git a/src/Stryker.Core/Stryker.Core/ExitCodes.cs b/src/Stryker.Core/Stryker.Core/ExitCodes.cs index 16271ba3ce..bd4d6c4d83 100644 --- a/src/Stryker.Core/Stryker.Core/ExitCodes.cs +++ b/src/Stryker.Core/Stryker.Core/ExitCodes.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration +namespace Stryker.Abstractions { /// /// Known Stryker exit codes. diff --git a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs b/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs index 91efa6597b..0f3469cf38 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.Helpers +namespace Stryker.Abstractions.Helpers { // describe a strategy that is specialized in a given type // and support sub-specialization diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs index 2c5649c937..9fa4c82a3d 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using FSharp.Compiler.Text; -namespace Stryker.Configuration.Helpers; +namespace Stryker.Abstractions.Helpers; public static class RangeHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs index 11872a404e..17391434ce 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Helpers +namespace Stryker.Abstractions.Helpers { internal static class RoslynHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs index dfeacc4a98..c6a9663a98 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using Microsoft.CodeAnalysis.Text; -namespace Stryker.Configuration.Helpers +namespace Stryker.Abstractions.Helpers { public static class TextSpanHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs b/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs index af60ca1f8d..cf87f05c54 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Configuration.Helpers +namespace Stryker.Abstractions.Helpers { // type based strategy pattern implementation: finds the proper implementation according the type of a given object // keeping a cache for faster resolution diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs index edfc1ea4c4..da35cdffe5 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs @@ -2,9 +2,9 @@ using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration; +using Stryker.Abstractions; -namespace Stryker.Configuration.Initialisation.Buildalyzer +namespace Stryker.Abstractions.Initialisation.Buildalyzer { public static class IAnalyzerResultCSharpExtensions { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs index bdecd0da38..7ed38afb03 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs @@ -10,9 +10,9 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.Extensions.Logging; using NuGet.Frameworks; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Initialisation.Buildalyzer; +namespace Stryker.Abstractions.Initialisation.Buildalyzer; public static class IAnalyzerResultExtensions { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs index 1fbf13f9db..916a4639c9 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs @@ -5,7 +5,7 @@ using System.Text; using Mono.Cecil; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { // This (CrossPlatformAssemblyResolver) is a copy of Mono.Cecil's BaseAssemblyResolver with all the conditional compilation removed and changes made to "Resolve" // Original: https://github.com/jbevain/cecil/blob/7b8ee049a151204997eecf587c69acc2f67c8405/Mono.Cecil/BaseAssemblyResolver.cs diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs index ef082f1b11..be3925dfaa 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs @@ -9,13 +9,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.MutantFilters.Extensions; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.MutantFilters.Extensions; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public class CsharpProjectComponentsBuilder : ProjectComponentsBuilder { @@ -32,7 +32,7 @@ public CsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, StrykerOpti _logger = logger; } - public override IProjectComponent Build() + public override IReadOnlyProjectComponent Build() { CsharpFolderComposite inputFiles; if (_projectInfo.AnalyzerResult.SourceFiles != null && _projectInfo.AnalyzerResult.SourceFiles.Any()) @@ -63,7 +63,7 @@ private CsharpFolderComposite FindProjectFilesScanningProjectFolders(IAnalyzerRe return inputFiles; } - public override void InjectHelpers(IProjectComponent inputFiles) + public override void InjectHelpers(IReadOnlyProjectComponent inputFiles) => InjectMutantHelpers((CsharpFolderComposite)inputFiles, BuildCsharpParseOptions(_projectInfo.AnalyzerResult, _options)); private CsharpFolderComposite FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs index 25591e7992..a9bdcf7089 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs @@ -11,7 +11,7 @@ using Microsoft.CodeAnalysis; using Mono.Cecil; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { [ExcludeFromCodeCoverage] public static class EmbeddedResourcesGenerator diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs index 67e16722c4..714bdc0819 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FolderCompositeCache.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public class FolderCompositeCache { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs index e91ca5db4e..807fb94d7e 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs @@ -3,10 +3,10 @@ using FSharp.Compiler.Text; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Control; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.SourceProjects; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.SourceProjects; using System; using System.Collections.Generic; using System.IO; @@ -14,7 +14,7 @@ using static FSharp.Compiler.Syntax.ParsedInput; using IFileSystem = System.IO.Abstractions.IFileSystem; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { internal class FsharpProjectComponentsBuilder : ProjectComponentsBuilder { @@ -31,7 +31,7 @@ public FsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, StrykerOpti _logger = logger; } - public override IProjectComponent Build() + public override IReadOnlyProjectComponent Build() { FsharpFolderComposite inputFiles; if (_projectInfo.AnalyzerResult.SourceFiles != null && _projectInfo.AnalyzerResult.SourceFiles.Any()) @@ -46,7 +46,7 @@ public override IProjectComponent Build() } // do nothing - public override void InjectHelpers(IProjectComponent inputFiles) {} + public override void InjectHelpers(IReadOnlyProjectComponent inputFiles) {} public override Action PostBuildAction() => () => { }; diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs index 1983ff5336..a889f416ba 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Testing; -using Stryker.Configuration.ToolHelpers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Testing; +using Stryker.Abstractions.ToolHelpers; using System.IO; -namespace Stryker.Configuration.Initialisation; +namespace Stryker.Abstractions.Initialisation; public interface IInitialBuildProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs index 2415fd8ab1..1814f29e09 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs @@ -1,12 +1,9 @@ using System.Diagnostics; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public interface IInitialTestProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs index e21f5ee7a3..0419d950ae 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs @@ -1,7 +1,6 @@ -using Stryker.Configuration; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public class InitialTestRun { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs index da06434db2..dc1efa0555 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs @@ -3,15 +3,14 @@ using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration; - -namespace Stryker.Configuration.Initialisation; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.TestRunners; + +namespace Stryker.Abstractions.Initialisation; // For mocking purposes public interface IInitialisationProcess diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs index f70b4eaa77..c58f7106ba 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs @@ -9,15 +9,15 @@ using Buildalyzer; using Buildalyzer.Environment; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Testing; - -namespace Stryker.Configuration.Initialisation; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Testing; + +namespace Stryker.Abstractions.Initialisation; public interface IInputFileResolver { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs index 6c74dba277..c4efc9a630 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public enum Language { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs index 099ca3b9fd..8ed9fc7505 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs @@ -2,12 +2,12 @@ using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Testing; -using Stryker.Configuration.ToolHelpers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Testing; +using Stryker.Abstractions.ToolHelpers; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public interface INugetRestoreProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs index 45f144d811..6c097b9660 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs @@ -1,21 +1,22 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; using System.Xml.Linq; using System.Linq; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.ProjectComponents; using Buildalyzer; using System.IO; using System.IO.Abstractions; +using Stryker.Utilities; -namespace Stryker.Configuration.Initialisation; +namespace Stryker.Abstractions.Initialisation; public abstract class ProjectComponentsBuilder { protected readonly IFileSystem FileSystem; - public abstract IProjectComponent Build(); + public abstract IReadOnlyProjectComponent Build(); protected ProjectComponentsBuilder(IFileSystem fileSystem) => FileSystem = fileSystem; @@ -76,6 +77,6 @@ private static string ReplaceMsbuildProperties(string projectReference, IAnalyze }); } - public abstract void InjectHelpers(IProjectComponent inputFiles); + public abstract void InjectHelpers(IReadOnlyProjectComponent inputFiles); public abstract Action PostBuildAction(); } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs index d67573c5be..fc78dd24ff 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs @@ -2,13 +2,13 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public interface IProjectMutator { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs index e367ca621a..45c1beb4c6 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs @@ -6,18 +6,17 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Mono.Cecil; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.TestRunners; -using Stryker.Configuration.TestRunners.VsTest; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.Baseline; - -namespace Stryker.Configuration.Initialisation +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Abstractions.TestRunners; + +namespace Stryker.Abstractions.Initialisation { public interface IProjectOrchestrator: IDisposable { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs index a88ee0cfa5..c2566049f2 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.Initialisation +namespace Stryker.Abstractions.Initialisation { public class TimeoutValueCalculator : ITimeoutValueCalculator { diff --git a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs index 179adb9a2d..5dabe720b9 100644 --- a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs +++ b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs @@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.InjectedHelpers +namespace Stryker.Abstractions.InjectedHelpers { public class CodeInjection { diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs index 1c4caac06a..88fd2f6e4f 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs @@ -1,9 +1,9 @@ using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Base logic for all instrumentation helpers. It takes of generating a specific annotation diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs index e99b2d91f9..8e31b6f6dc 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Injects a mutation controlled by a conditional operator. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs index 8289bdd378..bd81547969 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Injects initialization to default value for a parameter or a variable at the beginning of a method. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs index 39c6a743d5..4232d429a0 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs @@ -2,9 +2,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Injects 'return default(...)' statement at the end of a method diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs index 0fd0728ade..ccdc7735c9 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using System; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Implements code instrumentation logic. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs index 05abc7cc08..f89ad15ddc 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Instrumentation; +namespace Stryker.Abstractions.Instrumentation; /// /// Injects a mutation controlled by an if Statement. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs index 123bd28c08..c437f684e7 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs @@ -2,9 +2,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.InjectedHelpers; +using Stryker.Abstractions.InjectedHelpers; -namespace Stryker.Configuration.Instrumentation +namespace Stryker.Abstractions.Instrumentation { /// /// Injects static tracking logic in static fields/properties' initializers. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs index 666c751519..bce6085e16 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs @@ -1,9 +1,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.InjectedHelpers; +using Stryker.Abstractions.InjectedHelpers; -namespace Stryker.Configuration.Instrumentation +namespace Stryker.Abstractions.Instrumentation { /// /// Injects a static marker, to help identification of mutations executed through a static constructor/method/property... diff --git a/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs b/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs index 605b8077b8..a418be94f8 100644 --- a/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs +++ b/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Logging; -namespace Stryker.Configuration.Logging +namespace Stryker.Abstractions.Logging { public static class ApplicationLogging { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs index 360873d8dc..cd32444fd5 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs @@ -4,17 +4,19 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Baseline.Utils; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporting; -using Stryker.Configuration; - -namespace Stryker.Configuration.MutantFilters +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Baseline.Utils; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions; +using Stryker.Abstractions.Mutants; +using Stryker.Utilities; + +namespace Stryker.Abstractions.MutantFilters { public class BaselineMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs index ee6ace5dd8..1a3ae3ab9b 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs @@ -1,10 +1,10 @@ -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using System.Collections.Generic; using System.Linq; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { public class BroadcastMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs index ed9fc2c8be..e5f476dbe1 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs @@ -1,13 +1,13 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { public class ExcludeFromCodeCoverageFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs index b45b29b931..f367a460ff 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs @@ -4,12 +4,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { /// /// Checks if the linq expression of the mutant should be excluded. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs index 162fc1e54f..7656d1a281 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { /// /// Checks if the mutation type of the mutant should be excluded. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs index fe1e227a08..9351aebb61 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { /// /// Checks if the mutation should be skipped depending on the file and position of the mutation. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs index c2815361b9..0983302d13 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs @@ -4,7 +4,7 @@ using System; -namespace Stryker.Configuration.MutantFilters.Extensions +namespace Stryker.Abstractions.MutantFilters.Extensions { using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs index a55ef359da..ec29a72c55 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { /// /// Allows to filter a set of mutants before the mutants are tested. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs index 8c788e2bfa..69cee71882 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { public class IgnoreBlockMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs index 6d648f647d..4615b2998d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { /// /// Checks if the mutants are part of ignored method calls. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs index aa256182b3..dfffbc54af 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { // Filters are executed in the order they appear in in this enum. If you change this order you change the order or filter execution public enum MutantFilter diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs index ae8997295e..9c01e7826f 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.DiffProviders; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.DiffProviders; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions; -namespace Stryker.Configuration.MutantFilters +namespace Stryker.Abstractions.MutantFilters { public static class MutantFilterFactory { diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs index c08ee37e5d..d8ccd0e41a 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs @@ -3,13 +3,14 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Configuration.DiffProviders; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; - -namespace Stryker.Configuration.MutantFilters +using Stryker.Abstractions.DiffProviders; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Mutants; + +namespace Stryker.Abstractions.MutantFilters { public class SinceMutantFilter : IMutantFilter { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs index 6c1a6a0cf6..ec316972f6 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using Stryker.Configuration; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public abstract class BaseMutantOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs index 206fd5424a..b235a87cb4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs @@ -6,13 +6,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Helpers; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants; +namespace Stryker.Abstractions.Mutants; /// public class CsharpMutantOrchestrator : BaseMutantOrchestrator diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs index f460f73cac..8d4186b473 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutation for Accessors (get/set). Its purpose is to convert arrow expression accessor to body statement form when needed. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs index f37b3f1e92..a3c67d7530 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class AnonymousFunctionExpressionOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs index 5868a8ac40..61295a3c50 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs @@ -2,11 +2,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; -using Stryker.Configuration.Instrumentation; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Instrumentation; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// This class implements a roslyn type independent orchestrator for method, functions, getters.... diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs index 64bda9f533..94a7f26bcc 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Handles Methods/properties' accessors/constructors and finalizers. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs index 3bf8895ebb..dd05711c58 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for syntax block diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs index 51cc686ee8..c67af8425d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal static class CommentParser { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs index 2f2af031c5..e655dc4685 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class ConditionalExpressionOrchestrator :MemberAccessExpressionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs index cfaf649081..29c650cb66 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs @@ -1,7 +1,7 @@ using System; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Generic class for node types (and their children) that must not be mutated diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs index eaa976de97..661ed04f64 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs @@ -1,9 +1,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class ExpressionBodiedPropertyOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs index 6856bb76d7..f6d05e6df1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for expressions (and sub expressions). diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs index d685717901..8d4913ae2f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal interface INodeOrchestrator : ITypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs index 43afebbadf..c279689d2c 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class InvocationExpressionOrchestrator: MemberAccessExpressionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs index 7501f77eb0..17c4905632 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Handle const declarations. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs index 16402ff0fc..fc44f00887 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class LocalFunctionStatementOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs index af31ba16c9..996a360304 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; internal class MemberAccessExpressionOrchestrator : NodeSpecificOrchestrator where T:ExpressionSyntax { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs index a2d1bc8541..641c1d5fdc 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Base class for node types (and their children) that are member definitions diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs index 3378a4a9e9..85a0da7df2 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Generic class to deal with syntax nodes which mutations must be injected at statement level diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs index 912ecc7d06..9df5616987 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using Microsoft.CodeAnalysis; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// This purpose of each implementation of this class is to support one specific C# code construct during the mutation process. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs index 8d37ab4fe7..153a7f3501 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// General handler for Statements. Remember to inherit from this class when you wand to create a statement specific logic. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs index ad3e2ec8ec..a5256c70d9 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Supports static constructor. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs index 69b9c18d03..c66644a913 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// Ensure static Fields are marked as static diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs index c6e5e983f9..17ee655461 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// This is the default orchestrator: it does not mutate the node, but it will orchestrate the mutations of its children. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs index 06c0f02760..1f2b5060af 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs @@ -3,12 +3,12 @@ using FSharp.Compiler.Syntax; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants.FsharpOrchestrators; -using Stryker.Configuration.Mutators; -using Stryker.Configuration; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants.FsharpOrchestrators; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { /// public class FsharpMutantOrchestrator : BaseMutantOrchestrator, object> diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs index a07f17ec29..d445f0785c 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class DefaultOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs index 54a576743b..4162252a51 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public interface IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs index 8bbb86160d..2d6544b828 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class IfThenElseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs index cdf809af29..50f221708f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class LetOrUseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs index 7e78db7747..579a620f8f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class LetOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs index 42eab1e9d4..1ab7ee2e69 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs @@ -4,7 +4,7 @@ using static FSharp.Compiler.Syntax.SynConst; using static FSharp.Compiler.Syntax.SynPat; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { //this orchestrtor also places a mutation. This is to proof the code works //the mutation should come from a mutator, however mutators are currently not implemented diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs index a73c303c77..838139cb70 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class NestedModuleOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs index 4d6ad2a0fd..40747e29b2 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Configuration.Mutants.FsharpOrchestrators +namespace Stryker.Abstractions.Mutants.FsharpOrchestrators { public class OrchestratorFinder { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs deleted file mode 100644 index 75b154e7f2..0000000000 --- a/src/Stryker.Core/Stryker.Core/Mutants/IMutant.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners; - -namespace Stryker.Core.Mutants; -public interface IMutant -{ - ITestGuids AssessingTests { get; set; } - bool CountForStats { get; } - ITestGuids CoveringTests { get; set; } - string DisplayName { get; } - int Id { get; set; } - bool IsStaticValue { get; set; } - ITestGuids KillingTests { get; set; } - bool MustBeTestedInIsolation { get; set; } - Mutation Mutation { get; set; } - MutantStatus ResultStatus { get; set; } - string ResultStatusReason { get; set; } - - void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, ITestGuids timedOutTests, bool sessionTimedOut); -} \ No newline at end of file diff --git a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs index 13dc03fbc4..dc2da0c669 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs @@ -1,8 +1,6 @@ -using Stryker.Configuration; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Core.Mutants +namespace Stryker.Abstractions.Mutants { /// /// Represents a single mutation on domain level diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs index 4e39c3ccd9..69746c6765 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { /// /// Used to keep track of mutant info. For example during the rollback process. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs index 64c9480488..bc4dc979cf 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs @@ -4,10 +4,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.Instrumentation; +using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions.Instrumentation; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants; +namespace Stryker.Abstractions.Mutants; /// /// Implements multiple (reversible) patterns for injecting code in the mutated assembly diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs index 6479b61d20..e6b0bdf4dc 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs @@ -2,10 +2,11 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants.CsharpNodeOrchestrators; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants; +namespace Stryker.Abstractions.Mutants; /// /// Describe the (syntax tree) context during mutation and ensure proper mutation injection. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs index 85e2608a33..394e741895 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs @@ -5,10 +5,11 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; using RegexParser.Nodes; -using Stryker.Configuration.Helpers; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutants; +namespace Stryker.Abstractions.Mutants; /// diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs index 9bf02ecc8a..d1838d6db7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public sealed class TestDescription { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs index cba373ed67..a51c62a263 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public class TestGuidsList : ITestGuids diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs index a638e42817..94b2d03ee2 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public class TestSet { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs index bd604beede..fc45a3fffe 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.Mutants +namespace Stryker.Abstractions.Mutants { public class WrappedGuidsEnumeration : ITestGuids { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs index a9f6b4f61e..31bf28a6c0 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs @@ -4,16 +4,16 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Compiling; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.MutantFilters; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; - -namespace Stryker.Configuration.MutationTest +using Stryker.Abstractions.Compiling; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; + +namespace Stryker.Abstractions.MutationTest { public class CsharpMutationProcess : IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs index 4b27d0ffba..1397b2849c 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs @@ -2,17 +2,17 @@ using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; -using Stryker.Configuration.Compiling; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Compiling; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using System; using System.IO; using System.IO.Abstractions; using System.Linq; -namespace Stryker.Configuration.MutationTest +namespace Stryker.Abstractions.MutationTest { public class FsharpMutationProcess : IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs index 084bd2765c..bf87a503b8 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.MutationTest +namespace Stryker.Abstractions.MutationTest { public interface IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs index 8764395c38..e9c0f5df95 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.MutationTest +namespace Stryker.Abstractions.MutationTest { /// /// Executes exactly one mutation test and stores the result diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs index 30731b600d..9c17a47bd9 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs @@ -1,9 +1,10 @@ -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.ProjectComponents.SourceProjects; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.TestRunners; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners; -namespace Stryker.Configuration.MutationTest +namespace Stryker.Abstractions.MutationTest { /// /// Represents the state the application under test is in. diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs index fc39b4a875..fedbc8ebfe 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs @@ -3,18 +3,21 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Stryker.Configuration.CoverageAnalysis; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.TestRunners; - -namespace Stryker.Configuration.MutationTest +using Stryker.Abstractions.CoverageAnalysis; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Options; + +namespace Stryker.Abstractions.MutationTest { public interface IMutationTestProcess { @@ -29,7 +32,7 @@ public interface IMutationTestProcess public class MutationTestProcess : IMutationTestProcess { private static readonly ILogger Logger = ApplicationLogging.LoggerFactory.CreateLogger(); - private readonly IProjectComponent _projectContents; + private readonly IReadOnlyProjectComponent _projectContents; private readonly IMutationTestExecutor _mutationTestExecutor; private readonly IReporter _reporter; private readonly ICoverageAnalyser _coverageAnalyser; diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs index e7f22e2d01..252524460b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class ArrayCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs index 94a9a55037..661e1badf8 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators +namespace Stryker.Abstractions.Mutators { public class AssignmentExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs index 7d18f2cd7c..fa6952ea2d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutators +namespace Stryker.Abstractions.Mutators { public class BinaryExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs index 039ca69b63..0dbbd58e05 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Helpers; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Helpers; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; class BlockMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs index c8cb034228..d9be84ac12 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class BooleanMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs index a53c38cfc0..0e93bd651f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class CheckedMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs index 80b1f60f27..4509a5f06f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators +namespace Stryker.Abstractions.Mutators { public class ConditionalExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs index a4e6c79d4b..6c65c40b65 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class InitializerMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs index 5d60a896df..a39785db4f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class InterpolatedStringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs index a0fc67f295..5d664b466a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Mutator implementation for is expression public class IsPatternExpressionMutator : PatternMutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs index d6c6c61e1a..86c7cbcdb6 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs @@ -1,12 +1,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Mutants; using System; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Mutator Implementation for LINQ Mutations public class LinqMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs index 0e145a8459..fd6c4dba8a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Mutator Implementation for Math Mutations public class MathMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs index 9e101f9b2d..74036e382d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; -using Stryker.Configuration.Options; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// /// Mutators can implement this class to check the type of the node and cast the node to the expected type. diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs index be2b88b1ac..73b00f3ad8 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class NegateConditionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs index 579764fd92..3699252211 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.Mutators +namespace Stryker.Abstractions.Mutators { public class NullCoalescingExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs index 6f27131f4b..1181d98ad1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators +namespace Stryker.Abstractions.Mutators { public class ObjectCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs index 05c0e50584..50fecacfd1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Base Mutator implementation for expressions with patterns public abstract class PatternMutatorBase : MutatorBase where T : ExpressionSyntax diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs index 6d6cd1d98f..90999ffbda 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class PostfixUnaryMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs index ded9ccd5ff..05b7f95416 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class PrefixUnaryMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs index a8674840d1..6a5116932f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs @@ -2,15 +2,15 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; using Stryker.RegexMutators; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class RegexMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs index d444cadbc5..b850d3105a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class StatementMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs index 85cc6ea80b..9afb0c70d7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// /// Mutator that will mutate: diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs index e28d6697e1..d68701b870 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs @@ -3,9 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Mutator Implementation for String method Mutations public class StringMethodMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs index d1c3dd5b1b..0a5db90709 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs @@ -1,12 +1,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System; using System.Collections.Generic; using System.Text.RegularExpressions; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; public class StringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs index ff65db03a7..80530606aa 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs @@ -2,9 +2,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Mutators; +namespace Stryker.Abstractions.Mutators; /// Mutator implementation for switch expression public class SwitchExpressionMutator : PatternMutatorBase diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs index fec9d165ac..56f369964e 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public class CsharpFileLeaf : ProjectComponent, IFileLeaf { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs index 2ea225a517..7a26beca17 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public class CsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs index 5606543c42..a9eebb05fc 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs @@ -1,15 +1,16 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { - public interface IReadOnlyFolderComposite : IProjectComponent + public interface IProjectComponent : IReadOnlyProjectComponent { - IEnumerable Children { get; } - void Add(IProjectComponent child); - void AddRange(IEnumerable children); + new string FullPath { get; set; } + new IEnumerable Mutants { get; set; } + new IReadOnlyFolderComposite Parent { get; set; } + new string RelativePath { get; set; } } public class FolderComposite : ProjectComponent, IReadOnlyFolderComposite @@ -19,7 +20,7 @@ public class FolderComposite : ProjectComponent, IReadOnlyFolderComposite public IEnumerable Children => _children; - public override IEnumerable Mutants + public override IEnumerable Mutants { get => Children.SelectMany(x => x.Mutants); set => throw new NotSupportedException("Folders do not contain mutants."); diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs index 2f286c6fda..71c1b987d1 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs @@ -1,8 +1,8 @@ using FSharp.Compiler.Syntax; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; using System.Collections.Generic; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public class FsharpFileLeaf : ProjectComponent, IFileLeaf { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs index cc7e317dac..6eb4a7a9a3 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public class FsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs deleted file mode 100644 index 1cc7d61a9a..0000000000 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Health.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Stryker.Configuration.ProjectComponents -{ - public enum Health - { - None, - Good, - Warning, - Danger - } -} \ No newline at end of file diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs deleted file mode 100644 index 3d2479fd35..0000000000 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/IFileLeaf.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Stryker.Configuration.ProjectComponents -{ - public interface IReadOnlyFileLeaf : IReadOnlyProjectComponent - { - string SourceCode { get; } - } - - public interface IFileLeaf : IFileLeaf - { - T SyntaxTree { get; set; } - - T MutatedSyntaxTree { get; set; } - } - - public interface IFileLeaf : IReadOnlyFileLeaf - { - new string SourceCode { get; set; } - } -} diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs index 68fe5ca05f..f6c890d3b5 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs @@ -1,42 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.Options; -using Stryker.Core.Mutants; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { - public delegate void Display(IReadOnlyProjectComponent current); - - public interface IReadOnlyProjectComponent - { - string FullPath { get; } - IEnumerable Mutants { get; } - IReadOnlyFolderComposite Parent { get; } - string RelativePath { get; set; } - public Display DisplayFile { get; set; } - public Display DisplayFolder { get; set; } - IEnumerable TotalMutants(); - IEnumerable ValidMutants(); - IEnumerable UndetectedMutants(); - IEnumerable DetectedMutants(); - IEnumerable InvalidMutants(); - IEnumerable IgnoredMutants(); - IEnumerable NotRunMutants(); - - Health CheckHealth(IThresholds threshold); - IEnumerable GetAllFiles(); - void Display(); - double GetMutationScore(); - } - - public interface IProjectComponent : IReadOnlyProjectComponent - { - new string FullPath { get; set; } - new IEnumerable Mutants { get; set; } - new IReadOnlyFolderComposite Parent { get; set; } - new string RelativePath { get; set; } - } public abstract class ProjectComponent : IProjectComponent { @@ -52,7 +20,7 @@ public abstract class ProjectComponent : IProjectComponent public Display DisplayFolder { get; set; } - public virtual IEnumerable Mutants { get; set; } + public virtual IEnumerable Mutants { get; set; } public abstract IEnumerable GetAllFiles(); diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs index b1b3f39852..3ac800156a 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Helpers; +using Stryker.Abstractions.Helpers; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { /// /// Contains extension methods for project components. diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs index d5d84f8788..da645ab4e3 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.ProjectComponents +namespace Stryker.Abstractions.ProjectComponents { public class Solution : ProjectComponent, IReadOnlyFolderComposite { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs index 1076a8f033..9a19806698 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Buildalyzer; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.InjectedHelpers; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.ProjectComponents.SourceProjects; +namespace Stryker.Abstractions.ProjectComponents.SourceProjects; public class SourceProjectInfo : IProjectAndTests { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs index 9bdc0ae606..e734d061d4 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs @@ -1,17 +1,17 @@ using System; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.ProjectComponents.TestProjects +namespace Stryker.Abstractions.ProjectComponents.TestProjects { - public sealed class TestCase : IEquatable + public sealed class TestCase : IEquatable, ITestCase { public Guid Id { get; init; } public string Name { get; init; } public SyntaxNode Node { get; init; } - public bool Equals(TestCase other) => other.Id == Id && other.Name == Name && other.Node.Span == Node.Span; + public bool Equals(ITestCase other) => other.Id == Id && other.Name == Name && other.Node.Span == Node.Span; - public override bool Equals(object obj) => obj is TestCase @case && Equals(@case); + public override bool Equals(object obj) => obj is ITestCase @case && Equals(@case); public override int GetHashCode() => (Id, Name).GetHashCode(); } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs index 23ad2e2f6d..5748e8b754 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs @@ -3,9 +3,9 @@ using System.Linq; using Microsoft.CodeAnalysis; -namespace Stryker.Configuration.ProjectComponents.TestProjects +namespace Stryker.Abstractions.ProjectComponents.TestProjects { - public sealed class TestFile : IEquatable + public sealed class TestFile : IEquatable, ITestFile { public SyntaxTree SyntaxTree { get; init; } public string FilePath { get; init; } @@ -27,7 +27,7 @@ public void AddTest(Guid id, string name, SyntaxNode node) }); } - public bool Equals(TestFile other) => other!=null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); + public bool Equals(TestFile other) => other != null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); public override bool Equals(object obj) => obj is TestFile file && Equals(file); diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs index 41df846b78..e48b821c96 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs @@ -6,17 +6,17 @@ using Buildalyzer; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.MutantFilters.Extensions; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.MutantFilters.Extensions; -namespace Stryker.Configuration.ProjectComponents.TestProjects +namespace Stryker.Abstractions.ProjectComponents.TestProjects { - public sealed class TestProject : IEquatable + public sealed class TestProject : IEquatable, ITestProject { public IAnalyzerResult AnalyzerResult { get; } public string ProjectFilePath => AnalyzerResult.ProjectFilePath; - public IEnumerable TestFiles { get; } + public IEnumerable TestFiles { get; } public TestProject(IFileSystem fileSystem, IAnalyzerResult testProjectAnalyzerResult) { @@ -58,9 +58,9 @@ private static void AssertValidTestProject(IAnalyzerResult testProjectAnalyzerRe } } - public bool Equals(TestProject other) => other.AnalyzerResult.Equals(AnalyzerResult) && other.TestFiles.SequenceEqual(TestFiles); + public bool Equals(ITestProject other) => other.AnalyzerResult.Equals(AnalyzerResult) && other.TestFiles.SequenceEqual(TestFiles); - public override bool Equals(object obj) => obj is TestProject project && Equals(project); + public override bool Equals(object obj) => obj is ITestProject project && Equals(project); public override int GetHashCode() => AnalyzerResult.GetHashCode(); } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs index a776de4d73..c3dc376bfa 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -4,12 +4,12 @@ using System.Linq; using Buildalyzer; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; -namespace Stryker.Configuration.ProjectComponents.TestProjects; +namespace Stryker.Abstractions.ProjectComponents.TestProjects; -public class TestProjectsInfo +public class TestProjectsInfo : ITestProjectsInfo { private readonly IFileSystem _fileSystem; private readonly ILogger _logger; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs index 54b7f74006..6202144d2c 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs @@ -1,13 +1,12 @@ using System.Collections.Generic; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { public class BaselineReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs index 25b9b26077..726a0548c0 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { /// /// Broadcasts the report calls to all reporters in the list diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs index bfbdceb6f4..8beb921c3a 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs @@ -2,15 +2,13 @@ using System.Linq; using Spectre.Console; using Spectre.Console.Rendering; -using Stryker.Configuration; -using Stryker.Configuration.Options; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporting; - -namespace Stryker.Configuration.Reporters +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; + +namespace Stryker.Abstractions.Reporters { /// /// The clear text reporter, prints a table with results. diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs index 566b29ef8a..6d61d3c254 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs @@ -3,13 +3,12 @@ using System.Linq; using System.Text; using Spectre.Console; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { /// /// The clear text tree reporter, prints a tree structure with results. diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs index e21f056edf..1c739107e7 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using Spectre.Console; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { /// /// The default reporter, prints a simple progress by printing dots diff --git a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs index 25258473bb..75102cb816 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs @@ -2,19 +2,18 @@ using System.Linq; using Microsoft.Extensions.Logging; using Spectre.Console; -using Stryker.Configuration.Clients; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.WebBrowserOpener; -using Stryker.Configuration.Reporters.Json.SourceFiles; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Clients; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.WebBrowserOpener; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { public class DashboardReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs index eea4eeac2c..a79f662f47 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs @@ -1,10 +1,10 @@ using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { public class FilteredMutantsLogger { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs index 8492c8f118..576d6989be 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs @@ -3,17 +3,16 @@ using System.IO.Abstractions; using System.Linq; using Spectre.Console; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.Options.Inputs; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Html.RealTime; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.WebBrowserOpener; -using Stryker.Configuration.Reporting; - -namespace Stryker.Configuration.Reporters.Html; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Html.RealTime; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.WebBrowserOpener; +using Stryker.Abstractions.Reporting; + +namespace Stryker.Abstractions.Reporters.Html; public class HtmlReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs index 47a2a5c32b..13e8b122c5 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace Stryker.Configuration.Reporters.Html.RealTime.Events; +namespace Stryker.Abstractions.Reporters.Html.RealTime.Events; public class SseEvent { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs index 6b74cec5f5..2d7dcb89fa 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.Reporters.Html.RealTime.Events; +namespace Stryker.Abstractions.Reporters.Html.RealTime.Events; public enum SseEventType { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs index 4b87886ed3..b0587284f3 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Reporters.Html.RealTime; +namespace Stryker.Abstractions.Reporters.Html.RealTime; public interface IRealTimeMutantHandler { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs index d0db9b0ccd..420d9a34dd 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; -namespace Stryker.Configuration.Reporters.Html.RealTime; +namespace Stryker.Abstractions.Reporters.Html.RealTime; public interface ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs index e80aad48fb..6e2876672a 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Html.RealTime.Events; -using Stryker.Configuration.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Json.SourceFiles; -namespace Stryker.Configuration.Reporters.Html.RealTime; +namespace Stryker.Abstractions.Reporters.Html.RealTime; public class RealTimeMutantHandler : IRealTimeMutantHandler { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs index e642af419f..5c550c2dc7 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs @@ -5,9 +5,9 @@ using System.Net; using System.Net.Sockets; using System.Threading.Tasks; -using Stryker.Configuration.Reporters.Html.RealTime.Events; +using Stryker.Abstractions.Reporters.Html.RealTime.Events; -namespace Stryker.Configuration.Reporters.Html.RealTime; +namespace Stryker.Abstractions.Reporters.Html.RealTime; public class SseServer : ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs index 6f0671b7da..d63fee22ce 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs @@ -1,13 +1,12 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporters.Json.TestFiles; -using Stryker.Configuration.Reporting; -using Stryker.Configuration; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporters.Json.TestFiles; +using Stryker.Abstractions.Reporting; using Stryker.Reporters.Json.SourceFiles; -namespace Stryker.Configuration.Reporters.Json +namespace Stryker.Abstractions.Reporters.Json { public class JsonReport : IJsonReport { @@ -15,7 +14,7 @@ public class JsonReport : IJsonReport public IDictionary Thresholds { get; init; } = new Dictionary(); public string ProjectRoot { get; init; } public IDictionary Files { get; init; } = new Dictionary(); - public IDictionary TestFiles { get; set; } = null; + public IDictionary TestFiles { get; set; } = null; public JsonReport() { } @@ -30,7 +29,7 @@ private JsonReport(StrykerOptions options, IReadOnlyProjectComponent mutationRep AddTestFiles(testProjectsInfo); } - public static JsonReport Build(StrykerOptions options, IReadOnlyProjectComponent mutationReport, TestProjectsInfo testProjectsInfo) => new(options, mutationReport, testProjectsInfo); + public static IJsonReport Build(StrykerOptions options, IReadOnlyProjectComponent mutationReport, TestProjectsInfo testProjectsInfo) => new JsonReport(options, mutationReport, testProjectsInfo); private IDictionary GenerateReportComponents(IReadOnlyProjectComponent component) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index 2387ee97ca..e4c61dcbaf 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; -namespace Stryker.Configuration.Reporters.Json +namespace Stryker.Abstractions.Reporters.Json { internal static class JsonReportSerialization { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs index 08f3a908cf..d10dccd0e4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs @@ -2,13 +2,12 @@ using System.IO; using System.IO.Abstractions; using Spectre.Console; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters.Json +namespace Stryker.Abstractions.Reporters.Json { public partial class JsonReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs index f451827907..9854c629c4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters.Json +namespace Stryker.Abstractions.Reporters.Json { public class Location : ILocation { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs index ec810b1182..4818b3680f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters.Json +namespace Stryker.Abstractions.Reporters.Json { public class Position : IPosition { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs index 24e63cfd42..809f32389c 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters.Json.SourceFiles +namespace Stryker.Abstractions.Reporters.Json.SourceFiles { public class JsonMutant : IJsonMutant { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs index 3ba29a3a79..3285991c06 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporters.Json.SourceFiles; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporting; namespace Stryker.Reporters.Json.SourceFiles { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs index 7dacf49203..a37ad14757 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs @@ -1,8 +1,8 @@ using System; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters.Json.TestFiles +namespace Stryker.Abstractions.Reporters.Json.TestFiles { public sealed class JsonTest : IEquatable, IJsonTest { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs index 494e1d2a17..31f90a857c 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.Reporters.Json.TestFiles +namespace Stryker.Abstractions.Reporters.Json.TestFiles { public class JsonTestFile : IJsonTestFile { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs index 9f87fea896..335ee82bd0 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs @@ -5,13 +5,12 @@ using System.Linq; using Grynwald.MarkdownGenerator; using Spectre.Console; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { /// /// Markdown result table reporter. diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs index 7a60724a56..e6dc72e807 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs @@ -1,7 +1,7 @@ using ShellProgressBar; using System; -namespace Stryker.Configuration.Reporters.Progress +namespace Stryker.Abstractions.Reporters.Progress { public interface IProgressBar { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs index 8446cd997e..367c2bbef2 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs @@ -1,8 +1,8 @@ using System; using Spectre.Console; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.Reporters.Progress +namespace Stryker.Abstractions.Reporters.Progress { public interface IProgressBarReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs index 2a1e899ebf..ae79d92472 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.ProjectComponents.TestProjects; -namespace Stryker.Configuration.Reporters.Progress +namespace Stryker.Abstractions.Reporters.Progress { public class ProgressReporter : IReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs index 0359bfa569..dff9d2bcb1 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Configuration.Reporters.Progress +namespace Stryker.Abstractions.Reporters.Progress { public interface IStopWatchProvider { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs index f696996b5f..ab7f2b5c18 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Baseline.Providers; -using Stryker.Configuration; -using Stryker.Configuration.Reporters.Html; -using Stryker.Configuration.Reporters.Json; -using Stryker.Configuration.Reporters.Progress; -using Stryker.Configuration.Reporting; +using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions; +using Stryker.Abstractions.Reporters.Html; +using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Reporters.Progress; +using Stryker.Abstractions.Reporting; -namespace Stryker.Configuration.Reporters +namespace Stryker.Abstractions.Reporters { public interface IReporterFactory { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs index 53ec6d3318..1a40e57a75 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs @@ -3,9 +3,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Logging; -namespace Stryker.Configuration.Reporters.WebBrowserOpener +namespace Stryker.Abstractions.Reporters.WebBrowserOpener { [ExcludeFromCodeCoverage] public class CrossPlatformBrowserOpener : IWebbrowserOpener diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs index d99fd050df..30ffdb5da4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Configuration.Reporters.WebBrowserOpener +namespace Stryker.Abstractions.Reporters.WebBrowserOpener { public interface IWebbrowserOpener { diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs index bdbe24b632..e61daebe7f 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration; +using Stryker.Abstractions; -namespace Stryker.Configuration +namespace Stryker.Abstractions { public class StrykerRunResult { diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs index cd083aaf77..970c3f419f 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs @@ -5,17 +5,16 @@ using System.Diagnostics; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.MutationTest; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents; -using Stryker.Configuration.Reporters; -using Stryker.Configuration.Options; - -namespace Stryker.Configuration +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters; + +namespace Stryker.Abstractions { public interface IStrykerRunner { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs index 032efc0493..fd49a1d8e5 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Configuration.TestRunners +namespace Stryker.Abstractions.TestRunners { public enum CoverageConfidence { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs new file mode 100644 index 0000000000..1f69b84a16 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.TestRunners.VsTest; + +namespace Stryker.Abstractions.TestRunners; + +public interface ITestRunResult +{ + TimeSpan Duration { get; } + ITestGuids ExecutedTests { get; } + ITestGuids FailingTests { get; } + IEnumerable Messages { get; } + string ResultMessage { get; } + bool SessionTimedOut { get; } + ITestGuids TimedOutTests { get; } + IEnumerable VsTestDescriptions { get; } +} diff --git a/src/Stryker.Abstractions/TestRunners/ITestRunner.cs b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs similarity index 75% rename from src/Stryker.Abstractions/TestRunners/ITestRunner.cs rename to src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs index 3f695e6950..19657df22c 100644 --- a/src/Stryker.Abstractions/TestRunners/ITestRunner.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.TestRunners +namespace Stryker.Abstractions.TestRunners { public delegate bool TestUpdateHandler(IReadOnlyList testedMutants, ITestGuids failedTests, diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs index 897728557a..b1f128f5b2 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Configuration.TestRunners +namespace Stryker.Abstractions.TestRunners { [Flags] public enum TestFrameworks diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs index 76615199c5..279796e5b9 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs @@ -1,12 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Mutants; -using Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners.VsTest; -namespace Stryker.Configuration.TestRunners +namespace Stryker.Abstractions.TestRunners { - public class TestRunResult + public class TestRunResult : ITestRunResult { public TestRunResult(bool success, string message = null) { @@ -27,7 +28,7 @@ public TestRunResult( IEnumerable messages, TimeSpan timeSpan) { - VsTestDescriptions = vsTestDescriptions.Where( p => executedTests.Contains(p.Id)).ToList(); + VsTestDescriptions = vsTestDescriptions.Where(p => executedTests.Contains(p.Id)).ToList(); ExecutedTests = executedTests; FailingTests = failedTests; TimedOutTests = timedOutTest; diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs index 479c4f1ebd..fbb04cc004 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { public class DiscoveryEventHandler : ITestDiscoveryEventsHandler { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs index 38bef8f0fa..4e3870d73b 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs @@ -10,7 +10,7 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { public interface IRunResults { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs index 3ad78c5d7c..98dc27c786 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs @@ -1,12 +1,12 @@ using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Logging; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Threading; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { public interface IStrykerTestHostLauncher : ITestHostLauncher { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs index 86f5054f3d..d8528bfdb0 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs @@ -17,7 +17,7 @@ using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { internal class TestRun { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs index 3a5b834051..65bc056bc7 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs @@ -7,14 +7,14 @@ using Microsoft.TestPlatform.VsTestConsole.TranslationLayer; using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Serilog.Events; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ToolHelpers; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.ToolHelpers; using Stryker.DataCollector; -namespace Stryker.Configuration.TestRunners.VsTest; +namespace Stryker.Abstractions.TestRunners.VsTest; /// /// Handles VsTest setup and configuration. diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs index edf817c521..ac4802fcc4 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Configuration.Mutants; +using Stryker.Abstractions.Mutants; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { public sealed class VsTestDescription { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs index 0743769997..023b84e774 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs @@ -6,14 +6,16 @@ using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Initialisation.Buildalyzer; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; - -namespace Stryker.Configuration.TestRunners.VsTest; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.TestRunners; + +namespace Stryker.Abstractions.TestRunners.VsTest; public sealed class VsTestRunner : IDisposable { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs index 93cb1a0bc1..6bf30b6d95 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs @@ -8,14 +8,14 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Configuration.Initialisation; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Mutants; -using Stryker.Configuration; -using Stryker.Configuration.ProjectComponents.TestProjects; +using Stryker.Abstractions.Initialisation; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.TestRunners; using Stryker.DataCollector; -namespace Stryker.Configuration.TestRunners.VsTest +namespace Stryker.Abstractions.TestRunners.VsTest { public sealed class VsTestRunnerPool : ITestRunner { diff --git a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs index 4acd9019e8..82c508b998 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Buildalyzer; -namespace Stryker.Configuration.Testing +namespace Stryker.Abstractions.Testing { /// /// This is an interface to mock buildalyzer classes diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs index 007a37be76..00ea899e2d 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; -namespace Stryker.Configuration.Testing +namespace Stryker.Abstractions.Testing { /// /// Used for mocking System.Process diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs index 50dd7865de..32189bb8c2 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs @@ -9,7 +9,7 @@ using System.IO; using System.Runtime.InteropServices; -namespace Stryker.Configuration.Testing +namespace Stryker.Abstractions.Testing { // integration with OS [ExcludeFromCodeCoverage] diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs index c716acf02d..b438905232 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Stryker.Configuration.Testing +namespace Stryker.Abstractions.Testing { [ExcludeFromCodeCoverage] public class ProcessResult diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs b/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs index 220dbbd3d2..f8c06c3405 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs +++ b/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs @@ -3,10 +3,10 @@ using System.IO.Abstractions; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Logging; -using Stryker.Configuration.Testing; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Testing; -namespace Stryker.Configuration.ToolHelpers; +namespace Stryker.Abstractions.ToolHelpers; public class MsBuildHelper { diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs b/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs index 12bbd8dd15..0cf8c53284 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs @@ -9,9 +9,9 @@ using System.Runtime.InteropServices; using Microsoft.Extensions.Logging; using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Logging; -namespace Stryker.Configuration.ToolHelpers +namespace Stryker.Abstractions.ToolHelpers { public interface IVsTestHelper { diff --git a/src/Stryker.Core/Stryker.Core/packages.lock.json b/src/Stryker.Core/Stryker.Core/packages.lock.json index 61b2a985bf..001554fdae 100644 --- a/src/Stryker.Core/Stryker.Core/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core/packages.lock.json @@ -1562,10 +1562,14 @@ "stryker.abstractions": { "type": "Project", "dependencies": { + "Buildalyzer": "[7.0.2, )", "DotNet.Glob": "[3.1.3, )", "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", - "Serilog": "[4.0.0, )" + "Serilog": "[4.0.0, )", + "Stryker.Utilities": "[1.0.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" } }, "stryker.configuration": { @@ -1591,6 +1595,9 @@ "RegexParser": "[0.5.1, )" } }, + "stryker.utilities": { + "type": "Project" + }, "Microsoft.CodeAnalysis.VisualBasic": { "type": "CentralTransitive", "requested": "[4.10.0, )", diff --git a/src/Stryker.Options/ExclusionPattern.cs b/src/Stryker.Options/ExclusionPattern.cs index 359f6e1223..737e9c9672 100644 --- a/src/Stryker.Options/ExclusionPattern.cs +++ b/src/Stryker.Options/ExclusionPattern.cs @@ -3,8 +3,9 @@ using System.Linq; using System.Text.RegularExpressions; using DotNet.Globbing; +using Stryker.Utilities; -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { public readonly struct ExclusionPattern : IExclusionPattern { diff --git a/src/Stryker.Core/Stryker.Core/FilePattern.cs b/src/Stryker.Options/FilePattern.cs similarity index 89% rename from src/Stryker.Core/Stryker.Core/FilePattern.cs rename to src/Stryker.Options/FilePattern.cs index f06e165c58..257e0f5ef1 100644 --- a/src/Stryker.Core/Stryker.Core/FilePattern.cs +++ b/src/Stryker.Options/FilePattern.cs @@ -1,18 +1,15 @@ using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; -using Stryker.Configuration.Options; -using Stryker.Configuration.Helpers; -using Stryker.Configuration; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Stryker.Configuration +using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Utilities; + +namespace Stryker.Abstractions { /// /// Contains information about which files and which parts of a file should be in- or excluded. /// - public sealed class FilePattern : IEquatable, IFilePattern + public sealed class FilePattern : IEquatable, IFilePattern { private static readonly TextSpan _textSpanMaxValue = new TextSpan(0, int.MaxValue); @@ -88,7 +85,7 @@ public bool IsMatch(string filePath, TextSpan textSpan) return false; } - public bool Equals(FilePattern other) => Glob.ToString() == other.Glob.ToString() && IsExclude == other.IsExclude && TextSpans.SequenceEqual(other.TextSpans); + public bool Equals(IFilePattern other) => Glob.ToString() == other.Glob.ToString() && IsExclude == other.IsExclude && TextSpans.SequenceEqual(other.TextSpans); public override bool Equals(object obj) { diff --git a/src/Stryker.Options/Options/BooleanValidationExtensions.cs b/src/Stryker.Options/Options/BooleanValidationExtensions.cs index fc93c07af7..751801b283 100644 --- a/src/Stryker.Options/Options/BooleanValidationExtensions.cs +++ b/src/Stryker.Options/Options/BooleanValidationExtensions.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { public static class BooleanValidationExtensions { diff --git a/src/Stryker.Options/Options/InputDefinition.cs b/src/Stryker.Options/Options/InputDefinition.cs index 1ee6f171e2..adfb315d4f 100644 --- a/src/Stryker.Options/Options/InputDefinition.cs +++ b/src/Stryker.Options/Options/InputDefinition.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { public interface IInput { diff --git a/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs b/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs index 4c462193ab..66a0c3eea7 100644 --- a/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs +++ b/src/Stryker.Options/Options/Inputs/AdditionalTimeoutInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class AdditionalTimeoutInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs b/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs index b14de5d710..e0097e0599 100644 --- a/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs +++ b/src/Stryker.Options/Options/Inputs/AzureFileStorageSasInput.cs @@ -1,9 +1,9 @@ using System.Linq; using System.Web; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class AzureFileStorageSasInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs b/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs index 16d6451f58..1d1d284370 100644 --- a/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs +++ b/src/Stryker.Options/Options/Inputs/AzureFileStorageUrlInput.cs @@ -1,8 +1,8 @@ using System; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class AzureFileStorageUrlInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/BasePathInput.cs b/src/Stryker.Options/Options/Inputs/BasePathInput.cs index 3fe7c70f33..fad8e2ec59 100644 --- a/src/Stryker.Options/Options/Inputs/BasePathInput.cs +++ b/src/Stryker.Options/Options/Inputs/BasePathInput.cs @@ -1,8 +1,8 @@ using System.IO; using System.IO.Abstractions; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class BasePathInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs index dbbce92cd7..d0326855db 100644 --- a/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs +++ b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs @@ -1,10 +1,8 @@ -using System.Collections.Generic; -using System.Linq; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Reporters; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class BaselineProviderInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs b/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs index 9988b3fe4b..56eaa007e8 100644 --- a/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs +++ b/src/Stryker.Options/Options/Inputs/BreakOnInitialTestFailureInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class BreakOnInitialTestFailureInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs b/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs index 0dd8426b73..a08c2e720c 100644 --- a/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs +++ b/src/Stryker.Options/Options/Inputs/ConcurrencyInput.cs @@ -1,9 +1,9 @@ using System; using Microsoft.Extensions.Logging; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Logging; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Logging; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ConcurrencyInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs b/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs index bc55d692b9..f86d2227a1 100644 --- a/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs +++ b/src/Stryker.Options/Options/Inputs/ConfigurationInput.cs @@ -1,7 +1,7 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs; +namespace Stryker.Abstractions.Options.Inputs; public class ConfigurationInput : Input { public override string Default => null; diff --git a/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs b/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs index 341a0d2922..ed92429fc8 100644 --- a/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs +++ b/src/Stryker.Options/Options/Inputs/CoverageAnalysisInput.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Text; -using Stryker.Configuration.Options; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class CoverageAnalysisInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs index 586306a4f4..d8314efa1a 100644 --- a/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs +++ b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Reporters; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DashboardApiKeyInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs b/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs index 98b7a15371..f1a6d2b09e 100644 --- a/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs +++ b/src/Stryker.Options/Options/Inputs/DashboardUrlInput.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DashboardUrlInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/DevModeInput.cs b/src/Stryker.Options/Options/Inputs/DevModeInput.cs index b9c03dafc6..5f51148521 100644 --- a/src/Stryker.Options/Options/Inputs/DevModeInput.cs +++ b/src/Stryker.Options/Options/Inputs/DevModeInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DevModeInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs index 628c325e67..4a62446480 100644 --- a/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs +++ b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DiffIgnoreChangesInput : Input> { diff --git a/src/Stryker.Options/Options/Inputs/DisableBailInput.cs b/src/Stryker.Options/Options/Inputs/DisableBailInput.cs index 88f3b8a0c6..8dc7a758c3 100644 --- a/src/Stryker.Options/Options/Inputs/DisableBailInput.cs +++ b/src/Stryker.Options/Options/Inputs/DisableBailInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Options; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DisableBailInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs b/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs index 7810eeb81f..49afa8a364 100644 --- a/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs +++ b/src/Stryker.Options/Options/Inputs/DisableMixMutantsInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Options; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class DisableMixMutantsInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs b/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs index 671ff1b34c..01dd3d9423 100644 --- a/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/FallbackVersionInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class FallbackVersionInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs b/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs index e999eb74ef..f25ad9c2c9 100644 --- a/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs +++ b/src/Stryker.Options/Options/Inputs/IgnoreMethodsInput.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class IgnoreMethodsInput : Input> { diff --git a/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs index d23bddd042..3b0d4699db 100644 --- a/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs +++ b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class IgnoreMutationsInput : Input> { diff --git a/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs b/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs index 5e3e1adc09..50f0b5ae7f 100644 --- a/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/LanguageVersionInput.cs @@ -1,10 +1,10 @@ using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; using System; using System.Collections.Generic; using System.Linq; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class LanguageVersionInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/LogToFileInput.cs b/src/Stryker.Options/Options/Inputs/LogToFileInput.cs index 664be1c055..5fa5bd1246 100644 --- a/src/Stryker.Options/Options/Inputs/LogToFileInput.cs +++ b/src/Stryker.Options/Options/Inputs/LogToFileInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class LogToFileInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs b/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs index 8a9432a118..1763175d19 100644 --- a/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ModuleNameInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ModuleNameInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs b/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs index 54fe8eab4f..4517228b34 100644 --- a/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs +++ b/src/Stryker.Options/Options/Inputs/MsBuildPathInput.cs @@ -4,9 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class MsBuildPathInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/MutateInput.cs b/src/Stryker.Options/Options/Inputs/MutateInput.cs index 8430af6d6a..3d2ee05bf1 100644 --- a/src/Stryker.Options/Options/Inputs/MutateInput.cs +++ b/src/Stryker.Options/Options/Inputs/MutateInput.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Utilities; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class MutateInput : Input> { @@ -14,11 +16,11 @@ public class MutateInput : Input> Use '{..}' at the end of a pattern to specify spans of text in files to in- or exclude. Example: ['**/*Service.cs','!**/MySpecialService.cs', '**/MyOtherService.cs{1..10}{32..45}']"; - public IEnumerable Validate() + public IEnumerable Validate() { if (SuppliedInput is { } && SuppliedInput.Any()) { - var filesToInclude = new List(); + var filesToInclude = new List(); foreach (var pattern in SuppliedInput) { diff --git a/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs b/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs index 238f0a0df1..eb04e429bd 100644 --- a/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs +++ b/src/Stryker.Options/Options/Inputs/MutationLevelInput.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Mutators; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Mutators; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class MutationLevelInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs b/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs index 4d17e6477c..6deca7e6df 100644 --- a/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs +++ b/src/Stryker.Options/Options/Inputs/OpenReportEnabledInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class OpenReportEnabledInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/OpenReportInput.cs b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs index 820ed028ff..90cf2caae6 100644 --- a/src/Stryker.Options/Options/Inputs/OpenReportInput.cs +++ b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public enum ReportType { diff --git a/src/Stryker.Options/Options/Inputs/OutputPathInput.cs b/src/Stryker.Options/Options/Inputs/OutputPathInput.cs index 92ab15b5ab..cc52d5a76f 100644 --- a/src/Stryker.Options/Options/Inputs/OutputPathInput.cs +++ b/src/Stryker.Options/Options/Inputs/OutputPathInput.cs @@ -1,7 +1,7 @@ using System.IO.Abstractions; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class OutputPathInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs b/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs index 82d8e305cc..3801fdb762 100644 --- a/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ProjectNameInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ProjectNameInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs index a05d8962c2..e8ec039220 100644 --- a/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Reporters; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ProjectVersionInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs b/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs index b13d050012..d3889baa47 100644 --- a/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/ReportFileNameInput.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; using System.IO.Abstractions; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ReportFileNameInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ReportersInput.cs b/src/Stryker.Options/Options/Inputs/ReportersInput.cs index e7dc3bbe84..11c485beba 100644 --- a/src/Stryker.Options/Options/Inputs/ReportersInput.cs +++ b/src/Stryker.Options/Options/Inputs/ReportersInput.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Configuration.Exceptions; -using Stryker.Configuration.Reporters; +using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Reporters; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ReportersInput : Input> { diff --git a/src/Stryker.Options/Options/Inputs/SinceInput.cs b/src/Stryker.Options/Options/Inputs/SinceInput.cs index 7c760dcefd..ac0311cc2a 100644 --- a/src/Stryker.Options/Options/Inputs/SinceInput.cs +++ b/src/Stryker.Options/Options/Inputs/SinceInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class SinceInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs b/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs index f4c9291b01..8031b34914 100644 --- a/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs +++ b/src/Stryker.Options/Options/Inputs/SinceTargetInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class SinceTargetInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/SolutionInput.cs b/src/Stryker.Options/Options/Inputs/SolutionInput.cs index cbaba5f421..d208d160d0 100644 --- a/src/Stryker.Options/Options/Inputs/SolutionInput.cs +++ b/src/Stryker.Options/Options/Inputs/SolutionInput.cs @@ -1,9 +1,9 @@ using System.IO.Abstractions; using System.Linq; using System.Text; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class SolutionInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs b/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs index 5f872264a7..31cfa3a023 100644 --- a/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs +++ b/src/Stryker.Options/Options/Inputs/SourceProjectNameInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class SourceProjectNameInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs b/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs index 723969d121..f102eac1dd 100644 --- a/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs +++ b/src/Stryker.Options/Options/Inputs/TargetFrameworkInput.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class TargetFrameworkInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs b/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs index 19b0cac439..ee2fb45987 100644 --- a/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs +++ b/src/Stryker.Options/Options/Inputs/TestCaseFilterInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class TestCaseFilterInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs index 34c43b481a..342ee4937e 100644 --- a/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs +++ b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs @@ -2,7 +2,7 @@ using System.IO; using System.Linq; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class TestProjectsInput : Input> { diff --git a/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs index b36e85659b..6310be9a5b 100644 --- a/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdBreakInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ThresholdBreakInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs index 8d94522ab7..55ef9bf7cc 100644 --- a/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdHighInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ThresholdHighInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs b/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs index 9cb9081fd5..51db4be207 100644 --- a/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs +++ b/src/Stryker.Options/Options/Inputs/ThresholdLowInput.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class ThresholdLowInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/VerbosityInput.cs b/src/Stryker.Options/Options/Inputs/VerbosityInput.cs index b2c30c72e9..529d70b50e 100644 --- a/src/Stryker.Options/Options/Inputs/VerbosityInput.cs +++ b/src/Stryker.Options/Options/Inputs/VerbosityInput.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using Serilog.Events; -using Stryker.Configuration.Exceptions; +using Stryker.Abstractions.Exceptions; -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class VerbosityInput : Input { diff --git a/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs b/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs index 103d8911b2..aa0cb90883 100644 --- a/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs +++ b/src/Stryker.Options/Options/Inputs/WithBaselineInput.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration.Options.Inputs +namespace Stryker.Abstractions.Options.Inputs { public class WithBaselineInput : Input { diff --git a/src/Stryker.Options/Options/LogOptions.cs b/src/Stryker.Options/Options/LogOptions.cs index e1ff8431c4..557dd5e50e 100644 --- a/src/Stryker.Options/Options/LogOptions.cs +++ b/src/Stryker.Options/Options/LogOptions.cs @@ -1,6 +1,6 @@ using Serilog.Events; -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { public class LogOptions : ILogOptions { diff --git a/src/Stryker.Options/Options/StrykerInputs.cs b/src/Stryker.Options/Options/StrykerInputs.cs index 94bd54ddb9..eb74dc6c7a 100644 --- a/src/Stryker.Options/Options/StrykerInputs.cs +++ b/src/Stryker.Options/Options/StrykerInputs.cs @@ -1,7 +1,8 @@ -using Stryker.Configuration.Mutators; -using Stryker.Configuration.Options.Inputs; +using System.IO.Abstractions; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Configuration.Options +namespace Stryker.Abstractions.Options { public interface IStrykerInputs { diff --git a/src/Stryker.Options/Options/StrykerOptions.cs b/src/Stryker.Options/Options/StrykerOptions.cs index 24e5ca5eb3..913a310728 100644 --- a/src/Stryker.Options/Options/StrykerOptions.cs +++ b/src/Stryker.Options/Options/StrykerOptions.cs @@ -1,13 +1,15 @@ using System.Text.RegularExpressions; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Configuration; -using Stryker.Configuration.Baseline; -using Stryker.Configuration.Options; -using Stryker.Configuration.Reporting; -using Stryker.Configuration.Mutators; -using Stryker.Configuration.Options.Inputs; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Reporting; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options.Inputs; +using Stryker.Utilities; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporters; -namespace Stryker.Configuration; +namespace Stryker.Abstractions; public class StrykerOptions : IStrykerOptions { @@ -118,7 +120,7 @@ public class StrykerOptions : IStrykerOptions /// /// The reports that should be activated when stryker is done testing. /// - public IEnumerable Reporters { get; init; } = []; + public IEnumerable Reporters { get; init; } = []; /// /// When true, the baseline feature should be enabled. @@ -128,7 +130,7 @@ public class StrykerOptions : IStrykerOptions /// /// When the baseline feature is enabled, this selects the source of the baseline. /// - public IBaselineProvider BaselineProvider { get; init; } + public BaselineProvider BaselineProvider { get; init; } /// /// The url to connect to the Azure File Storage API @@ -185,7 +187,7 @@ public class StrykerOptions : IStrykerOptions /// /// Files that should be mutated or ignored. Uses GLOB as pattern matching. Also parts of files can be ignored by format {10..21} /// - public IEnumerable Mutate { get; init; } = [FilePattern.Parse("**/*")]; + public IEnumerable Mutate { get; init; } = [FilePattern.Parse("**/*")]; /// /// Method call mutations that should not be tested. The implementation of the method may still be mutated and tested. diff --git a/src/Stryker.Options/Options/Thresholds.cs b/src/Stryker.Options/Options/Thresholds.cs index 4b4f67d02c..c9d8206406 100644 --- a/src/Stryker.Options/Options/Thresholds.cs +++ b/src/Stryker.Options/Options/Thresholds.cs @@ -1,6 +1,6 @@ -using Stryker.Configuration.Options; +using Stryker.Abstractions.Options; -namespace Stryker.Configuration +namespace Stryker.Abstractions { public class Thresholds : IThresholds { diff --git a/src/Stryker.Options/packages.lock.json b/src/Stryker.Options/packages.lock.json index ff47969ff9..8ca4a25ae2 100644 --- a/src/Stryker.Options/packages.lock.json +++ b/src/Stryker.Options/packages.lock.json @@ -43,11 +43,249 @@ "resolved": "4.0.0", "contentHash": "2jDkUrSh5EofOp7Lx5Zgy0EB+7hXjjxE2ktTb1WVQmU00lDACR2TdROGKU0K1pDTBSJBN1PqgYpgOZF8mL7NJw==" }, + "Buildalyzer.Logger": { + "type": "Transitive", + "resolved": "7.0.2", + "contentHash": "awL4TbcBjWAgmeWbi7G6OkUIr0OEPwZASC09Frd6A84LmKSZWOICgZ9vUTCtwlVtepr6FJNTVHxWR6HopfbwLQ==" + }, + "Microsoft.Build": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "sNhRGwqVoyj9+PTg5D/ntbB4TPRAx/sCF0qmJ2bB93c62KniyPGPbahf0FXD1rpeQitXDo52p3F5kRZBg+l0dw==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections.Immutable": "5.0.0", + "System.Configuration.ConfigurationManager": "4.7.0", + "System.Reflection.Metadata": "1.6.0", + "System.Security.Principal.Windows": "4.7.0", + "System.Text.Encoding.CodePages": "4.0.1", + "System.Text.Json": "5.0.2", + "System.Threading.Tasks.Dataflow": "4.9.0" + } + }, + "Microsoft.Build.Framework": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "znFg/TGxwtXISkNMWstaCcl7l2zM4p7vYsXWL9HyJw2w9/F1cpq50H76xksXo/dH2ZKTgc3uG4jkLboL4rZfbg==", + "dependencies": { + "System.Security.Permissions": "4.7.0" + } + }, + "Microsoft.Build.Tasks.Core": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "+AGJSLh9RCkgq3G9VpiXBD+GeTmw5VAgYfcOPud4zk1FeMSctAUXVDJzenDIYKe2aawjFHMZUjUfji0Qd5SCBQ==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.Build.Utilities.Core": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.CodeDom": "4.4.0", + "System.Collections.Immutable": "5.0.0", + "System.Reflection.Metadata": "1.6.0", + "System.Resources.Extensions": "4.6.0", + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Cryptography.Xml": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Threading.Tasks.Dataflow": "4.9.0" + } + }, + "Microsoft.Build.Utilities.Core": { + "type": "Transitive", + "resolved": "17.0.1", + "contentHash": "Ot9B3GOVthAMs903+dyvpcAwimxPkGs7QVGqZ49KjmgIB51VrcJXt/L9l6BpssIRuwf4wOWZOuGTkgFJtmwgVg==", + "dependencies": { + "Microsoft.Build.Framework": "17.0.1", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections.Immutable": "5.0.0", + "System.Configuration.ConfigurationManager": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Text.Encoding.CodePages": "4.0.1" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.NET.StringTools": { + "type": "Transitive", + "resolved": "1.0.0", + "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", + "dependencies": { + "System.Memory": "4.5.4", + "System.Runtime.CompilerServices.Unsafe": "5.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "3.1.0", + "contentHash": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "Microsoft.Win32.SystemEvents": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0" + } + }, + "MSBuild.StructuredLogger": { + "type": "Transitive", + "resolved": "2.1.815", + "contentHash": "5UfWYgsWBGI3w0npjYLeXPv8TUcNmGB/QBhoYLDeYTosuvmG6pz6HPb+xPg/Boi1bmw2Bgnjo+XopcwzCbZAqg==", + "dependencies": { + "Microsoft.Build.Framework": "16.10.0", + "Microsoft.Build.Utilities.Core": "16.10.0" + } + }, + "MsBuildPipeLogger.Server": { + "type": "Transitive", + "resolved": "1.1.6", + "contentHash": "rls0hb7plSfVFCqScDxTqtGpIlMfoQEchqjmK/YtXDML11GU5jI+oCi9YsikGulJVUv/vLSY6Ktah0uXwv25EA==", + "dependencies": { + "Microsoft.Build": "15.3.409" + } + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "4.4.0", + "contentHash": "2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==" + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Collections.Immutable": { "type": "Transitive", "resolved": "8.0.0", "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, + "System.Configuration.ConfigurationManager": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "/anOTeSZCNNI2zDilogWrZ8pNqCmYbzGNexUnNhjW8k0sHqEZ2nHJBp147jBV3hGYswu5lINpNg1vxR7bnqvVA==", + "dependencies": { + "System.Security.Cryptography.ProtectedData": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Drawing.Common": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "Microsoft.Win32.SystemEvents": "4.7.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Reflection.Metadata": { "type": "Transitive", "resolved": "8.0.0", @@ -56,13 +294,232 @@ "System.Collections.Immutable": "8.0.0" } }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.Extensions": { + "type": "Transitive", + "resolved": "4.6.0", + "contentHash": "6aVCk8oTFZNT3Tx1jjiPi6+aipiJ3qMZYttAREKTRJidP50YvNeOn4PXrqzfA5qC23fLReq2JYp+nJwzj62HGw==" + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "System.Security.Principal.Windows": "4.7.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "4WQjFuypWtxb/bl/YwEE7LYGn4fgpsikFfBU6xwEm4YBYiRAhXAEJ62lILBu2JJSFbClIAntFTGfDZafn8yZTg==" + }, + "System.Security.Cryptography.Pkcs": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "0Srzh6YlhjuMxaqMyeCCdZs22cucaUAG6SKDd3gNHBJmre0VZ71ekzWu9rvLD4YXPetyNdPvV6Qst+8C++9v3Q==", + "dependencies": { + "System.Security.Cryptography.Cng": "4.7.0" + } + }, + "System.Security.Cryptography.ProtectedData": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ==" + }, + "System.Security.Cryptography.Xml": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "B6pAyxMvXGbZemb+ER877KSr6OKis+qAdxhhKKK36I6sgj2js8mbcEVviZEHYV8XRTWjbKsAq8Z/zoaegA30dA==", + "dependencies": { + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Security.Permissions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "dkOV6YYVBnYRa15/yv004eCGRBVADXw8qRbbNiCn/XpdJSUXkkUeIvdvFHkvnko4CdKMqG8yRHC4ox83LSlMsQ==", + "dependencies": { + "System.Security.AccessControl": "4.7.0", + "System.Windows.Extensions": "4.7.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==" + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "h4z6rrA/hxWf4655D18IIZ0eaLRa3tQC/j+e26W+VinIHY0l07iEXaAvO0YSYq3MvCjMYy8Zs5AdC1sxNQOB7Q==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11" + } + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "5.0.2", + "contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==" + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.0.11", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "dependencies": { + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Dataflow": { + "type": "Transitive", + "resolved": "4.9.0", + "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" + }, + "System.Windows.Extensions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "CeWTdRNfRaSh0pm2gDTJFwVaXfTq6Xwv/sA887iwPTneW7oMtMlpvDIO+U60+3GWTB7Aom6oQwv5VZVUhQRdPQ==", + "dependencies": { + "System.Drawing.Common": "4.7.0" + } + }, + "TestableIO.System.IO.Abstractions": { + "type": "Transitive", + "resolved": "21.0.26", + "contentHash": "6XwIymB/HIHdu4UAWcW+kP1Q4untd4T01leOfPYObKzwoqKOfXTw6GneBpQZ5TLAq9TUc2yS4j6asK2e2NNXog==" + }, "stryker.abstractions": { "type": "Project", "dependencies": { + "Buildalyzer": "[7.0.2, )", "DotNet.Glob": "[3.1.3, )", "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.CodeAnalysis.Common": "[4.10.0, )", "Microsoft.TestPlatform.ObjectModel": "[17.10.0, )", - "Serilog": "[4.0.0, )" + "Serilog": "[4.0.0, )", + "Stryker.Utilities": "[1.0.0, )", + "TestableIO.System.IO.Abstractions.Wrappers": "[21.0.26, )" + } + }, + "stryker.utilities": { + "type": "Project" + }, + "Buildalyzer": { + "type": "CentralTransitive", + "requested": "[7.0.2, )", + "resolved": "7.0.2", + "contentHash": "LCbBUL22CaMwGJKGomc+DVsL+NNeWs5wxw6ov6/e6sKY+Jij4BM7JnUqjg3htP9AgmU8JBsfs7xTvWfUyaoHnA==", + "dependencies": { + "Buildalyzer.Logger": "7.0.2", + "MSBuild.StructuredLogger": "2.1.815", + "Microsoft.Build": "17.0.1", + "Microsoft.Build.Tasks.Core": "17.0.1", + "Microsoft.CodeAnalysis.CSharp": "4.0.0", + "Microsoft.CodeAnalysis.VisualBasic": "4.0.0", + "Microsoft.Extensions.Logging": "6.0.0", + "MsBuildPipeLogger.Server": "1.1.6", + "NuGet.Frameworks": "6.9.1" } }, "Microsoft.CodeAnalysis.Analyzers": { @@ -71,6 +528,28 @@ "resolved": "3.3.4", "contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==" }, + "Microsoft.CodeAnalysis.VisualBasic": { + "type": "CentralTransitive", + "requested": "[4.10.0, )", + "resolved": "4.0.0", + "contentHash": "FK+OGUMUh9O6/GCwyIy4c/sOrarF36/yEY07BbXVYMql1qCqHGWfyWXyCQKQ6m/KqReCqW6aO4cK7kK/AYBpyA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[4.0.0]" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "6.0.0", + "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Diagnostics.DiagnosticSource": "6.0.0" + } + }, "Microsoft.TestPlatform.ObjectModel": { "type": "CentralTransitive", "requested": "[17.10.0, )", @@ -79,6 +558,21 @@ "dependencies": { "System.Reflection.Metadata": "1.6.0" } + }, + "NuGet.Frameworks": { + "type": "CentralTransitive", + "requested": "[6.10.1, )", + "resolved": "6.9.1", + "contentHash": "DaKh3lenPUvzGccPkbI97BIvA27z+/UsL3ankfoZlX/4vBVDK5N1sheFTQ+GuJf+IgSzsJz/A21SPUpQLHwUtA==" + }, + "TestableIO.System.IO.Abstractions.Wrappers": { + "type": "CentralTransitive", + "requested": "[21.0.26, )", + "resolved": "21.0.26", + "contentHash": "lvrJF2Oz/4vp5rVIndW9RC/cxGfErnE+Bt/jVNFu7/po+7n8UNZDjgUGrbRGtQfW6zkaUPx/WTONT1Tf9iacdQ==", + "dependencies": { + "TestableIO.System.IO.Abstractions": "21.0.26" + } } } } diff --git a/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs b/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs similarity index 93% rename from src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs rename to src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs index 2c9c21d0ef..41c22fd795 100644 --- a/src/Stryker.Core/Stryker.Core/Attributes/MutatorDescriptionAttribute.cs +++ b/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs @@ -1,7 +1,6 @@ -using System; using System.Diagnostics.CodeAnalysis; -namespace Stryker.Configuration.Attributes +namespace Stryker.Utilities.Attributes { [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public class MutatorDescriptionAttribute : Attribute diff --git a/src/Stryker.Utilities/EnumExtension.cs b/src/Stryker.Utilities/EnumExtension.cs new file mode 100644 index 0000000000..6e006aac71 --- /dev/null +++ b/src/Stryker.Utilities/EnumExtension.cs @@ -0,0 +1,30 @@ +using System.Globalization; +using System.Reflection; +using Stryker.Utilities.Attributes; + +namespace Stryker.Utilities; + +public static class EnumExtension +{ + public static IEnumerable GetDescriptions(this T e) where T : IConvertible + { + if (e is not Enum) + return Array.Empty(); + var type = e.GetType(); + var values = Enum.GetValues(type); + + foreach (int val in values) + { + if (val != e.ToInt32(CultureInfo.InvariantCulture)) + { + continue; + } + var memInfo = type.GetMember(type.GetEnumName(val)); + + var descriptions = memInfo[0].GetCustomAttributes(false).Select(descriptionAttribute => descriptionAttribute.Description); + return descriptions; + } + + return Array.Empty(); + } +} diff --git a/src/Stryker.Options/FilePathUtils.cs b/src/Stryker.Utilities/FilePathUtils.cs similarity index 95% rename from src/Stryker.Options/FilePathUtils.cs rename to src/Stryker.Utilities/FilePathUtils.cs index 1785f783e0..3ec564ddc9 100644 --- a/src/Stryker.Options/FilePathUtils.cs +++ b/src/Stryker.Utilities/FilePathUtils.cs @@ -1,4 +1,4 @@ -namespace Stryker.Configuration +namespace Stryker.Utilities { public static class FilePathUtils { diff --git a/src/Stryker.Utilities/Stryker.Utilities.csproj b/src/Stryker.Utilities/Stryker.Utilities.csproj new file mode 100644 index 0000000000..fa71b7ae6a --- /dev/null +++ b/src/Stryker.Utilities/Stryker.Utilities.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Stryker.Utilities/packages.lock.json b/src/Stryker.Utilities/packages.lock.json new file mode 100644 index 0000000000..e807381602 --- /dev/null +++ b/src/Stryker.Utilities/packages.lock.json @@ -0,0 +1,13 @@ +{ + "version": 2, + "dependencies": { + "net8.0": { + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[1.2.4, )", + "resolved": "1.2.4", + "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" + } + } + } +} \ No newline at end of file diff --git a/src/Stryker.sln b/src/Stryker.sln index 37a0631c5d..3241310ec2 100644 --- a/src/Stryker.sln +++ b/src/Stryker.sln @@ -39,6 +39,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stryker.Abstractions", "Str EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stryker.Configuration", "Stryker.Options\Stryker.Configuration.csproj", "{E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stryker.Utilities", "Stryker.Utilities\Stryker.Utilities.csproj", "{BDD19501-B2E3-4EFE-ACCD-8D11C99CCCED}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -81,6 +83,10 @@ Global {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Debug|Any CPU.Build.0 = Debug|Any CPU {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Release|Any CPU.ActiveCfg = Release|Any CPU {E80FD63A-510D-49E2-B1FE-B6CDD5BA106D}.Release|Any CPU.Build.0 = Release|Any CPU + {BDD19501-B2E3-4EFE-ACCD-8D11C99CCCED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BDD19501-B2E3-4EFE-ACCD-8D11C99CCCED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BDD19501-B2E3-4EFE-ACCD-8D11C99CCCED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BDD19501-B2E3-4EFE-ACCD-8D11C99CCCED}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From c61044a096322fededa5aec6aeef1246fc47602e Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 13 Sep 2024 18:00:48 +0200 Subject: [PATCH 03/13] Compiling but tests failing --- src/Directory.Build.props | 1 + src/Directory.Packages.props | 3 +- .../Baseline/IBaselineProvider.cs | 1 + .../Exceptions/CompilationException.cs | 2 + .../Exceptions/GeneralStrykerException.cs | 1 + .../Exceptions/InputException.cs | 1 + .../Exceptions/NoTestProjectsException.cs | 2 + src/Stryker.Abstractions/IMutant.cs | 4 +- src/Stryker.Abstractions/IMutator.cs | 1 + src/Stryker.Abstractions/IProjectAndTests.cs | 1 + .../Options/IExclusionPattern.cs | 1 + .../Options/IStrykerOptions.cs | 4 +- .../Options/ReportType.cs | 7 + .../{Reporting => Options}/Reporter.cs | 2 +- .../ProjectComponents/IFilePattern.cs | 1 + .../ProjectComponents/IFolderComposite.cs | 10 + .../ProjectComponents/IProjectComponent.cs | 11 +- .../IReadOnlyFolderComposite.cs | 8 - .../ProjectComponents/ITestFile.cs | 4 +- .../ProjectComponents/ITestProject.cs | 1 + .../ProjectComponents/ITestProjectsInfo.cs | 1 + .../Reporting/IJsonMutant.cs | 2 + .../Reporting/IJsonReport.cs | 2 + .../Reporting/IJsonTestFile.cs | 4 +- .../Reporting/IReporter.cs | 1 + .../Stryker.Abstractions.csproj | 3 +- .../Testing/ITestGuids.cs | 3 + src/Stryker.Abstractions/packages.lock.json | 789 +++++++++++- .../FileConfigReaderTests.cs | 4 +- .../StrykerCLIInitCommandTests.cs | 2 +- .../Stryker.CLI.UnitTest/StrykerCLITests.cs | 5 +- .../Stryker.CLI.UnitTest/packages.lock.json | 24 +- src/Stryker.CLI/Stryker.CLI/Program.cs | 2 +- src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs | 2 +- .../Stryker.CLI/packages.lock.json | 24 +- .../Stryker.Core.UnitTest/AssertExtensions.cs | 6 +- .../AzureFileShareBaselineProviderTests.cs | 14 +- .../DashboardBaselineProviderTests.cs | 14 +- .../Providers/DiskBaselineProviderTests.cs | 12 +- .../Utils/BaselineMutantHelperTests.cs | 10 +- .../Clients/DashboardClientsTest.cs | 21 +- .../Compiling/CSharpCompilingProcessTests.cs | 28 +- .../Compiling/CSharpRollbackProcessTests.cs | 23 +- .../DashboardCompare/GitInfoProviderTests.cs | 9 +- .../DiffProviders/GitDiffProviderTests.cs | 8 +- .../ExclusionPatternTests.cs | 4 +- .../Stryker.Core.UnitTest/FilePatternTests.cs | 3 +- .../Fsharp/FsharpFileDetectionTests.cs | 6 +- .../Helpers/RangeHelperTests.cs | 7 +- .../Helpers/TextSpanHelperTests.cs | 6 +- .../IgnoreIfAttribute.cs | 2 +- .../Initialisation/BuildAnalyzerTestsBase.cs | 29 +- .../AnalyzerResultExtensionsTests.cs | 12 +- .../InitialBuildProcessTests.cs | 10 +- .../Initialisation/InitialTestProcessTests.cs | 16 +- .../InitialisationProcessTests.cs | 82 +- .../Initialisation/InputFileResolverTests.cs | 65 +- .../NugetRestoreProcessTests.cs | 24 +- .../Initialisation/ProjectMutatorTests.cs | 24 +- .../ProjectOrchestratorTests.cs | 64 +- .../TimeoutValueCalculatorTests.cs | 6 +- .../InjectedHelpers/InjectedHelperTests.cs | 14 +- .../LoggerMockExtensions.cs | 2 +- .../Stryker.Core.UnitTest/MockExtensions.cs | 6 +- .../BaselineMutantFilterTests.cs | 49 +- .../ExcludeFromCodeCoverageFilterTests.cs | 11 +- .../ExcludeLinqExpressionFilterTests.cs | 9 +- .../ExcludeMutationMutantFilterTests.cs | 9 +- .../FilePatternMutantFilterTests.cs | 11 +- .../IgnoreBlockMutantFilterTests.cs | 5 +- .../IgnoredMethodMutantFilterTests.cs | 31 +- .../MutantFilters/MutantFilterFactoryTests.cs | 16 +- .../MutantFilters/SinceMutantFilterTests.cs | 44 +- .../Mutants/CsharpMutantOrchestratorTests.cs | 223 ++-- .../Mutants/MutantOrchestratorTestsBase.cs | 6 +- .../Mutants/MutantPlacerTests.cs | 14 +- .../Mutants/MutantTests.cs | 3 +- .../CSharpMutationTestProcessTests.cs | 16 +- .../MutationTest/FullRunScenario.cs | 17 +- .../MutationTest/MutationTestExecutorTests.cs | 37 +- .../MutationTest/MutationTestProcessTests.cs | 23 +- .../Mutators/AbstractMutatorTests.cs | 4 +- .../Mutators/ArrayCreationMutatorTests.cs | 5 +- .../AssignmentStatementMutatorTests.cs | 7 +- .../Mutators/BinaryExpressionMutatorTests.cs | 6 +- .../Mutators/BlockMutatorTests.cs | 5 +- .../Mutators/BooleanMutatorTests.cs | 7 +- .../Mutators/CheckedMutatorTests.cs | 12 +- .../ConditionalExpressionMutatorTests.cs | 12 +- .../Mutators/InitializerMutatorTests.cs | 7 +- .../InterpolatedStringMutatorTests.cs | 7 +- .../IsPatternExpressionMutatorTests.cs | 12 +- .../Mutators/LinqMutatorTest.cs | 14 +- .../Mutators/MathMutatorTest.cs | 8 +- .../Mutators/NegateConditionMutatorTests.cs | 10 +- .../NullCoalescingExpressionMutatorTests.cs | 9 +- .../Mutators/ObjectCreationMutatorTests.cs | 6 +- .../Mutators/PostfixUnaryMutatorTests.cs | 46 +- .../Mutators/PrefixUnaryMutatorTests.cs | 7 +- .../Mutators/RegexMutatorTest.cs | 7 +- .../Mutators/StatementMutatorTests.cs | 7 +- .../Mutators/StringEmptyMutatorTests.cs | 3 +- .../Mutators/StringMethodMutatorTests.cs | 3 +- .../Mutators/StringMutatorTests.cs | 3 +- .../Mutators/SwitchExpressionMutatorTests.cs | 10 +- .../Mutators/TestMutator.cs | 2 +- .../Inputs/AdditionalTimeoutMsInputTests.cs | 5 +- .../Inputs/AzureFileStorageSasInputTests.cs | 3 +- .../Inputs/AzureFileStorageUrlInputTests.cs | 3 +- .../Options/Inputs/BasePathInputTests.cs | 3 +- .../Inputs/BaselineProviderInputTests.cs | 5 +- .../BreakOnInitialTestFailureInputTests.cs | 5 +- .../Options/Inputs/ConcurrencyInputTests.cs | 5 +- .../Options/Inputs/ConfigurationInputTests.cs | 2 +- .../Inputs/DashboardApiKeyInputTests.cs | 5 +- .../Options/Inputs/DashboardUrlInputTests.cs | 5 +- .../Options/Inputs/DevModeInputTests.cs | 3 +- .../Inputs/DiffIgnoreChangesInputTests.cs | 5 +- .../Options/Inputs/DisableBailInputTests.cs | 2 +- .../Inputs/DisableMixMutantsInputTests.cs | 3 +- .../Inputs/FallbackVersionInputTests.cs | 3 +- .../Options/Inputs/IgnoreMethodsInputTests.cs | 2 +- .../Inputs/IgnoreMutationsInputTests.cs | 12 +- .../Inputs/LanguageVersionInputTests.cs | 3 +- .../Options/Inputs/LogToFileInputTests.cs | 3 +- .../Options/Inputs/ModuleNameInputTests.cs | 3 +- .../Options/Inputs/MsBuildPathInputTests.cs | 3 +- .../Options/Inputs/MutateInputTests.cs | 3 +- .../Options/Inputs/MutationLevelInputTests.cs | 3 +- .../Inputs/OpenReportEnabledInputTests.cs | 3 +- .../Options/Inputs/OpenReportInputTests.cs | 5 +- .../Inputs/OptimizationModeInputTests.cs | 3 +- .../Options/Inputs/OutputPathInputTests.cs | 3 +- .../Options/Inputs/ProjectNameInputTests.cs | 3 +- .../Inputs/ProjectVersionInputTests.cs | 8 +- .../Inputs/ReportFileNameInputTests.cs | 5 +- .../Options/Inputs/ReportOpenerTests.cs | 5 +- .../Options/Inputs/ReportersInputTests.cs | 11 +- .../Options/Inputs/SinceInputTests.cs | 5 +- .../Options/Inputs/SinceTargetInputTests.cs | 3 +- .../Options/Inputs/SolutionInputTests.cs | 5 +- .../Inputs/SourceProjectNameInputTests.cs | 3 +- .../Inputs/TargetFrameworkInputTests.cs | 3 +- .../Inputs/TestCaseFilterInputTests.cs | 3 +- .../Options/Inputs/TestProjectsInputTests.cs | 3 +- .../Inputs/ThresholdBreakInputTests.cs | 3 +- .../Options/Inputs/ThresholdHighInputTests.cs | 3 +- .../Options/Inputs/ThresholdLowInputTests.cs | 3 +- .../Options/Inputs/VerbosityInputTests.cs | 3 +- .../Options/Inputs/WithBaselineInputTests.cs | 3 +- .../Options/StrykerInputsTests.cs | 3 +- .../CsharpProjectComponentTests.cs | 4 +- .../SourceProjects/SourceProjectInfoTests.cs | 6 +- .../TestProjects/TestCaseTests.cs | 6 +- .../TestProjects/TestFileTests.cs | 6 +- .../TestProjects/TestProjectTests.cs | 6 +- .../TestProjects/TestProjectsInfoTests.cs | 8 +- .../Reporters/BaselineReporterTests.cs | 15 +- .../Reporters/BroadcastReporterTests.cs | 14 +- .../Reporters/ClearTextReporterTests.cs | 11 +- .../Reporters/ClearTextTreeReporterTests.cs | 13 +- .../Reporters/ConsoleDotReporterTests.cs | 8 +- .../Reporters/DashboardReporterTests.cs | 20 +- .../Reporters/Html/HtmlReporterTests.cs | 21 +- .../Html/RealTime/Events/SseEventTest.cs | 5 +- .../Html/RealTime/Events/SseEventTypeTest.cs | 5 +- .../RealTime/RealTimeMutantHandlerTest.cs | 11 +- .../Reporters/Html/RealTime/SseServerTest.cs | 11 +- .../Reporters/Json/JsonReporterTests.cs | 14 +- .../Reporters/Json/MockJsonReport.cs | 4 +- .../Json/MockJsonReportFileComponent.cs | 4 +- .../Reporters/MarkdownSummaryReporterTests.cs | 8 +- .../Progress/ProgressBarReporterTests.cs | 7 +- .../Progress/ProgressReporterTests.cs | 7 +- .../Reporters/ReportTestHelper.cs | 5 +- .../Reporters/ReporterFactoryTests.cs | 15 +- .../Reporters/StatusReporterTests.cs | 15 +- .../Stryker.Core.UnitTest/StringExtensions.cs | 2 +- .../StrykerRunResultTests.cs | 2 +- .../StrykerRunnerTests.cs | 44 +- .../Stryker.Core.UnitTest/TestBase.cs | 2 +- .../Stryker.Core.UnitTest/TestHelper.cs | 4 +- .../TestRunners/CoverageCaptureTests.cs | 5 +- .../TestRunners/CoverageCollectorTests.cs | 19 +- .../TestRunners/VsTestMockingHelper.cs | 158 +-- .../TestRunners/VsTestRunnerPoolTests.cs | 27 +- .../VsTextContextInformationTests.cs | 17 +- .../ToolHelpers/BuildalyzerHelperTests.cs | 4 +- .../Stryker.Core.UnitTest/packages.lock.json | 24 +- .../AzureFileShareBaselineProvider.cs | 13 +- .../Providers/BaselineProviderFactory.cs | 5 +- .../Providers/DashboardBaselineProvider.cs | 16 +- .../Providers/DiskBaselineProvider.cs | 21 +- .../Baseline/Providers/GitInfoProvider.cs | 17 +- .../Baseline/Providers/IGitInfoProvider.cs | 2 +- .../Baseline/Utils/BaselineMutantHelper.cs | 10 +- .../Baseline/Utils/IBaselineMutantHelper.cs | 8 +- .../Stryker.Core/Clients/DashboardClient.cs | 33 +- .../Compiling/CSharpRollbackProcess.cs | 4 +- .../Compiling/CSharpRollbackProcessResult.cs | 2 +- .../Compiling/CompilingProcessResult.cs | 2 +- .../Compiling/CsharpCompilingProcess.cs | 37 +- .../Compiling/FsharpCompilingProcess.cs | 8 +- .../CoverageAnalysis/CoverageAnalyser.cs | 19 +- .../CoverageAnalysis/ICoverageAnalyser.cs | 5 +- .../Stryker.Core/DiffProviders/DiffResult.cs | 2 +- .../DiffProviders/GitDiffProvider.cs | 14 +- .../DiffProviders/IDiffProvider.cs | 4 +- src/Stryker.Core/Stryker.Core/ExitCodes.cs | 2 +- .../{ToolHelpers => Helpers}/MsBuildHelper.cs | 22 +- .../Stryker.Core/Helpers/RoslynHelper.cs | 2 +- .../{ToolHelpers => Helpers}/VsTestHelper.cs | 3 +- .../IAnalyzerResultCSharpExtensions.cs | 5 +- .../Buildalyzer/IAnalyzerResultExtensions.cs | 13 +- .../CrossPlatformAssemblyResolver.cs | 4 +- .../CsharpProjectComponentsBuilder.cs | 31 +- .../EmbeddedResourcesGenerator.cs | 4 +- .../Initialisation/FolderCompositeCache.cs | 2 +- .../FsharpProjectComponentsBuilder.cs | 25 +- .../Initialisation/InitialBuildProcess.cs | 16 +- .../Initialisation/InitialTestProcess.cs | 11 +- .../Initialisation/InitialTestRun.cs | 7 +- .../Initialisation/InitialisationProcess.cs | 46 +- .../Initialisation/InputFileResolver.cs | 117 +- .../Stryker.Core/Initialisation/Language.cs | 2 +- .../Initialisation/NugetRestoreProcess.cs | 6 +- .../ProjectComponentsBuilder.cs | 2 +- .../Initialisation/ProjectMutator.cs | 16 +- .../Initialisation/ProjectOrchestrator.cs | 25 +- .../Initialisation/TimeoutValueCalculator.cs | 5 +- .../InjectedHelpers/CodeInjection.cs | 9 +- .../Instrumentation/BaseEngine.cs | 6 +- .../ConditionalInstrumentationEngine.cs | 2 +- .../DefaultInitializationEngine.cs | 6 +- .../Instrumentation/EndingReturnEngine.cs | 8 +- .../Instrumentation/IInstrumentCode.cs | 2 +- .../IfInstrumentationEngine.cs | 6 +- .../StaticInitializerMarkerEngine.cs | 6 +- .../StaticInstrumentationEngine.cs | 10 +- .../MutantFilters/BaselineMutantFilter.cs | 32 +- .../MutantFilters/BroadcastMutantFilter.cs | 10 +- .../ExcludeFromCodeCoverageFilter.cs | 12 +- .../ExcludeLinqExpressionFilter.cs | 11 +- .../ExcludeMutationMutantFilter.cs | 6 +- .../MutantFilters/FilePatternMutantFilter.cs | 16 +- .../GeneratedCodeFilterExtension.cs | 2 +- .../MutantFilters/IMutantFilter.cs | 7 +- .../MutantFilters/IgnoreBlockMutantFilter.cs | 6 +- .../IgnoredMethodMutantFilter.cs | 26 +- .../MutantFilters/MutantFilter.cs | 2 +- .../MutantFilters/MutantFilterFactory.cs | 19 +- .../MutantFilters/SinceMutantFilter.cs | 24 +- .../Mutants/BaseMutantOrchestrator.cs | 20 +- .../Mutants/CsharpMutantOrchestrator.cs | 15 +- .../AccessorSyntaxOrchestrator.cs | 4 +- ...AnonymousFunctionExpressionOrchestrator.cs | 2 +- .../BaseFunctionOrchestrator.cs | 9 +- .../BaseMethodDeclarationOrchestrator.cs | 8 +- .../BlockOrchestrator.cs | 3 +- .../CsharpNodeOrchestrators/CommentParser.cs | 3 +- .../ConditionalExpressionOrchestrator.cs | 7 +- .../DoNotMutateOrchestrator.cs | 3 +- .../ExpressionBodiedPropertyOrchestrator.cs | 9 +- .../ExpressionSpecificOrchestrator.cs | 7 +- .../INodeOrchestrator.cs | 4 +- .../InvocationExpressionOrchestrator.cs | 8 +- .../LocalDeclarationOrchestrator.cs | 3 +- .../LocalFunctionStatementOrchestrator.cs | 6 +- .../MemberAccessExpressionOrchestrator.cs | 9 +- .../MemberDefinitionOrchestrator.cs | 5 +- .../MutateAtStatementLevelOrchestrator.cs | 5 +- .../NodeSpecificOrchestrator.cs | 7 +- .../StatementSpecificOrchestrator.cs | 2 +- .../StaticConstructorOrchestrator.cs | 4 +- .../StaticFieldDeclarationOrchestrator.cs | 4 +- .../SyntaxNodeOrchestrator.cs | 4 +- .../Mutants/FsharpMutantOrchestrator.cs | 15 +- .../DefaultOrchestrator.cs | 2 +- .../FsharpOrchestrators/IFsharpTypehandle.cs | 2 +- .../IfThenElseOrchestrator.cs | 2 +- .../LetOrUseOrchestrator.cs | 2 +- .../FsharpOrchestrators/LetOrchestrator.cs | 2 +- .../FsharpOrchestrators/MatchOrchestrator.cs | 2 +- .../NestedModuleOrchestrator.cs | 2 +- .../FsharpOrchestrators/OrchestratorFinder.cs | 2 +- .../Stryker.Core/Mutants/Mutant.cs | 5 +- .../Stryker.Core/Mutants/MutantInfo.cs | 2 +- .../Stryker.Core/Mutants/MutantPlacer.cs | 15 +- .../Stryker.Core/Mutants/MutationContext.cs | 6 +- .../Stryker.Core/Mutants/MutationStore.cs | 13 +- .../Stryker.Core/Mutants/TestDescription.cs | 10 +- .../Stryker.Core/Mutants/TestGuidsList.cs | 2 +- .../Stryker.Core/Mutants/TestSet.cs | 2 +- .../Mutants/WrappedGuidsEnumeration.cs | 5 +- .../MutationTest/CsharpMutationProcess.cs | 31 +- .../MutationTest/FsharpMutationProcess.cs | 25 +- .../MutationTest/IMutationProcess.cs | 2 +- .../MutationTest/MutationTestExecutor.cs | 18 +- .../MutationTest/MutationTestInput.cs | 14 +- .../MutationTest/MutationTestProcess.cs | 50 +- .../Mutators/ArrayCreationMutator.cs | 3 +- .../Mutators/AssignmentStatementMutator.cs | 7 +- .../Mutators/BinaryExpressionMutator.cs | 10 +- .../Stryker.Core/Mutators/BlockMutator.cs | 5 +- .../Stryker.Core/Mutators/BooleanMutator.cs | 3 +- .../Stryker.Core/Mutators/CheckedMutator.cs | 3 +- .../Mutators/ConditionalExpressionMutator.cs | 3 +- .../Mutators/InitializerMutator.cs | 5 +- .../Mutators/InterpolatedStringMutator.cs | 3 +- .../Mutators/IsPatternExpressionMutator.cs | 3 +- .../Stryker.Core/Mutators/LinqMutator.cs | 7 +- .../Stryker.Core/Mutators/MathMutator.cs | 3 +- .../Stryker.Core/Mutators/MutatorBase.cs | 3 +- .../Mutators/NegateConditionMutator.cs | 3 +- .../NullCoalescingExpressionMutator.cs | 3 +- .../Mutators/ObjectCreationMutator.cs | 3 +- .../Mutators/PatternMutatorBase.cs | 3 +- .../Mutators/PostfixUnaryMutator.cs | 5 +- .../Mutators/PrefixUnaryMutator.cs | 3 +- .../Stryker.Core/Mutators/RegexMutator.cs | 3 +- .../Stryker.Core/Mutators/StatementMutator.cs | 3 +- .../Mutators/StringEmptyMutator.cs | 3 +- .../Mutators/StringMethodMutator.cs | 3 +- .../Stryker.Core/Mutators/StringMutator.cs | 3 +- .../Mutators/SwitchExpressionMutator.cs | 4 +- .../Csharp/CsharpFileLeaf.cs | 5 +- .../Csharp/CsharpFolderComposite.cs | 5 +- .../ProjectComponents/FolderComposite.cs | 17 +- .../Fsharp/FsharpFileLeaf.cs | 5 +- .../Fsharp/FsharpFolderComposite.cs | 5 +- .../ProjectComponents/ProjectComponent.cs | 8 +- .../ProjectComponentsExtensions.cs | 55 +- .../ProjectComponents/Solution.cs | 11 +- .../SourceProjects/SourceProjectInfo.cs | 17 +- .../TestProjects/TestCase.cs | 3 +- .../TestProjects/TestFile.cs | 11 +- .../TestProjects/TestProject.cs | 5 +- .../TestProjects/TestProjectsInfo.cs | 9 +- .../Reporters/BaselineReporter.cs | 78 +- .../Reporters/BroadcastReporter.cs | 11 +- .../Reporters/ClearTextReporter.cs | 11 +- .../Reporters/ClearTextTreeReporter.cs | 21 +- .../Reporters/ConsoleDotProgressReporter.cs | 10 +- .../Reporters/DashboardReporter.cs | 23 +- .../Reporters/FilteredMutantsLogger.cs | 2 +- .../Reporters/Html/HtmlReporter.cs | 25 +- .../Html/RealTime/Events/SseEvent.cs | 2 +- .../Html/RealTime/Events/SseEventType.cs | 2 +- .../Html/RealTime/IRealTimeMutantHandler.cs | 5 +- .../Reporters/Html/RealTime/ISseServer.cs | 4 +- .../Html/RealTime/RealTimeMutantHandler.cs | 10 +- .../Reporters/Html/RealTime/SseServer.cs | 4 +- .../Stryker.Core/Reporters/Json/JsonReport.cs | 20 +- .../Reporters/Json/JsonReportSerialization.cs | 15 +- .../Reporters/Json/JsonReporter.cs | 16 +- .../Stryker.Core/Reporters/Json/Location.cs | 2 +- .../Stryker.Core/Reporters/Json/Position.cs | 27 +- .../Reporters/Json/SourceFiles/JsonMutant.cs | 3 +- .../Reporters/Json/SourceFiles/SourceFile.cs | 9 +- .../Reporters/Json/TestFiles/JsonTest.cs | 2 +- .../Reporters/Json/TestFiles/JsonTestFile.cs | 16 +- .../Reporters/MarkdownSummaryReporter.cs | 15 +- .../Reporters/Progress/ProgressBar.cs | 2 +- .../Reporters/Progress/ProgressBarReporter.cs | 3 +- .../Reporters/Progress/ProgressReporter.cs | 11 +- .../Reporters/Progress/StopWatchProvider.cs | 2 +- .../Stryker.Core/Reporters/ReporterFactory.cs | 18 +- .../CrossPlatformBrowserOpener.cs | 2 +- .../WebBrowserOpener/IWebbrowserOpener.cs | 2 +- .../Stryker.Core/Stryker.Core.csproj | 2 - .../Stryker.Core/StrykerRunResult.cs | 10 +- .../Stryker.Core/StrykerRunner.cs | 21 +- .../TestRunners/CoverageRunResult.cs | 4 +- .../TestRunners/ITestRunResult.cs | 4 +- .../Stryker.Core/TestRunners/ITestRunner.cs | 10 +- .../TestRunners/TestFrameworks.cs | 2 +- .../Stryker.Core/TestRunners/TestRunResult.cs | 6 +- .../VsTest/DiscoveryEventHandler.cs | 2 +- .../TestRunners/VsTest/RunEventHandler.cs | 4 +- .../VsTest/StrykerVstestHostLauncher.cs | 2 +- .../TestRunners/VsTest/TestRun.cs | 2 +- .../VsTest/VsTestContextInformation.cs | 65 +- .../TestRunners/VsTest/VsTestDescription.cs | 5 +- .../TestRunners/VsTest/VsTestRunner.cs | 73 +- .../TestRunners/VsTest/VsTestRunnerPool.cs | 17 +- .../Stryker.Core/Testing/Buildalyzer.cs | 2 +- .../Stryker.Core/Testing/ProcessExecutor.cs | 3 +- .../Stryker.Core/Testing/ProcessExtensions.cs | 3 +- .../Stryker.Core/Testing/ProcessResult.cs | 2 +- .../ToolHelpers/packages.lock.json | 19 - .../ToolHelpers/vstest.fakeproject.csproj | 10 - .../Stryker.Core/packages.lock.json | 24 +- src/Stryker.Options/FilePattern.cs | 4 + .../Options/InputDefinition.cs | 3 + .../Options/Inputs/BaselineProviderInput.cs | 3 +- .../Options/Inputs/DashboardApiKeyInput.cs | 1 - .../Options/Inputs/DiffIgnoreChangesInput.cs | 7 +- .../Options/Inputs/IgnoreMutationsInput.cs | 2 +- .../Options/Inputs/OpenReportInput.cs | 6 - .../Options/Inputs/ProjectVersionInput.cs | 1 - .../Options/Inputs/ReportersInput.cs | 1 - .../Options/Inputs/TestProjectsInput.cs | 1 + src/Stryker.Options/Options/StrykerInputs.cs | 6 +- src/Stryker.Options/Options/StrykerOptions.cs | 12 +- .../Stryker.Configuration.csproj | 3 +- src/Stryker.Options/packages.lock.json | 789 +++++++++++- .../Attributes/MutatorDescriptionAttribute.cs | 1 + src/Stryker.Utilities/EnumExtension.cs | 3 + src/Stryker.Utilities/FilePathUtils.cs | 2 + .../Helpers/ITypeHandler.cs | 8 +- .../Helpers/RangeHelper.cs | 2 +- .../Helpers/TextSpanHelper.cs | 2 +- .../Helpers/TypeBasedStrategy.cs | 4 +- .../Logging/ApplicationLogging.cs | 0 .../Stryker.Utilities.csproj | 9 +- src/Stryker.Utilities/packages.lock.json | 1136 +++++++++++++++++ 416 files changed, 4960 insertions(+), 2101 deletions(-) create mode 100644 src/Stryker.Abstractions/Options/ReportType.cs rename src/Stryker.Abstractions/{Reporting => Options}/Reporter.cs (85%) create mode 100644 src/Stryker.Abstractions/ProjectComponents/IFolderComposite.cs delete mode 100644 src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs rename src/Stryker.Core/Stryker.Core/{ToolHelpers => Helpers}/MsBuildHelper.cs (88%) rename src/Stryker.Core/Stryker.Core/{ToolHelpers => Helpers}/VsTestHelper.cs (99%) delete mode 100644 src/Stryker.Core/Stryker.Core/ToolHelpers/packages.lock.json delete mode 100644 src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Helpers/ITypeHandler.cs (73%) rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Helpers/RangeHelper.cs (99%) rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Helpers/TextSpanHelper.cs (99%) rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Helpers/TypeBasedStrategy.cs (92%) rename src/{Stryker.Core/Stryker.Core => Stryker.Utilities}/Logging/ApplicationLogging.cs (100%) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d3d015b560..a36f739ea7 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,6 +8,7 @@ true true true + disable true diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index cf894b4532..0d44297888 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -4,6 +4,7 @@ + @@ -46,4 +47,4 @@ - + \ No newline at end of file diff --git a/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs index 84989730a1..6bb58804f5 100644 --- a/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs +++ b/src/Stryker.Abstractions/Baseline/IBaselineProvider.cs @@ -1,3 +1,4 @@ +using System.Threading.Tasks; using Stryker.Abstractions.Reporting; namespace Stryker.Abstractions.Baseline diff --git a/src/Stryker.Abstractions/Exceptions/CompilationException.cs b/src/Stryker.Abstractions/Exceptions/CompilationException.cs index 052b992bcd..bef8119569 100644 --- a/src/Stryker.Abstractions/Exceptions/CompilationException.cs +++ b/src/Stryker.Abstractions/Exceptions/CompilationException.cs @@ -1,3 +1,5 @@ +using System; + namespace Stryker.Abstractions.Exceptions; /// diff --git a/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs index c2546fb5c2..b9a8982c3f 100644 --- a/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs +++ b/src/Stryker.Abstractions/Exceptions/GeneralStrykerException.cs @@ -1,3 +1,4 @@ +using System; using System.Text; namespace Stryker.Abstractions.Exceptions diff --git a/src/Stryker.Abstractions/Exceptions/InputException.cs b/src/Stryker.Abstractions/Exceptions/InputException.cs index 6b1024d58e..e846a5edb4 100644 --- a/src/Stryker.Abstractions/Exceptions/InputException.cs +++ b/src/Stryker.Abstractions/Exceptions/InputException.cs @@ -1,3 +1,4 @@ +using System; using System.Text; namespace Stryker.Abstractions.Exceptions; diff --git a/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs index 90aee2db91..b75aea338a 100644 --- a/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs +++ b/src/Stryker.Abstractions/Exceptions/NoTestProjectsException.cs @@ -1,3 +1,5 @@ +using System; + namespace Stryker.Abstractions.Exceptions; /// diff --git a/src/Stryker.Abstractions/IMutant.cs b/src/Stryker.Abstractions/IMutant.cs index fa0e9a087b..771689f524 100644 --- a/src/Stryker.Abstractions/IMutant.cs +++ b/src/Stryker.Abstractions/IMutant.cs @@ -12,10 +12,10 @@ public interface IMutant : IReadOnlyMutant new ITestGuids CoveringTests { get; set; } new ITestGuids KillingTests { get; set; } new ITestGuids AssessingTests { get; set; } - new bool CountForStats { get; set; } + new bool CountForStats { get; } new bool IsStaticValue { get; set; } - string DisplayName { get; set; } + string DisplayName { get; } bool MustBeTestedInIsolation { get; set; } void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, ITestGuids timedOutTests, bool sessionTimedOut); diff --git a/src/Stryker.Abstractions/IMutator.cs b/src/Stryker.Abstractions/IMutator.cs index a7f012b98e..c80b589236 100644 --- a/src/Stryker.Abstractions/IMutator.cs +++ b/src/Stryker.Abstractions/IMutator.cs @@ -1,6 +1,7 @@ using Microsoft.CodeAnalysis; using Stryker.Abstractions.Options; using Stryker.Abstractions.Mutants; +using System.Collections.Generic; namespace Stryker.Abstractions.Mutators; diff --git a/src/Stryker.Abstractions/IProjectAndTests.cs b/src/Stryker.Abstractions/IProjectAndTests.cs index d1e03124c6..4afb59d1c2 100644 --- a/src/Stryker.Abstractions/IProjectAndTests.cs +++ b/src/Stryker.Abstractions/IProjectAndTests.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Stryker.Abstractions.ProjectComponents; namespace Stryker.Abstractions.Initialisation; diff --git a/src/Stryker.Abstractions/Options/IExclusionPattern.cs b/src/Stryker.Abstractions/Options/IExclusionPattern.cs index ffee021ed5..00795890cb 100644 --- a/src/Stryker.Abstractions/Options/IExclusionPattern.cs +++ b/src/Stryker.Abstractions/Options/IExclusionPattern.cs @@ -1,4 +1,5 @@ +using System.Collections.Generic; using DotNet.Globbing; namespace Stryker.Abstractions.Options; diff --git a/src/Stryker.Abstractions/Options/IStrykerOptions.cs b/src/Stryker.Abstractions/Options/IStrykerOptions.cs index 21ad30162c..804c53ae01 100644 --- a/src/Stryker.Abstractions/Options/IStrykerOptions.cs +++ b/src/Stryker.Abstractions/Options/IStrykerOptions.cs @@ -1,9 +1,9 @@ +using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.CodeAnalysis.CSharp; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Mutators; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporting; namespace Stryker.Abstractions.Options; @@ -36,7 +36,7 @@ public interface IStrykerOptions string ProjectName { get; set; } string ProjectPath { get; init; } string ProjectVersion { get; set; } - IEnumerable Reporters { get; init; } + IEnumerable Reporters { get; init; } string ReportFileName { get; init; } string ReportPath { get; } ReportType? ReportTypeToOpen { get; init; } diff --git a/src/Stryker.Abstractions/Options/ReportType.cs b/src/Stryker.Abstractions/Options/ReportType.cs new file mode 100644 index 0000000000..2c141fb797 --- /dev/null +++ b/src/Stryker.Abstractions/Options/ReportType.cs @@ -0,0 +1,7 @@ +namespace Stryker.Abstractions.Options; + +public enum ReportType +{ + Html, + Dashboard +} diff --git a/src/Stryker.Abstractions/Reporting/Reporter.cs b/src/Stryker.Abstractions/Options/Reporter.cs similarity index 85% rename from src/Stryker.Abstractions/Reporting/Reporter.cs rename to src/Stryker.Abstractions/Options/Reporter.cs index 671e25f185..3503fc3a30 100644 --- a/src/Stryker.Abstractions/Reporting/Reporter.cs +++ b/src/Stryker.Abstractions/Options/Reporter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.Reporters +namespace Stryker.Abstractions.Options { public enum Reporter { diff --git a/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs b/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs index f38d307bfe..a32c198ac3 100644 --- a/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs +++ b/src/Stryker.Abstractions/ProjectComponents/IFilePattern.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; diff --git a/src/Stryker.Abstractions/ProjectComponents/IFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/IFolderComposite.cs new file mode 100644 index 0000000000..1160d62b5c --- /dev/null +++ b/src/Stryker.Abstractions/ProjectComponents/IFolderComposite.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Stryker.Abstractions.ProjectComponents; + +public interface IFolderComposite : IProjectComponent +{ + IEnumerable Children { get; } + void Add(IProjectComponent child); + void AddRange(IEnumerable children); +} diff --git a/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs b/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs index 1f80e9f138..3ad5e66eb4 100644 --- a/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs +++ b/src/Stryker.Abstractions/ProjectComponents/IProjectComponent.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Options; @@ -7,7 +8,7 @@ public interface IReadOnlyProjectComponent { string FullPath { get; } IEnumerable Mutants { get; } - IReadOnlyFolderComposite Parent { get; } + IFolderComposite Parent { get; } string RelativePath { get; set; } public Display DisplayFile { get; set; } public Display DisplayFolder { get; set; } @@ -26,3 +27,11 @@ public interface IReadOnlyProjectComponent } public delegate void Display(IReadOnlyProjectComponent current); + +public interface IProjectComponent : IReadOnlyProjectComponent +{ + new string FullPath { get; set; } + new IEnumerable Mutants { get; set; } + new IFolderComposite Parent { get; set; } + new string RelativePath { get; set; } +} diff --git a/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs b/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs deleted file mode 100644 index bb073d5620..0000000000 --- a/src/Stryker.Abstractions/ProjectComponents/IReadOnlyFolderComposite.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Stryker.Abstractions.ProjectComponents; - -public interface IReadOnlyFolderComposite : IReadOnlyProjectComponent -{ - IEnumerable Children { get; } - void Add(IReadOnlyProjectComponent child); - void AddRange(IEnumerable children); -} diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs b/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs index f9effbb4d6..94bc3f2888 100644 --- a/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs +++ b/src/Stryker.Abstractions/ProjectComponents/ITestFile.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections.Generic; using Microsoft.CodeAnalysis; namespace Stryker.Abstractions.ProjectComponents; @@ -7,7 +9,7 @@ public interface ITestFile string FilePath { get; init; } string Source { get; init; } SyntaxTree SyntaxTree { get; init; } - IEnumerable Tests { get; } + IList Tests { get; } void AddTest(Guid id, string name, SyntaxNode node); bool Equals(object obj); diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs b/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs index 6c6bcbc4af..c5e1f3e6c6 100644 --- a/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs +++ b/src/Stryker.Abstractions/ProjectComponents/ITestProject.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Buildalyzer; namespace Stryker.Abstractions.ProjectComponents; diff --git a/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs b/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs index 5a4faf76a1..9b1d3a5509 100644 --- a/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs +++ b/src/Stryker.Abstractions/ProjectComponents/ITestProjectsInfo.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Buildalyzer; namespace Stryker.Abstractions.ProjectComponents; diff --git a/src/Stryker.Abstractions/Reporting/IJsonMutant.cs b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs index 43a3cca04c..a0bb1e20f3 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonMutant.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonMutant.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + namespace Stryker.Abstractions.Reporting; public interface IJsonMutant diff --git a/src/Stryker.Abstractions/Reporting/IJsonReport.cs b/src/Stryker.Abstractions/Reporting/IJsonReport.cs index fdf1ffd857..40f61c4288 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonReport.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonReport.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + namespace Stryker.Abstractions.Reporting; public interface IJsonReport diff --git a/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs index 0dde428f3b..d348460829 100644 --- a/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs +++ b/src/Stryker.Abstractions/Reporting/IJsonTestFile.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents; namespace Stryker.Abstractions.Reporting; @@ -9,5 +9,5 @@ public interface IJsonTestFile string Source { get; init; } ISet Tests { get; set; } - void AddTestFile(TestFile testFile); + void AddTestFile(ITestFile testFile); } diff --git a/src/Stryker.Abstractions/Reporting/IReporter.cs b/src/Stryker.Abstractions/Reporting/IReporter.cs index f7df907d2d..7ebefc44f1 100644 --- a/src/Stryker.Abstractions/Reporting/IReporter.cs +++ b/src/Stryker.Abstractions/Reporting/IReporter.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Stryker.Abstractions.ProjectComponents; namespace Stryker.Abstractions.Reporting; diff --git a/src/Stryker.Abstractions/Stryker.Abstractions.csproj b/src/Stryker.Abstractions/Stryker.Abstractions.csproj index fcc3b11fbc..32e3ce9345 100644 --- a/src/Stryker.Abstractions/Stryker.Abstractions.csproj +++ b/src/Stryker.Abstractions/Stryker.Abstractions.csproj @@ -1,8 +1,7 @@ - + net8.0 - enable enable diff --git a/src/Stryker.Abstractions/Testing/ITestGuids.cs b/src/Stryker.Abstractions/Testing/ITestGuids.cs index 407eeb48e6..f84b50d1e9 100644 --- a/src/Stryker.Abstractions/Testing/ITestGuids.cs +++ b/src/Stryker.Abstractions/Testing/ITestGuids.cs @@ -1,3 +1,6 @@ +using System; +using System.Collections.Generic; + namespace Stryker.Abstractions.TestRunners { // represents a simple list of test identifier with some properties diff --git a/src/Stryker.Abstractions/packages.lock.json b/src/Stryker.Abstractions/packages.lock.json index f6ff741e01..add0b2a88d 100644 --- a/src/Stryker.Abstractions/packages.lock.json +++ b/src/Stryker.Abstractions/packages.lock.json @@ -83,6 +83,11 @@ "resolved": "7.0.2", "contentHash": "awL4TbcBjWAgmeWbi7G6OkUIr0OEPwZASC09Frd6A84LmKSZWOICgZ9vUTCtwlVtepr6FJNTVHxWR6HopfbwLQ==" }, + "FSharp.Core": { + "type": "Transitive", + "resolved": "7.0.0-beta.22427.1", + "contentHash": "gN1fbULC6ji7IEUCIF4V8yta3Np/8av9H0SfanhACbmsNq9e0He9NOj8Dx0M9xsgYlwviCa0qV2P4B6qAjPOBA==" + }, "Microsoft.Build": { "type": "Transitive", "resolved": "17.0.1", @@ -102,19 +107,20 @@ }, "Microsoft.Build.Framework": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "znFg/TGxwtXISkNMWstaCcl7l2zM4p7vYsXWL9HyJw2w9/F1cpq50H76xksXo/dH2ZKTgc3uG4jkLboL4rZfbg==", + "resolved": "17.1.0", + "contentHash": "7PPEbjuL/lKQ8ftblxwBZKf5alZCA4GDvBTiO3UAVxtRe52a2jL3mc8TpKNiJZzytGz7fKdR5ClDCs7+Uw4hMg==", "dependencies": { + "Microsoft.Win32.Registry": "4.3.0", "System.Security.Permissions": "4.7.0" } }, "Microsoft.Build.Tasks.Core": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "+AGJSLh9RCkgq3G9VpiXBD+GeTmw5VAgYfcOPud4zk1FeMSctAUXVDJzenDIYKe2aawjFHMZUjUfji0Qd5SCBQ==", + "resolved": "17.1.0", + "contentHash": "obCL4Tb2wpc684sCTlS4hriNhI+6MBqlVWOQoajo9zYv/aqAN53YdIZ3Lnw5XszoYCCQexy2sT/MNElMgoSN9g==", "dependencies": { - "Microsoft.Build.Framework": "17.0.1", - "Microsoft.Build.Utilities.Core": "17.0.1", + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", "Microsoft.NET.StringTools": "1.0.0", "Microsoft.Win32.Registry": "4.3.0", "System.CodeDom": "4.4.0", @@ -124,15 +130,15 @@ "System.Security.Cryptography.Pkcs": "4.7.0", "System.Security.Cryptography.Xml": "4.7.0", "System.Security.Permissions": "4.7.0", - "System.Threading.Tasks.Dataflow": "4.9.0" + "System.Threading.Tasks.Dataflow": "6.0.0" } }, "Microsoft.Build.Utilities.Core": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "Ot9B3GOVthAMs903+dyvpcAwimxPkGs7QVGqZ49KjmgIB51VrcJXt/L9l6BpssIRuwf4wOWZOuGTkgFJtmwgVg==", + "resolved": "17.1.0", + "contentHash": "JqhQ4q6L4IyA0Wh3PrDrxHHYMVHyOLIusyC4imAnhcnZiOC4+CwgVRSdo8fLsQmvz0Jab8FFrU1NPZFbDoxRng==", "dependencies": { - "Microsoft.Build.Framework": "17.0.1", + "Microsoft.Build.Framework": "17.1.0", "Microsoft.NET.StringTools": "1.0.0", "Microsoft.Win32.Registry": "4.3.0", "System.Collections.Immutable": "5.0.0", @@ -152,13 +158,8 @@ }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -196,6 +197,16 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "Microsoft.Win32.Registry": { "type": "Transitive", "resolved": "4.3.0", @@ -236,6 +247,118 @@ "Microsoft.Build": "15.3.409" } }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "M2nN92ePS8BgQ2oi6Jj3PlTUzadYSIWLdZrHY1n1ZcW9o4wAQQ6W+aQ2lfq1ysZQfVCgDwY58alUdowrzezztg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" + }, "System.CodeDom": { "type": "Transitive", "resolved": "4.4.0", @@ -251,6 +374,23 @@ "System.Runtime": "4.3.0" } }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, "System.Collections.Immutable": { "type": "Transitive", "resolved": "8.0.0", @@ -265,6 +405,16 @@ "System.Security.Permissions": "4.7.0" } }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", "resolved": "6.0.0", @@ -273,6 +423,60 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.Diagnostics.Process": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "J0wOX07+QASQblsfxmIMFc9Iq7KTXYL3zs2G/Xc704Ylv3NpuVdo6gij6V3PGiptTxqsK0K7CdXenRvKUnkA2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.TraceSource": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VnYp1NxGx8Ww731y2LJ1vpfb/DKVNKEZ8Jsh5SgQTZREL/YpWRArgh9pI8CDLmgHspZmLL697CaLvH85qQpRiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Drawing.Common": { "type": "Transitive", "resolved": "4.7.0", @@ -292,6 +496,30 @@ "System.Runtime": "4.3.0" } }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, "System.IO": { "type": "Transitive", "resolved": "4.3.0", @@ -304,10 +532,206 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Linq.Queryable": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "In1Bmmvl/j52yPu3xgakQSI0YIckPUr870w4K5+Lak3JCCa8hl+my65lABOuKfYs4ugmZy25ScFerC4nz8+b6g==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Requests": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OZNUuAs0kDXUzm7U5NZ1ojVta5YFZmgT2yxBqsQ7Eseq5Ahz88LInGRuNLJ/NP2F8W1q7tse1pKDthj3reF5QA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.WebHeaderCollection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.1", + "contentHash": "qYnDntmrrHXUAhA+v2Kve8onMjJ2ZryQvx7kjGhW88c0IgA9B+q2M8b3l76HFBeotufDbAJfOvLEP32PS4XIKA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Security": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.WebHeaderCollection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "XZrXYG3c7QV/GpWeoaRC02rM6LH2JJetfVYskf35wdC/w2fFDFMphec4gmVH2dkll6abtW14u9Rt96pxd9YH2A==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } }, "System.Reflection": { "type": "Transitive", @@ -321,6 +745,50 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Reflection.Metadata": { "type": "Transitive", "resolved": "8.0.0", @@ -339,6 +807,15 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Resources.Extensions": { "type": "Transitive", "resolved": "4.6.0", @@ -403,6 +880,27 @@ "System.Runtime.Handles": "4.3.0" } }, + "System.Runtime.Loader": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, "System.Security.AccessControl": { "type": "Transitive", "resolved": "4.7.0", @@ -412,11 +910,105 @@ "System.Security.Principal.Windows": "4.7.0" } }, + "System.Security.Claims": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P/+BR/2lnc4PNDHt/TPBAWHVMLMRHsyYZbU1NphW4HIWzCggz8mJbTQQ3MKljFE7LS3WagmVFuBgoLcFzYXlkA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Security.Principal": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Cng": { "type": "Transitive", "resolved": "4.7.0", "contentHash": "4WQjFuypWtxb/bl/YwEE7LYGn4fgpsikFfBU6xwEm4YBYiRAhXAEJ62lILBu2JJSFbClIAntFTGfDZafn8yZTg==" }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Pkcs": { "type": "Transitive", "resolved": "4.7.0", @@ -425,11 +1017,57 @@ "System.Security.Cryptography.Cng": "4.7.0" } }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, "System.Security.Cryptography.ProtectedData": { "type": "Transitive", "resolved": "4.7.0", "contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ==" }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Xml": { "type": "Transitive", "resolved": "4.7.0", @@ -448,6 +1086,14 @@ "System.Windows.Extensions": "4.7.0" } }, + "System.Security.Principal": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I1tkfQlAoMM2URscUtpcRo/hX0jinXx6a/KUtEQoz3owaYwl3qwsO8cbzYVVnjxrzxjHo3nJC+62uolgeGIS9A==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, "System.Security.Principal.Windows": { "type": "Transitive", "resolved": "4.7.0", @@ -482,6 +1128,17 @@ "System.Threading": "4.0.11" } }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, "System.Text.Json": { "type": "Transitive", "resolved": "5.0.2", @@ -489,11 +1146,11 @@ }, "System.Threading": { "type": "Transitive", - "resolved": "4.0.11", - "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", "dependencies": { - "System.Runtime": "4.1.0", - "System.Threading.Tasks": "4.0.11" + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" } }, "System.Threading.Tasks": { @@ -508,8 +1165,40 @@ }, "System.Threading.Tasks.Dataflow": { "type": "Transitive", - "resolved": "4.9.0", - "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" + "resolved": "6.0.0", + "contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA==" + }, + "System.Threading.Tasks.Parallel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbjBNZHf/vQCfcdhzx7knsiygoCKgxL8mZOeocXZn5gWhCdzHIq6bYNKWX0LAJCWYP7bds4yBK8p06YkP0oa0g==", + "dependencies": { + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Thread": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading.ThreadPool": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } }, "System.Windows.Extensions": { "type": "Transitive", @@ -525,7 +1214,46 @@ "contentHash": "6XwIymB/HIHdu4UAWcW+kP1Q4untd4T01leOfPYObKzwoqKOfXTw6GneBpQZ5TLAq9TUc2yS4j6asK2e2NNXog==" }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } + }, + "FSharp.Compiler.Service": { + "type": "CentralTransitive", + "requested": "[42.7.100-preview.22427.1, )", + "resolved": "42.7.100-preview.22427.1", + "contentHash": "YFUc1NLxo/RI1LbJVxpa/bgsHTGsvLWakJkDeoR5CnBdgw6jDte9TElrWy7SKr2q5YLjuUFWtQ42TgEVn1hScw==", + "dependencies": { + "FSharp.Core": "[7.0.0-beta.22427.1]", + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Tasks.Core": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", + "System.Buffers": "4.5.1", + "System.Collections.Immutable": "5.0.0", + "System.Diagnostics.Process": "4.3.0", + "System.Diagnostics.TraceSource": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Linq.Queryable": "4.3.0", + "System.Memory": "4.5.5", + "System.Net.Requests": "4.3.0", + "System.Net.Security": "4.3.1", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Metadata": "5.0.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Loader": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Threading.Tasks.Parallel": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0" + } }, "Microsoft.CodeAnalysis.Analyzers": { "type": "CentralTransitive", @@ -555,6 +1283,15 @@ "System.Diagnostics.DiagnosticSource": "6.0.0" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "NuGet.Frameworks": { "type": "CentralTransitive", "requested": "[6.10.1, )", diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs index 245c7c024c..73f6485957 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/FileConfigReaderTests.cs @@ -4,9 +4,9 @@ using Moq; using Shouldly; using Stryker.Abstractions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Options; -using Stryker.Abstractions.Reporters; +using Stryker.Core; +using Stryker.Core.Initialisation; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs index 413729dcf9..7b6416200c 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLIInitCommandTests.cs @@ -8,9 +8,9 @@ using Spectre.Console.Testing; using Stryker.CLI.Clients; using Stryker.CLI.Logging; -using Stryker.Abstractions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core; namespace Stryker.CLI.UnitTest; diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs index 57b69feb60..fad8a30bc6 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs @@ -12,12 +12,11 @@ using Stryker.CLI.Clients; using Stryker.CLI.Logging; using Stryker.Abstractions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; +using Stryker.Core.Initialisation; +using Stryker.Core; namespace Stryker.CLI.UnitTest { diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json index 1e2f19d6f0..72c2267545 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json @@ -248,14 +248,6 @@ "resolved": "8.0.0", "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", "resolved": "8.0.0", @@ -1644,7 +1636,12 @@ } }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", @@ -1780,6 +1777,15 @@ "Microsoft.Extensions.Options": "8.0.0" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "Microsoft.TestPlatform": { "type": "CentralTransitive", "requested": "[17.10.0, )", diff --git a/src/Stryker.CLI/Stryker.CLI/Program.cs b/src/Stryker.CLI/Stryker.CLI/Program.cs index 28849c2701..89bf2329f2 100644 --- a/src/Stryker.CLI/Stryker.CLI/Program.cs +++ b/src/Stryker.CLI/Stryker.CLI/Program.cs @@ -1,6 +1,6 @@ using Spectre.Console; -using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; +using Stryker.Core; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs index 7fefaaa8f2..1372aca726 100644 --- a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs +++ b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs @@ -6,11 +6,11 @@ using Microsoft.Extensions.Logging; using NuGet.Versioning; using Spectre.Console; -using Stryker.Abstractions; using Stryker.Abstractions.Options; using Stryker.CLI.Clients; using Stryker.CLI.CommandLineConfig; using Stryker.CLI.Logging; +using Stryker.Core; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/packages.lock.json b/src/Stryker.CLI/Stryker.CLI/packages.lock.json index e1e9b57284..df0140c5eb 100644 --- a/src/Stryker.CLI/Stryker.CLI/packages.lock.json +++ b/src/Stryker.CLI/Stryker.CLI/packages.lock.json @@ -164,14 +164,6 @@ "resolved": "8.0.0", "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", "resolved": "8.0.0", @@ -1465,7 +1457,12 @@ } }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", @@ -1592,6 +1589,15 @@ "Microsoft.Extensions.Options": "8.0.0" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "Microsoft.TestPlatform": { "type": "CentralTransitive", "requested": "[17.10.0, )", diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs index 889e7b72a3..d8f7a16e53 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/AssertExtensions.cs @@ -5,7 +5,7 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { /// /// Making asserting syntax trees more easy @@ -17,7 +17,7 @@ public static class AssertionExtensions /// /// Resulted code /// Expected code - public static void ShouldBeSemantically(this string actual, string expected) => ShouldBeSemantically(CSharpSyntaxTree.ParseText(actual), CSharpSyntaxTree.ParseText(expected)); + public static void ShouldBeSemantically(this string actual, string expected) => CSharpSyntaxTree.ParseText(actual).ShouldBeSemantically(CSharpSyntaxTree.ParseText(expected)); /// /// Compares two syntax trees and asserts equality @@ -51,7 +51,7 @@ public static void ShouldBeSemantically(this SyntaxTree actual, SyntaxTree expec public static void ShouldBeWithNewlineReplace(this string actual, string expected) { - string replaced = expected.Replace("\r\n", Environment.NewLine, StringComparison.InvariantCultureIgnoreCase); + var replaced = expected.Replace("\r\n", Environment.NewLine, StringComparison.InvariantCultureIgnoreCase); actual.ShouldBe(replaced); } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs index 7f16668189..36a84de7bb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs @@ -6,16 +6,16 @@ using Azure.Storage.Files.Shares; using Azure.Storage.Files.Shares.Models; using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.UnitTest.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.UnitTest.Reporters; -namespace Stryker.Abstractions.UnitTest.Baseline.Providers +namespace Stryker.Core.UnitTest.Baseline.Providers { [TestClass] public class AzureFileShareBaselineProviderTests : TestBase @@ -200,7 +200,7 @@ public async Task Save_Report(int folders, int files) var fileLength = Encoding.UTF8.GetBytes(report.ToJson()).Length; var fullChunks = (int)Math.Floor((double)fileLength / chunkSize); - var lastChunkSize = fileLength - (fullChunks * chunkSize); + var lastChunkSize = fileLength - fullChunks * chunkSize; var fileClient = Mock.Of(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs index bf923f34fe..c15dcab4f2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DashboardBaselineProviderTests.cs @@ -1,14 +1,14 @@ using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.Clients; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.UnitTest.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Clients; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.UnitTest.Reporters; -namespace Stryker.Abstractions.UnitTest.Baseline.Providers +namespace Stryker.Core.UnitTest.Baseline.Providers { [TestClass] public class DashboardBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs index c7e669db35..78b84f4061 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs @@ -1,16 +1,16 @@ using System.IO.Abstractions.TestingHelpers; using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.UnitTest.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.UnitTest.Reporters; using Stryker.Utilities; -namespace Stryker.Abstractions.UnitTest.Baseline.Providers +namespace Stryker.Core.UnitTest.Baseline.Providers { [TestClass] public class DiskBaselineProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs index 028000ade8..2d57774b70 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Utils/BaselineMutantHelperTests.cs @@ -1,11 +1,11 @@ using System.IO; -using Shouldly; -using Stryker.Abstractions.Baseline.Utils; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Json.SourceFiles; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.Baseline.Utils; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; -namespace Stryker.Abstractions.UnitTest.Baseline.Utils +namespace Stryker.Core.UnitTest.Baseline.Utils { [TestClass] public class BaselineMutantHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs index 8c8212df60..acd2a63c67 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Clients/DashboardClientsTest.cs @@ -9,17 +9,18 @@ using Moq; using Moq.Protected; using Shouldly; -using Stryker.Abstractions.Clients; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Json.SourceFiles; -using Stryker.Abstractions.UnitTest.Reporters.Json; -using Stryker.Abstractions.Mutants; - -namespace Stryker.Abstractions.UnitTest.Clients +using Stryker.Core.Clients; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.UnitTest.Reporters.Json; + +namespace Stryker.Core.UnitTest.Clients { [TestClass] public class DashboardClientsTest : TestBase @@ -30,7 +31,7 @@ public class DashboardClientsTest : TestBase DashboardApiKey = "Access_Token", ProjectName = "github.com/JohnDoe/project", ProjectVersion = "test/version", - Reporters = new [] { Reporter.Dashboard }, + Reporters = new[] { Reporter.Dashboard }, }; private static readonly StrykerOptions OptionsWithModule = new() diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs index db2b96364c..d12d02def8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpCompilingProcessTests.cs @@ -8,24 +8,22 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Compiling; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.TestRunners; using Stryker.Abstractions.Options; +using Stryker.Core.Compiling; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.UnitTest.Compiling; +namespace Stryker.Core.UnitTest.Compiling; [TestClass] public class CSharpCompilingProcessTests : TestBase @@ -103,7 +101,7 @@ public int Subtract(int first, int second) { "TargetFileName", "TargetFileName.dll"}, }, // add a reference to system so the example code can compile - references: new[] { typeof(object).Assembly.Location, $"Texte={typeof(System.Text.StringBuilder).Assembly.Location}" } + references: new[] { typeof(object).Assembly.Location, $"Texte={typeof(StringBuilder).Assembly.Location}" } ).Object } }; @@ -154,7 +152,7 @@ public int Subtract(string first, string second) var rollbackProcessMock = new Mock(MockBehavior.Strict); rollbackProcessMock.Setup(x => x.Start(It.IsAny(), It.IsAny>(), It.IsAny(), false)) .Returns((CSharpCompilation compilation, ImmutableArray diagnostics, bool _, bool _) => - new (compilation, null)); + new(compilation, null)); var target = new CsharpCompilingProcess(input, rollbackProcessMock.Object, new StrykerOptions()); @@ -460,7 +458,7 @@ void TestMethod(){ projectContentsMutants.Count(t => t.ResultStatus == MutantStatus.Pending).ShouldBe(3); } - private static IEnumerable MutateAndCompileSource(string sourceFile) + private static IEnumerable MutateAndCompileSource(string sourceFile) { var filesystemRoot = Path.GetPathRoot(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); @@ -518,7 +516,7 @@ private static IEnumerable MutateAndCompileSource(string sourceFile) ).Object), } } - }, + }, TestRunner = new Mock(MockBehavior.Default).Object }; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs index 4f550b8ce1..b20835c7fc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Compiling/CSharpRollbackProcessTests.cs @@ -1,5 +1,4 @@ using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; @@ -12,16 +11,16 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.Compiling; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.InjectedHelpers; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Core.Compiling; +using Stryker.Core.InjectedHelpers; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.SourceProjects; -namespace Stryker.Abstractions.UnitTest.Compiling +namespace Stryker.Core.UnitTest.Compiling { [TestClass] public class CSharpRollbackProcessTests : TestBase @@ -113,7 +112,7 @@ public void SomeLinq() }; var codeInjection = new CodeInjection(); var placer = new MutantPlacer(codeInjection); - var mutator = new CsharpMutantOrchestrator( placer, options: options); + var mutator = new CsharpMutantOrchestrator(placer, options: options); var helpers = new List(); foreach (var (name, code) in codeInjection.MutantHelpers) { @@ -197,7 +196,7 @@ private void RefreshAccountNumber() }; var codeInjection = new CodeInjection(); var placer = new MutantPlacer(codeInjection); - var mutator = new CsharpMutantOrchestrator( placer, options: options); + var mutator = new CsharpMutantOrchestrator(placer, options: options); var helpers = new List(); foreach (var (name, code) in codeInjection.MutantHelpers) { @@ -241,7 +240,7 @@ private void RefreshAccountNumber() var target = new CsharpCompilingProcess(input, rollbackProcess, options); using var ms = new MemoryStream(); - + Action test = () => target.Compile(helpers, ms, null); test.ShouldThrow(); } @@ -848,7 +847,7 @@ public void Break() public void RollbackProcess_ShouldOnlyRaiseExceptionOnFinalAttempt() { - var syntaxTree = CSharpSyntaxTree.ParseText(@" + var syntaxTree = CSharpSyntaxTree.ParseText(@" using System; namespace ExampleProject diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs index c4aca92676..cdb1cf36cf 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DashboardCompare/GitInfoProviderTests.cs @@ -5,11 +5,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.DashboardCompare +namespace Stryker.Core.UnitTest.DashboardCompare { [TestClass] @@ -233,7 +234,7 @@ public void DetermineCommitThrowsStrykerInputException() public void LooksUpCommitWhenGitSourceIsFortyCharacters() { // Arrange - string sha = "5a6940131b31f6958007ecbc0c51cbc35177f4e0"; + var sha = "5a6940131b31f6958007ecbc0c51cbc35177f4e0"; var options = new StrykerOptions() { Since = true, @@ -260,7 +261,7 @@ public void LooksUpCommitWhenGitSourceIsFortyCharacters() var target = new GitInfoProvider(options, repositoryMock.Object); // Act - Commit result = target.DetermineCommit(); + var result = target.DetermineCommit(); // Assert result.ShouldNotBeNull(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs index aa621d6644..bbbbfc7611 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/DiffProviders/GitDiffProviderTests.cs @@ -5,14 +5,14 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.DiffProviders; -using Stryker.Abstractions.Exceptions; using Stryker.Abstractions; +using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.DiffProviders; using Stryker.Utilities; -namespace Stryker.Abstractions.UnitTest.DiffProviders +namespace Stryker.Core.UnitTest.DiffProviders { [TestClass] public class GitDiffProviderTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs index 6ea8891c47..26617ca1aa 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ExclusionPatternTests.cs @@ -3,7 +3,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { [TestClass] public class ExclusionPatternTests : TestBase @@ -31,7 +31,7 @@ public void ExclusionPattern_MutantSpans() var s1 = new ExclusionPattern(@"src/Person.cs{10..100}"); var s2 = new ExclusionPattern(@"src/Person.cs"); - s1.MutantSpans.ShouldBe(new [] { (10, 100)}); + s1.MutantSpans.ShouldBe(new[] { (10, 100) }); s2.MutantSpans.ShouldBeEmpty(); } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs index 79accb53dc..61a7cbef47 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/FilePatternTests.cs @@ -4,9 +4,10 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; +using Stryker.Abstractions; using Stryker.Utilities; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { [TestClass] public class FilePatternTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs index 20a7a65de8..d24d76f6f8 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Fsharp/FsharpFileDetectionTests.cs @@ -7,11 +7,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions; using Stryker.Utilities; +using Stryker.Core.Initialisation; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Fsharp +namespace Stryker.Core.UnitTest.Fsharp { [TestClass] public class FsharpFileDetectionTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs index 88117bf7dc..ad86c7bfe4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/RangeHelperTests.cs @@ -1,13 +1,12 @@ using System; using System.Linq; using FSharp.Compiler.Text; -using Shouldly; -using Stryker.Abstractions.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Utilities.Helpers; using Range = FSharp.Compiler.Text.Range; - -namespace Stryker.Abstractions.UnitTest.Helpers +namespace Stryker.Core.UnitTest.Helpers { [TestClass] public class RangeHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs index c33629fe97..70a2f6656e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Helpers/TextSpanHelperTests.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.Text; -using Shouldly; -using Stryker.Abstractions.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Utilities.Helpers; -namespace Stryker.Abstractions.UnitTest.Helpers +namespace Stryker.Core.UnitTest.Helpers { [TestClass] public class TextSpanHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs index 93d4ff1c15..5ad3185857 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/IgnoreIfAttribute.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest; +namespace Stryker.Core.UnitTest; /// /// An extension to the [Ignore] attribute. Instead of using test lists / test categories to conditionally diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs index 1cd1edb424..d66268ccfb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs @@ -7,10 +7,11 @@ using Buildalyzer.Construction; using Buildalyzer.Environment; using Moq; -using Stryker.Abstractions.Initialisation.Buildalyzer; -using Stryker.Abstractions.Testing; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.Testing; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Initialisation; +namespace Stryker.Core.UnitTest.Initialisation; public class BuildAnalyzerTestsBase : TestBase { @@ -40,7 +41,7 @@ protected Mock SourceProjectAnalyzerMock(string csprojPathName IEnumerable projectReferences = null, string framework = DefaultFramework, Func success = null) { var properties = GetSourceProjectDefaultProperties(); - projectReferences??= new List(); + projectReferences ??= new List(); return BuildProjectAnalyzerMock(csprojPathName, sourceFiles, properties, projectReferences, framework, success); } @@ -63,8 +64,8 @@ public static Dictionary GetSourceProjectDefaultProperties() /// the test project references the production code project and contains no source file protected Mock TestProjectAnalyzerMock(string testCsprojPathName, string csProj, string framework = DefaultFramework, bool success = true) { - var properties = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; - var projectReferences = string.IsNullOrEmpty(csProj) ? [] : _projectCache[csProj].ProjectReferences.Append(csProj).ToList(); + var properties = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; + var projectReferences = string.IsNullOrEmpty(csProj) ? [] : _projectCache[csProj].ProjectReferences.Append(csProj).ToList(); return BuildProjectAnalyzerMock(testCsprojPathName, [], properties, projectReferences, framework, () => success); } @@ -92,8 +93,8 @@ internal Mock BuildProjectAnalyzerMock(string csprojPathName, var sourceProjectAnalyzerMock = new Mock(MockBehavior.Strict); var sourceProjectAnalyzerResultMock = new Mock(MockBehavior.Strict); var sourceProjectFileMock = new Mock(MockBehavior.Strict); - success??= () => true; - projectReferences??= []; + success ??= () => true; + projectReferences ??= []; // create dummy project and source files FileSystem.AddFile(csprojPathName, new MockFileData("")); foreach (var file in sourceFiles) @@ -106,12 +107,12 @@ internal Mock BuildProjectAnalyzerMock(string csprojPathName, FileSystem.AddDirectory(projectUnderTestBin); var projectBin = - FileSystem.Path.Combine(projectUnderTestBin, FileSystem.Path.GetFileNameWithoutExtension(csprojPathName)+".dll"); + FileSystem.Path.Combine(projectUnderTestBin, FileSystem.Path.GetFileNameWithoutExtension(csprojPathName) + ".dll"); FileSystem.AddFile(FileSystem.Path.Combine(projectUnderTestBin, projectBin), new MockFileData("")); sourceProjectAnalyzerResultMock.Setup(x => x.ProjectReferences).Returns(projectReferences); sourceProjectAnalyzerResultMock.Setup(x => x.References).Returns(projectReferences. - Where (_projectCache.ContainsKey). - Select( iar => _projectCache[iar].GetAssemblyPath()).Union(rawReferences).ToArray()); + Where(_projectCache.ContainsKey). + Select(iar => _projectCache[iar].GetAssemblyPath()).Union(rawReferences).ToArray()); sourceProjectAnalyzerResultMock.Setup(x => x.SourceFiles).Returns(sourceFiles); sourceProjectAnalyzerResultMock.Setup(x => x.PreprocessorSymbols).Returns(["NET"]); properties.Add("TargetRefPath", projectBin); @@ -136,15 +137,15 @@ internal Mock BuildProjectAnalyzerMock(string csprojPathName, sourceProjectFileMock.Setup(x => x.Path).Returns(csprojPathName); sourceProjectFileMock.Setup(x => x.Name).Returns(FileSystem.Path.GetFileName(csprojPathName)); - sourceProjectFileMock.Setup(x=> x.TargetFrameworks).Returns([framework]); + sourceProjectFileMock.Setup(x => x.TargetFrameworks).Returns([framework]); return sourceProjectAnalyzerMock; } internal static IAnalyzerResults BuildAnalyzerResultsMock(IAnalyzerResult sourceProjectAnalyzerResult) { - IEnumerable analyzerResults = [ sourceProjectAnalyzerResult]; + IEnumerable analyzerResults = [sourceProjectAnalyzerResult]; var sourceProjectAnalyzerResultsMock = new Mock(MockBehavior.Strict); - sourceProjectAnalyzerResultsMock.Setup(x => x.OverallSuccess).Returns(() => analyzerResults.All(r=> r.Succeeded)); + sourceProjectAnalyzerResultsMock.Setup(x => x.OverallSuccess).Returns(() => analyzerResults.All(r => r.Succeeded)); sourceProjectAnalyzerResultsMock.Setup(x => x.Results).Returns(analyzerResults); sourceProjectAnalyzerResultsMock.Setup(x => x.Count).Returns(analyzerResults.Count()); sourceProjectAnalyzerResultsMock.Setup(x => x.GetEnumerator()).Returns(() => analyzerResults.GetEnumerator()); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs index dd5a98557c..6ef523b27d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/Buildalyzer/AnalyzerResultExtensionsTests.cs @@ -3,10 +3,10 @@ using Microsoft.CodeAnalysis; using Moq; using Shouldly; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Initialisation.Buildalyzer; -namespace Stryker.Abstractions.UnitTest.Initialisation.Buildalyzer; +namespace Stryker.Core.UnitTest.Initialisation.Buildalyzer; [TestClass] public class AnalyzerResultExtensionsTests @@ -21,7 +21,7 @@ public void GetDiagnosticOptions_WithNoWarn() .Returns(new Dictionary { { "NoWarn", "EXTEXP0001;EXTEXP0002" } }); // Act - var diagOptions = IAnalyzerResultExtensions.GetDiagnosticOptions(analyzerResult); + var diagOptions = analyzerResult.GetDiagnosticOptions(); // Assert diagOptions.ShouldContain(new KeyValuePair("EXTEXP0001", ReportDiagnostic.Suppress)); @@ -38,7 +38,7 @@ public void GetDiagnosticOptions_WithWarningsAsErrors() .Returns(new Dictionary { { "WarningsAsErrors", "EXTEXP0001;EXTEXP0002" } }); // Act - var diagOptions = IAnalyzerResultExtensions.GetDiagnosticOptions(analyzerResult); + var diagOptions = analyzerResult.GetDiagnosticOptions(); // Assert diagOptions.ShouldContain(new KeyValuePair("EXTEXP0001", ReportDiagnostic.Error)); @@ -55,7 +55,7 @@ public void GetDiagnosticOptions_WithWarningsNotAsErrors() .Returns(new Dictionary { { "WarningsNotAsErrors", "EXTEXP0001;EXTEXP0002" } }); // Act - var diagOptions = IAnalyzerResultExtensions.GetDiagnosticOptions(analyzerResult); + var diagOptions = analyzerResult.GetDiagnosticOptions(); // Assert diagOptions.ShouldContain(new KeyValuePair("EXTEXP0001", ReportDiagnostic.Warn)); @@ -73,7 +73,7 @@ public void GetDiagnosticOptions_DealWithConflicts() { "NoWarn", "EXTEXP0001" }}); // Act - var diagOptions = IAnalyzerResultExtensions.GetDiagnosticOptions(analyzerResult); + var diagOptions = analyzerResult.GetDiagnosticOptions(); // Assert diagOptions.ShouldContain(new KeyValuePair("EXTEXP0001", ReportDiagnostic.Suppress)); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs index b2f38784fd..11c363e1ff 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialBuildProcessTests.cs @@ -1,14 +1,14 @@ using System; using System.Collections.Generic; using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Testing; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Initialisation; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.UnitTest.Initialisation; +namespace Stryker.Core.UnitTest.Initialisation; [TestClass] public class InitialBuildProcessTests : TestBase @@ -60,7 +60,7 @@ public void InitialBuildProcess_WithPathAsBuildCommand_TriesWithMsBuildIfDotnetF @"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" + "\" " + Path.GetFileName(_cProjectsExampleCsproj) + "\""); processMock.Verify(x => x.Start(It.IsAny(), It.Is(app => app.Contains("dotnet")), It.IsAny(), It.IsAny>>(), 0), Times.Once()); - processMock.Verify(x =>x.Start(It.IsAny(), It.Is(app => app.Contains("MSBuild.exe")), It.IsAny(), It.IsAny>>(), 0), Times.Exactly(2)); + processMock.Verify(x => x.Start(It.IsAny(), It.Is(app => app.Contains("MSBuild.exe")), It.IsAny(), It.IsAny>>(), 0), Times.Exactly(2)); } [TestMethod] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs index 304be75d73..8aaa181349 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialTestProcessTests.cs @@ -5,14 +5,16 @@ using Moq; using Shouldly; using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.TestRunners; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners.VsTest; +using Stryker.Core.Initialisation; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Initialisation +namespace Stryker.Core.UnitTest.Initialisation { [TestClass] public class InitialTestProcessTests : TestBase @@ -28,7 +30,7 @@ public InitialTestProcessTests() AdditionalTimeout = 0 }; } - + [TestMethod] public void InitialTestProcess_ShouldNotThrowIfAFewTestsFail() { @@ -44,7 +46,7 @@ public void InitialTestProcess_ShouldNotThrowIfAFewTestsFail() } var ranTests = new TestGuidsList(testList); var failedTests = new TestGuidsList(test1); - testRunnerMock.Setup(x => x.InitialTest(It.IsAny())).Returns(new TestRunResult(Enumerable.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero) ); + testRunnerMock.Setup(x => x.InitialTest(It.IsAny())).Returns(new TestRunResult(Enumerable.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero)); testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(new TestSet()); @@ -60,7 +62,7 @@ public void InitialTestProcess_ShouldCalculateTestTimeout() testRunnerMock.Setup(x => x.InitialTest(It.IsAny())).Callback(() => Thread.Sleep(10)).Returns(new TestRunResult(true)); testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(new TestSet()); - var result = _target.InitialTest( _options, null, testRunnerMock.Object); + var result = _target.InitialTest(_options, null, testRunnerMock.Object); result.TimeoutValueCalculator.DefaultTimeout.ShouldBeInRange(1, 200, "This test contains a Thread.Sleep to simulate time passing as this test is testing that a stopwatch is used correctly to measure time.\n If this test is failing for unclear reasons, perhaps the computer running the test is too slow causing the time estimation to be off"); } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs index 868d67adef..1deae0713a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InitialisationProcessTests.cs @@ -4,21 +4,22 @@ using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Abstractions.TestRunners; - -namespace Stryker.Abstractions.UnitTest.Initialisation +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; + +namespace Stryker.Core.UnitTest.Initialisation { [TestClass] public class InitialisationProcessTests : TestBase @@ -43,11 +44,12 @@ public void InitialisationProcess_ShouldCallNeededResolvers() } }); - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); var target = new InitialisationProcess(inputFileResolverMock.Object); var options = new StrykerOptions - { ProjectName = "TheProjectName", + { + ProjectName = "TheProjectName", ProjectVersion = "TheProjectVersion" }; @@ -74,11 +76,11 @@ public void InitialisationProcess_ShouldThrowOnFailedInitialTestRun() TestProjectsInfo = new TestProjectsInfo(new MockFileSystem()) }}); - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); - testRunnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(new TestSet()); - testRunnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(true); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())).Throws(new InputException("")); // failing test + testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(new TestSet()); + testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())).Throws(new InputException("")); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, @@ -111,7 +113,7 @@ public void InitialisationProcess_ShouldThrowIfHalfTestsAreFailing() inputFileResolverMock.Setup(x => x.ResolveSourceProjectInfos(It.IsAny())).Returns( new[] { new SourceProjectInfo { AnalyzerResult = TestHelper.SetupProjectAnalyzerResult(references: Array.Empty()).Object, TestProjectsInfo = new TestProjectsInfo(new MockFileSystem()) } }); - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(fileSystemMock); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(fileSystemMock); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); var failedTest = Guid.NewGuid(); var ranTests = new TestGuidsList(failedTest, Guid.NewGuid()); @@ -123,9 +125,9 @@ public void InitialisationProcess_ShouldThrowIfHalfTestsAreFailing() testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(testSet); var failedTests = new TestGuidsList(failedTest); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())).Returns( + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())).Returns( new InitialTestRun( - new TestRunResult(Array.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(),TimeSpan.Zero), new TimeoutValueCalculator(0) )); // failing test + new TestRunResult(Array.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), new TimeoutValueCalculator(0))); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, @@ -157,13 +159,13 @@ public void InitialisationProcess_ShouldThrowOnTestTestIfAskedFor(bool breakOnIn inputFileResolverMock.Setup(x => x.ResolveSourceProjectInfos(It.IsAny())).Returns( - new [] {new SourceProjectInfo { + new[] {new SourceProjectInfo { AnalyzerResult = TestHelper.SetupProjectAnalyzerResult( references: Array.Empty()).Object, TestProjectsInfo = new TestProjectsInfo(new MockFileSystem()) }}); - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); var failedTest = Guid.NewGuid(); var ranTests = new TestGuidsList(failedTest, Guid.NewGuid(), Guid.NewGuid()); @@ -172,11 +174,11 @@ public void InitialisationProcess_ShouldThrowOnTestTestIfAskedFor(bool breakOnIn { testSet.RegisterTest(new TestDescription(ranTest, "test", "test.cpp")); } - testRunnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(true); - testRunnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(testSet); + testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); + testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(testSet); var failedTests = new TestGuidsList(failedTest); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())).Returns( new InitialTestRun( - new TestRunResult(Array.Empty() ,ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), new TimeoutValueCalculator(0) )); // failing test + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())).Returns(new InitialTestRun( + new TestRunResult(Array.Empty(), ranTests, failedTests, TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), new TimeoutValueCalculator(0))); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, @@ -217,13 +219,13 @@ public void InitialisationProcess_ShouldRunTestSession() new[] { new SourceProjectInfo() { AnalyzerResult = TestHelper.SetupProjectAnalyzerResult(references: Array.Empty()).Object, TestProjectsInfo = new TestProjectsInfo(new MockFileSystem()) } }); - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); var testSet = new TestSet(); testSet.RegisterTest(new TestDescription(Guid.Empty, "test", "test.cs")); - testRunnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(true); - testRunnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(testSet); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())) + testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); + testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(testSet); + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())) .Returns(new InitialTestRun(new TestRunResult(true), null)); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, @@ -238,7 +240,7 @@ public void InitialisationProcess_ShouldRunTestSession() var projects = target.GetMutableProjectsInfo(options); target.BuildProjects(options, projects); var input = target.GetMutationTestInputs(options, projects, testRunnerMock.Object).First(); - + inputFileResolverMock.Verify(x => x.ResolveSourceProjectInfos(It.IsAny()), Times.Once); initialTestProcessMock.Verify(x => x.InitialTest(It.IsAny(), It.IsAny(), testRunnerMock.Object), Times.Once); } @@ -265,7 +267,7 @@ public void InitialisationProcess_ShouldThrowOnWhenNoTestDetected(string library targetFramework: "netcoreapp2.1", references: [libraryName]).Object; - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); inputFileResolverMock.Setup(x => x.ResolveSourceProjectInfos(It.IsAny())).Returns( new[] {new SourceProjectInfo @@ -276,10 +278,10 @@ public void InitialisationProcess_ShouldThrowOnWhenNoTestDetected(string library }}); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); - testRunnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(false); - testRunnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(new TestSet()); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())) - .Returns(new InitialTestRun(new TestRunResult(Array.Empty(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), null)); // failing test + testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(false); + testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(new TestSet()); + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(new InitialTestRun(new TestRunResult(Array.Empty(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), null)); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, @@ -316,7 +318,7 @@ public void InitialisationProcess_ShouldThrowOnWhenNoTestDetectedAndCorrectDepen { ["xunit.core"] = new ReadOnlyDictionary(new Dictionary()), ["xunit.runner.visualstudio"] = new ReadOnlyDictionary(new Dictionary()) })); var testProjectAnalyzerResult = testProjectAnalyzerResultMock.Object; - inputFileResolverMock.SetupGet( x => x.FileSystem).Returns(new FileSystem()); + inputFileResolverMock.SetupGet(x => x.FileSystem).Returns(new FileSystem()); inputFileResolverMock.Setup(x => x.ResolveSourceProjectInfos(It.IsAny())).Returns( new[] {new SourceProjectInfo @@ -327,10 +329,10 @@ public void InitialisationProcess_ShouldThrowOnWhenNoTestDetectedAndCorrectDepen }}); initialBuildProcessMock.Setup(x => x.InitialBuild(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), null)); - testRunnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(false); - testRunnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(new TestSet()); - initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(),It.IsAny())) - .Returns(new InitialTestRun(new TestRunResult(Array.Empty(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), null)); // failing test + testRunnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(false); + testRunnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(new TestSet()); + initialTestProcessMock.Setup(x => x.InitialTest(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(new InitialTestRun(new TestRunResult(Array.Empty(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), string.Empty, Enumerable.Empty(), TimeSpan.Zero), null)); // failing test var target = new InitialisationProcess(inputFileResolverMock.Object, initialBuildProcessMock.Object, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs index bf8958b05b..0b077096c6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/InputFileResolverTests.cs @@ -12,16 +12,17 @@ using Moq; using NuGet.Frameworks; using Shouldly; -using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using static NuGet.Frameworks.FrameworkConstants; +using Stryker.Abstractions.Exceptions; +using Stryker.Core.Initialisation; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.ProjectComponents; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; using Stryker.Utilities; +using static NuGet.Frameworks.FrameworkConstants; -namespace Stryker.Abstractions.UnitTest.Initialisation; +namespace Stryker.Core.UnitTest.Initialisation; [TestClass] public class InputFileResolverTests : BuildAnalyzerTestsBase @@ -75,7 +76,7 @@ public InputFileResolverTests() "; _nugetMock = new Mock(); - _nugetMock.Setup( x => x.RestorePackages(It.IsAny(), It.IsAny())); + _nugetMock.Setup(x => x.RestorePackages(It.IsAny(), It.IsAny())); } @@ -135,7 +136,7 @@ public void InitializeShouldFindFilesRecursively() { Path.Combine(_sourcePath, "node_modules", "Some package"), new MockFileData("bla") }, // node_modules should be excluded }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -169,7 +170,7 @@ public void InitializeShouldUseBuildalyzerResult() { Path.Combine(_sourcePath, "node_modules", "Some package"), new MockFileData("bla") }, // node_modules should be excluded }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -200,7 +201,7 @@ public void InitializeShouldNotSkipXamlFiles() { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, { Path.Combine(_sourcePath, "obj", "Debug", "netcoreapp2.1", "ExampleProject.AssemblyInfo.cs"), new MockFileData("Bytecode") } }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -250,7 +251,7 @@ public void InitializeShouldMutateAssemblyInfo() { Path.Combine(_sourcePath, "node_modules", "Some package"), new MockFileData("bla") }, // node_modules should be excluded }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -307,7 +308,7 @@ public void InitializeShouldNotMutateIncompleteAssemblyInfo() { Path.Combine(_sourcePath, "node_modules", "Some package"), new MockFileData("bla") }, // node_modules should be excluded }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -321,8 +322,8 @@ public void InitializeShouldNotMutateIncompleteAssemblyInfo() var result = target.ResolveSourceProjectInfos(_options).First(); - ((ProjectComponent)result.ProjectContents).CompilationSyntaxTrees.FirstOrDefault(s => s != null && s.FilePath.Contains("AssemblyInfo.cs")). - ShouldBeSemantically(CSharpSyntaxTree.ParseText(textContents)); + ((ProjectComponent)result.ProjectContents).CompilationSyntaxTrees.FirstOrDefault(s => s != null && s.FilePath.Contains("AssemblyInfo.cs")). + ShouldBeSemantically(CSharpSyntaxTree.ParseText(textContents)); } [TestMethod] @@ -336,7 +337,7 @@ public void InitializeShouldFindSpecifiedTestProjectFile() { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -393,7 +394,7 @@ public void InitializeShouldResolveImportedProject() { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -710,9 +711,9 @@ public void InitializeShouldIgnoreBinFolder(string folderName) ((CsharpFolderComposite)result.ProjectContents).Children.Count().ShouldBe(1); - var sub =(CsharpFolderComposite) ((CsharpFolderComposite)result.ProjectContents).Children.First(); + var sub = (CsharpFolderComposite)((CsharpFolderComposite)result.ProjectContents).Children.First(); // here sub is the root folder of the project - sub =(CsharpFolderComposite) sub.Children.First(); + sub = (CsharpFolderComposite)sub.Children.First(); sub.Children.Count().ShouldBe(2); } @@ -720,8 +721,8 @@ public void InitializeShouldIgnoreBinFolder(string folderName) public void ShouldThrowExceptionOnNullPath() { var fileSystem = new MockFileSystem(new Dictionary - { - }); + { + }); BuildBuildAnalyzerMock(new Dictionary()); @@ -765,7 +766,7 @@ Please specify a test project name filter that results in one project. var exception = Should.Throw(() => target.FindTestProject(Path.Combine(_sourcePath))); exception.Message.ShouldBe(errorMessage); - + } [TestMethod] @@ -858,7 +859,7 @@ public void ShouldSelectAvailableFramework_WhenDesiredNotFound(string targetFram var testProjectPath = Path.Combine(_sourcePath, "TestProjectFolder", "TestProject.csproj"); var sourceProjectPath = Path.Combine(_sourcePath, "ExampleProject", "ExampleProject.csproj"); var sourceProjectNameFilter = "ExampleProject.csproj"; - + var fileSystem = new MockFileSystem(new Dictionary { { sourceProjectPath, new MockFileData(_defaultTestProjectFileContents)}, @@ -874,7 +875,7 @@ public void ShouldSelectAvailableFramework_WhenDesiredNotFound(string targetFram TargetFramework = targetFramework }; - var sourceProjectManagerMock = SourceProjectAnalyzerMock(sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(testProjectPath, sourceProjectPath); var analyzerResults = new Dictionary @@ -1002,7 +1003,7 @@ public void ShouldFindSourceProjectWhenSingleProjectReferenceAndNoFilter() { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -1056,7 +1057,7 @@ public void ShouldThrowOnMultipleProjectsWithoutFilter() var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); var sourceProject2ManagerMock = SourceProjectAnalyzerMock(project2, []); - var properties = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; + var properties = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; var testProjectManagerMock = BuildProjectAnalyzerMock(_testProjectPath, [], properties, [_sourceProjectPath, project2], "netcore2.1"); var analyzerResults = new Dictionary @@ -1093,9 +1094,9 @@ public void ShouldNotThrowIfMultipleProjectButOneIsAlwaysReferenced() var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); var sourceProject2ManagerMock = SourceProjectAnalyzerMock(project2, []); - var properties = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; + var properties = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; var testProjectManagerMock = BuildProjectAnalyzerMock(_testProjectPath, [], properties, [_sourceProjectPath, project2], "netcore2.1"); - var properties2 = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; + var properties2 = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; var testProjectManagerMock2 = BuildProjectAnalyzerMock(test2Path, [], properties2, [_sourceProjectPath], "netcore2.1"); var analyzerResults = new Dictionary @@ -1139,7 +1140,7 @@ public void ShouldMatchFromMultipleProjectByName(string shouldMatch) var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); var sourceProject2ManagerMock = SourceProjectAnalyzerMock(project2, []); - var properties = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; + var properties = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; var testProjectManagerMock = BuildProjectAnalyzerMock(_testProjectPath, [], properties, [_sourceProjectPath, project2], "netcore2.1"); var analyzerResults = new Dictionary @@ -1176,7 +1177,7 @@ public void ShouldThrowWhenTheNameMatchesMore(string shouldMatchMoreThanOne) var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, []); var sourceProject2ManagerMock = SourceProjectAnalyzerMock(project2, []); - var properties = new Dictionary{ { "IsTestProject", "True" }, { "Language", "C#" } }; + var properties = new Dictionary { { "IsTestProject", "True" }, { "Language", "C#" } }; var testProjectManagerMock = BuildProjectAnalyzerMock(_testProjectPath, [], properties, [_sourceProjectPath, project2], "netcore2.1"); var analyzerResults = new Dictionary @@ -1204,7 +1205,7 @@ public void ShouldThrowWhenTheNameMatchesNone() { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary @@ -1234,7 +1235,7 @@ public void ShouldMatchOnBothForwardAndBackwardsSlash(string shouldMatch) { _testProjectPath, new MockFileData(_defaultTestProjectFileContents)}, }); - var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); + var sourceProjectManagerMock = SourceProjectAnalyzerMock(_sourceProjectPath, fileSystem.AllFiles.Where(s => s.EndsWith(".cs")).ToArray()); var testProjectManagerMock = TestProjectAnalyzerMock(_testProjectPath, _sourceProjectPath, "netcoreapp2.1"); var analyzerResults = new Dictionary diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs index 1e0c497dcd..e22018d453 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/NugetRestoreProcessTests.cs @@ -4,10 +4,10 @@ using Moq; using Shouldly; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Testing; +using Stryker.Core.Initialisation; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.UnitTest.Initialisation; +namespace Stryker.Core.UnitTest.Initialisation; [TestClass] public class NugetRestoreProcessTests : TestBase @@ -64,7 +64,7 @@ public void HappyFlow() target.RestorePackages(SolutionPath); - processExecutorMock.Verify( p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), + processExecutorMock.Verify(p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny()), Times.Exactly(5)); } @@ -124,7 +124,7 @@ public void ThrowIfRestoreFails() var action = () => target.RestorePackages(SolutionPath); - action.ShouldThrow("Packages restore failed."); + action.ShouldThrow("Packages restore failed."); } [TestMethodWithIgnoreIfSupport] @@ -183,7 +183,7 @@ public void FailToGetMsBuildVersion() target.RestorePackages(SolutionPath); - processExecutorMock.Verify( p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), + processExecutorMock.Verify(p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>>(), 0), Times.Exactly(4)); } @@ -248,7 +248,7 @@ public void NugetIsUsingSuppliedMsBuild() processExecutorMock.Verify(x => x.Start(It.IsAny(), It.IsAny(), "-version /nologo", null, It.IsAny()), Times.Once); processExecutorMock.Verify(x => x.Start(nugetDirectory, nugetPath, string.Format("restore \"{0}\" -MsBuildVersion \"{1}\"", Path.GetFullPath(SolutionPath), msBuildVersion), null, It.IsAny()), Times.Once); processExecutorMock.Verify(x => x.Start(It.Is(s => s.Contains("Microsoft Visual Studio")), It.Is(s => s.Contains("vswhere.exe")), @"-latest -requires Microsoft.Component.MSBuild -products * -find MSBuild\**\Bin\MSBuild.exe", null, It.IsAny()), Times.Never); - msbuildPath.ShouldBe(capturedMsBuildPath); + msbuildPath.ShouldBe(capturedMsBuildPath); } [TestMethodWithIgnoreIfSupport] @@ -279,7 +279,7 @@ public void ShouldThrowOnNugetNotInstalled() Output = msBuildVersion }); - processExecutorMock.Setup(x => x.Start(_solutionDir, "where.exe", It.Is( s => s.EndsWith("nuget.exe")), + processExecutorMock.Setup(x => x.Start(_solutionDir, "where.exe", It.Is(s => s.EndsWith("nuget.exe")), null, It.IsAny())) .Returns(new ProcessResult() { @@ -288,15 +288,15 @@ public void ShouldThrowOnNugetNotInstalled() }); var target = new NugetRestoreProcess(processExecutorMock.Object); - Should.Throw(() => target.RestorePackages(SolutionPath) ); + Should.Throw(() => target.RestorePackages(SolutionPath)); } [TestMethodWithIgnoreIfSupport] [IgnoreIf(nameof(Is.Unix))] //DotnetFramework does not run on Unix public void ShouldPickFirstNugetPath() { - string firstNugetPath = @"C:\choco\bin\NuGet.exe"; - string msBuildVersion = "16.0.0"; + var firstNugetPath = @"C:\choco\bin\NuGet.exe"; + var msBuildVersion = "16.0.0"; var nugetDirectory = Path.GetDirectoryName(firstNugetPath); var processExecutorMock = new Mock(MockBehavior.Strict); @@ -349,7 +349,7 @@ public void ShouldPickFirstNugetPath() var target = new NugetRestoreProcess(processExecutorMock.Object); target.RestorePackages(SolutionPath); - processExecutorMock.Verify( p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), + processExecutorMock.Verify(p => p.Start(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>>(), 0), Times.Exactly(4)); } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs index b587206e1c..fd404b1c68 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectMutatorTests.cs @@ -3,22 +3,20 @@ using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; using System.Linq; -using Buildalyzer; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; +using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Abstractions.UnitTest.Initialisation +namespace Stryker.Core.UnitTest.Initialisation { [TestClass] public class ProjectMutatorTests : TestBase @@ -71,7 +69,7 @@ public void ShouldInitializeEachProjectInSolution() { CodeFilePath = _testFilePath, LineNumber = 7, - + }; var failedTest = testCase1.Id; var testCase2 = new VsTest.TestCase("mytestname", new Uri(_testFilePath), _testFileContents) @@ -94,7 +92,7 @@ public void ShouldInitializeEachProjectInSolution() _mutationTestInput.InitialTestRun = initialTestrun; // act - var result = target.MutateProject(options, _mutationTestInput,_reporterMock.Object); + var result = target.MutateProject(options, _mutationTestInput, _reporterMock.Object); // assert result.ShouldNotBeNull(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs index 6d1e9e896e..dd0b8546f6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/ProjectOrchestratorTests.cs @@ -9,18 +9,18 @@ using Serilog; using Serilog.Events; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.TestRunners; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.UnitTest.Initialisation; +namespace Stryker.Core.UnitTest.Initialisation; [TestClass] public class ProjectOrchestratorTests : BuildAnalyzerTestsBase @@ -32,11 +32,11 @@ public class ProjectOrchestratorTests : BuildAnalyzerTestsBase public ProjectOrchestratorTests() { _mutationTestProcessMock.Setup(x => x.Mutate()); - _projectMutatorMock.Setup(x => x.MutateProject(It.IsAny(), It.IsAny(), It.IsAny())) - .Returns( (StrykerOptions options, MutationTestInput input, IReporter reporter) => + _projectMutatorMock.Setup(x => x.MutateProject(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns((StrykerOptions options, MutationTestInput input, IReporter reporter) => { - var mock= new Mock(); - mock.Setup( m => m.Input).Returns(input); + var mock = new Mock(); + mock.Setup(m => m.Input).Returns(input); return mock.Object; }); @@ -57,11 +57,11 @@ public void ShouldInitializeEachProjectInSolution() var csPathName = FileSystem.Path.Combine(ProjectPath, "someFile.cs"); var sourceProjectAnalyzerMock = SourceProjectAnalyzerMock(csprojPathName, new[] { csPathName }).Object; - var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, + var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, TestProjectAnalyzerMock(testCsprojPathName, csprojPathName).Object, out var mockRunner); FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); @@ -90,11 +90,11 @@ public void ShouldDiscoverContentFiles() var properties = GetSourceProjectDefaultProperties(); properties["ContentPreprocessorOutputDirectory"] = contentFolder; var sourceProjectAnalyzerMock = BuildProjectAnalyzerMock(csprojPathName, new[] { csPathName }, properties).Object; - var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, + var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, TestProjectAnalyzerMock(testCsprojPathName, csprojPathName).Object, out var mockRunner); FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); @@ -118,7 +118,7 @@ public void ShouldPassWhenProjectNameIsGiven() var csPathName = FileSystem.Path.Combine(ProjectPath, "someFile.cs"); var sourceProjectAnalyzerMock = SourceProjectAnalyzerMock(csprojPathName, new[] { csPathName }).Object; - var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, + var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzerMock, TestProjectAnalyzerMock(testCsprojPathName, csprojPathName).Object, out var mockRunner); // act @@ -157,7 +157,7 @@ public void ShouldUsedDesiredConfigurationWhenDefined() var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); // assert - buildalyzerAnalyzerManagerMock.Verify( x=> x.SetGlobalProperty("Configuration", "Release"), Times.Once()); + buildalyzerAnalyzerManagerMock.Verify(x => x.SetGlobalProperty("Configuration", "Release"), Times.Once()); } [TestMethod] @@ -238,11 +238,11 @@ public void ShouldFailIfNoProjectFound() var csPathName = FileSystem.Path.Combine(ProjectPath, "someFile.cs"); var sourceProjectAnalyzer = SourceProjectAnalyzerMock(csprojPathName, new[] { csPathName }).Object; - var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzer, + var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzer, TestProjectAnalyzerMock(testCsprojPathName, csprojPathName).Object, out var mockRunner); - + FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var mutateAction = () => target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); @@ -266,11 +266,11 @@ public void ShouldFilterInSolutionMode() var csPathName = FileSystem.Path.Combine(ProjectPath, "someFile.cs"); var sourceProjectAnalyzer = SourceProjectAnalyzerMock(csprojPathName, new[] { csPathName }).Object; - var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzer, + var target = BuildProjectOrchestratorForSimpleProject(sourceProjectAnalyzer, TestProjectAnalyzerMock(testCsprojPathName, csprojPathName).Object, out var mockRunner); - + FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = () => target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); // assert @@ -297,10 +297,10 @@ public void ShouldProvideMinimalSupportForFSharp() var target = BuildProjectOrchestratorForSimpleProject( sourceProjectAnalyzer, BuildProjectAnalyzerMock(testCsprojPathName, Array.Empty(), properties1, - new List{ csprojPathName}).Object, out var mockRunner); - + new List { csprojPathName }).Object, out var mockRunner); + FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); @@ -326,7 +326,7 @@ public void ShouldDiscoverUpstreamProject() new[] { FileSystem.Path.Combine(ProjectPath, "mylib.cs") }).Object; var projectAnalyzer = SourceProjectAnalyzerMock(csprojPathName, new[] { FileSystem.Path.Combine(ProjectPath, "someFile.cs")} - , new[] {libraryProject}).Object; + , new[] { libraryProject }).Object; var analyzerResults = new Dictionary { { "MyProject", projectAnalyzer }, @@ -336,7 +336,7 @@ public void ShouldDiscoverUpstreamProject() var target = BuildProjectOrchestrator(analyzerResults, out var mockRunner); FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); @@ -362,7 +362,7 @@ public void ShouldDiscoverUpstreamProjectWithInvalidCasing() new[] { FileSystem.Path.Combine(ProjectPath, "mylib.cs") }).Object; var projectAnalyzer = SourceProjectAnalyzerMock(csprojPathName, new[] { FileSystem.Path.Combine(ProjectPath, "someFile.cs")} - , new[] {libraryProject}).Object; + , new[] { libraryProject }).Object; var analyzerResults = new Dictionary { { "MyProject", projectAnalyzer }, @@ -390,10 +390,10 @@ public void ShouldDisregardInvalidReferences() SolutionPath = FileSystem.Path.Combine(ProjectPath, "MySolution.sln") }; var libraryProject = FileSystem.Path.Combine(ProjectPath, "libraryproject.csproj"); - + // The analyzer finds two projects var projectAnalyzer = SourceProjectAnalyzerMock(csprojPathName, [FileSystem.Path.Combine(ProjectPath, "someFile.cs")] - , new[] {libraryProject}).Object; + , new[] { libraryProject }).Object; var analyzerResults = new Dictionary { { "MyProject", projectAnalyzer }, @@ -434,7 +434,7 @@ public void ShouldIgnoreProjectWithoutTestAssemblies() var target = BuildProjectOrchestrator(analyzerResults, out var mockRunner); FileSystem.Directory.SetCurrentDirectory(FileSystem.Path.GetFullPath(testCsprojPathName)); - + // act var result = target.MutateProjects(options, _reporterMock.Object, mockRunner.Object).ToList(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs index 93038ae577..49df13a2d0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/TimeoutValueCalculatorTests.cs @@ -1,8 +1,8 @@ -using Shouldly; -using Stryker.Abstractions.Initialisation; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.Initialisation; -namespace Stryker.Abstractions.UnitTest.Initialisation +namespace Stryker.Core.UnitTest.Initialisation { [TestClass] public class TimeoutValueCalculatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs index 1c2d02c26f..3a3baff6f4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/InjectedHelpers/InjectedHelperTests.cs @@ -1,14 +1,14 @@ -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Shouldly; -using Stryker.Abstractions.InjectedHelpers; using System; using System.Collections.Generic; using System.IO.Pipes; using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.InjectedHelpers; -namespace Stryker.Abstractions.UnitTest.InjectedHelpers +namespace Stryker.Core.UnitTest.InjectedHelpers { [TestClass] public class InjectedHelperTests : TestBase @@ -58,7 +58,7 @@ public void InjectHelpers_ShouldCompile_ForAllLanguageVersions(LanguageVersion v references: references); compilation.GetDiagnostics().ShouldNotContain(diag => diag.Severity == DiagnosticSeverity.Error, - $"errors :{string.Join(Environment.NewLine, compilation.GetDiagnostics().Where(x => x.Severity == DiagnosticSeverity.Error).Select(diag => $"{diag.Id}: '{diag.GetMessage()}' at {diag.Location.SourceTree.FilePath}, {diag.Location.GetLineSpan().StartLinePosition.Line+1}:{diag.Location.GetLineSpan().StartLinePosition.Character}"))}"); + $"errors :{string.Join(Environment.NewLine, compilation.GetDiagnostics().Where(x => x.Severity == DiagnosticSeverity.Error).Select(diag => $"{diag.Id}: '{diag.GetMessage()}' at {diag.Location.SourceTree.FilePath}, {diag.Location.GetLineSpan().StartLinePosition.Line + 1}:{diag.Location.GetLineSpan().StartLinePosition.Character}"))}"); } [TestMethod] @@ -101,7 +101,7 @@ public void InjectHelpers_ShouldCompile_ForAllLanguageVersionsWithNullableOption references: references); compilation.GetDiagnostics().ShouldNotContain(diag => diag.Severity == DiagnosticSeverity.Error, - $"errors :{string.Join(Environment.NewLine, compilation.GetDiagnostics().Where(x => x.Severity == DiagnosticSeverity.Error).Select(diag => $"{diag.Id}: '{diag.GetMessage()}' at {diag.Location.SourceTree.FilePath}, {diag.Location.GetLineSpan().StartLinePosition.Line+1}:{diag.Location.GetLineSpan().StartLinePosition.Character}"))}"); + $"errors :{string.Join(Environment.NewLine, compilation.GetDiagnostics().Where(x => x.Severity == DiagnosticSeverity.Error).Select(diag => $"{diag.Id}: '{diag.GetMessage()}' at {diag.Location.SourceTree.FilePath}, {diag.Location.GetLineSpan().StartLinePosition.Line + 1}:{diag.Location.GetLineSpan().StartLinePosition.Character}"))}"); } } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs index e702be5e26..1d956e6021 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/LoggerMockExtensions.cs @@ -2,7 +2,7 @@ using Moq; using System; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { public static class LoggerMockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs index e24bf7a3da..9bc3e0284f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MockExtensions.cs @@ -1,9 +1,9 @@ -using Moq; -using Stryker.Abstractions.Testing; using System.Collections.Generic; using System.IO; +using Moq; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { public static class MockExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs index c6c85bad87..dbeb79bbca 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs @@ -4,22 +4,23 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.Baseline.Utils; -using Stryker.Abstractions.MutantFilters; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Json.SourceFiles; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.UnitTest.Reporters.Json; -using Stryker.Abstractions.Mutants; -using Stryker.Reporters.Json.SourceFiles; - -namespace Stryker.Abstractions.UnitTest.MutantFilters +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Baseline.Utils; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.UnitTest.Reporters.Json; + +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class BaselineMutantFilterTests : TestBase @@ -64,7 +65,7 @@ public void GetBaseline_UsesBaselineFallbackVersion_WhenReportForCurrentVersionN gitInfoProvider.Setup(x => x.GetCurrentBranchName()).Returns(branchName); - baselineProvider.Setup(x => x.Load($"baseline/{branchName}")).Returns(Task.FromResult(null)); + baselineProvider.Setup(x => x.Load($"baseline/{branchName}")).Returns(Task.FromResult(null)); baselineProvider.Setup(x => x.Load($"baseline/{options.FallbackVersion}")).Returns(Task.FromResult(jsonReport)); // Act @@ -101,8 +102,8 @@ public void GetBaseline_UsesFallbackVersion_WhenBaselineFallbackVersionNotFound( gitInfoProvider.Setup(x => x.GetCurrentBranchName()).Returns(branchName); - baselineProvider.Setup(x => x.Load(branchName)).Returns(Task.FromResult(null)); - baselineProvider.Setup(x => x.Load($"baseline/{options.FallbackVersion}")).Returns(Task.FromResult(null)); + baselineProvider.Setup(x => x.Load(branchName)).Returns(Task.FromResult(null)); + baselineProvider.Setup(x => x.Load($"baseline/{options.FallbackVersion}")).Returns(Task.FromResult(null)); baselineProvider.Setup(x => x.Load(options.FallbackVersion)).Returns(Task.FromResult(jsonReport)); // Act @@ -251,7 +252,7 @@ public void FilterMutants_WhenMutantMatchesSourceCode_StatusIsSetToJsonMutant() RelativePath = "foo.cs" }; - var mutants = new List + var mutants = new List { new Mutant { @@ -259,7 +260,7 @@ public void FilterMutants_WhenMutantMatchesSourceCode_StatusIsSetToJsonMutant() } }; - var jsonMutants = new HashSet + var jsonMutants = new HashSet { new JsonMutant { @@ -270,7 +271,7 @@ public void FilterMutants_WhenMutantMatchesSourceCode_StatusIsSetToJsonMutant() // Setup Mocks var jsonReportFileComponent = new MockJsonReportFileComponent("", "", jsonMutants); - var jsonFileComponents = new Dictionary + var jsonFileComponents = new Dictionary { ["foo.cs"] = jsonReportFileComponent }; @@ -314,7 +315,7 @@ public void FilterMutants_WhenMultipleMatchingMutants_ResultIsSetToNotRun() RelativePath = "foo.cs" }; - var mutants = new List + var mutants = new List { new Mutant { @@ -326,7 +327,7 @@ public void FilterMutants_WhenMultipleMatchingMutants_ResultIsSetToNotRun() } }; - var jsonMutants = new HashSet + var jsonMutants = new HashSet { new JsonMutant { @@ -388,23 +389,23 @@ public void ShouldNotUpdateMutantsWithBaselineIfFileNotInBaseline() RelativePath = "foo.cs" }; - var mutants = new List + var mutants = new List { new Mutant() }; - var jsonMutants = new HashSet + var jsonMutants = new HashSet { new JsonMutant() }; // Setup Mocks - var jsonFileComponents = new Dictionary(); + var jsonFileComponents = new Dictionary(); var baseline = new MockJsonReport(null, jsonFileComponents); - baselineProvider.Setup(mock => mock.Load(It.IsAny())).Returns(Task.FromResult((JsonReport)baseline)); + baselineProvider.Setup(mock => mock.Load(It.IsAny())).Returns(Task.FromResult((IJsonReport)baseline)); // Act var target = new BaselineMutantFilter(options, baselineProvider.Object, branchProvider.Object, baselineMutantHelper.Object); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs index a07c5d4cc0..bf3bed7782 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeFromCodeCoverageFilterTests.cs @@ -1,13 +1,14 @@ +using System; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.MutantFilters; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Mutants; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class ExcludeFromCodeCoverageFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs index aa456a5b5f..7abbec5378 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeLinqExpressionFilterTests.cs @@ -6,13 +6,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions; -using Stryker.Abstractions.MutantFilters; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class ExcludeLinqExpressionFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs index a380a3fc52..7f074b44a0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/ExcludeMutationMutantFilterTests.cs @@ -1,11 +1,12 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.MutantFilters; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class ExcludeMutationMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs index 97dd09ddc0..461d229265 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/FilePatternMutantFilterTests.cs @@ -2,14 +2,15 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.MutantFilters; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Mutants; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class FilePatternMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs index da82dae358..d08c56d98c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoreBlockMutantFilterTests.cs @@ -3,11 +3,12 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.MutantFilters; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class IgnoreBlockMutantFilterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs index 4c44dfccd2..1074fb9817 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/IgnoredMethodMutantFilterTests.cs @@ -5,14 +5,15 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.MutantFilters; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; +using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Options.Inputs; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class IgnoredMethodMutantFilterTests : TestBase @@ -51,7 +52,7 @@ public void ShouldFilterDocumentedCases(string methodCall, string anchor, bool s }; var sut = new IgnoredMethodMutantFilter(); - foreach(var (mutant, label) in BuildMutantsToFilter(source, anchor)) + foreach (var (mutant, label) in BuildMutantsToFilter(source, anchor)) { // Act var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); @@ -105,7 +106,7 @@ private void TestMethod() var sut = new IgnoredMethodMutantFilter(); - var (mutant, label) = BuildExpressionMutant(source, "<"); + var (mutant, label) = BuildExpressionMutant(source, "<"); var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); // Assert @@ -142,7 +143,7 @@ private void TestMethod() }; var sut = new IgnoredMethodMutantFilter(); - foreach(var (mutant, label) in BuildMutantsToFilter(source, "ToList")) + foreach (var (mutant, label) in BuildMutantsToFilter(source, "ToList")) { // Act var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); @@ -220,7 +221,7 @@ private void TestMethod() var sut = new IgnoredMethodMutantFilter(); - foreach( var (mutant, label) in BuildMutantsToFilter(source, "ToList")) + foreach (var (mutant, label) in BuildMutantsToFilter(source, "ToList")) { // Act var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); @@ -256,7 +257,7 @@ private void TestMethod() var sut = new IgnoredMethodMutantFilter(); - foreach( var (mutant, label) in BuildMutantsToFilter(source, "ToList")) + foreach (var (mutant, label) in BuildMutantsToFilter(source, "ToList")) { // Act var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); @@ -368,7 +369,7 @@ private void TestMethod() }; var sut = new IgnoredMethodMutantFilter(); - foreach(var (mutant, label) in BuildMutantsToFilter(source, "Dispose")) + foreach (var (mutant, label) in BuildMutantsToFilter(source, "Dispose")) { // act var filteredMutants = sut.FilterMutants(new[] { mutant }, null, options); @@ -626,7 +627,7 @@ private void TestMethod() } }"; var baseSyntaxTree = CSharpSyntaxTree.ParseText(source).GetRoot(); - var mutants = new[] { "true", @"""A Mutation""", "42"}.Select(GetOriginalNode).Select(node => new Mutant { Mutation = new Mutation { OriginalNode = node } }).ToArray(); + var mutants = new[] { "true", @"""A Mutation""", "42" }.Select(GetOriginalNode).Select(node => new Mutant { Mutation = new Mutation { OriginalNode = node } }).ToArray(); var options = new StrykerOptions { IgnoredMethods = new IgnoreMethodsInput { SuppliedInput = new[] { "Bar" } }.Validate() @@ -641,7 +642,7 @@ private void TestMethod() filteredMutants.ShouldNotContain(mutants[1]); // Bar(""A Mutation""); filteredMutants.ShouldContain(mutants[2]); // Quux(42); - Microsoft.CodeAnalysis.SyntaxNode GetOriginalNode(string node) => + SyntaxNode GetOriginalNode(string node) => baseSyntaxTree.FindNode(new TextSpan(source.IndexOf(node, StringComparison.OrdinalIgnoreCase), node.Length)); } @@ -675,11 +676,11 @@ private void TestMethod() filteredMutants.ShouldContain(mutants[1]); // Bar(""A Mutation""); filteredMutants.ShouldContain(mutants[2]); // Quux(42); - Microsoft.CodeAnalysis.SyntaxNode GetOriginalNode(string node) => + SyntaxNode GetOriginalNode(string node) => baseSyntaxTree.FindNode(new TextSpan(source.IndexOf(node, StringComparison.OrdinalIgnoreCase), node.Length)); } - private T FindEnclosingNode(SyntaxNode start) where T: SyntaxNode => + private T FindEnclosingNode(SyntaxNode start) where T : SyntaxNode => start switch { null => null, @@ -687,7 +688,7 @@ private T FindEnclosingNode(SyntaxNode start) where T: SyntaxNode => _ => FindEnclosingNode(start.Parent) }; - private T FindEnclosingNode(SyntaxNode start, string anchor) where T: SyntaxNode => FindEnclosingNode(start.FindNode(new TextSpan(start.ToFullString().IndexOf(anchor), anchor.Length))); + private T FindEnclosingNode(SyntaxNode start, string anchor) where T : SyntaxNode => FindEnclosingNode(start.FindNode(new TextSpan(start.ToFullString().IndexOf(anchor), anchor.Length))); private IEnumerable<(Mutant, string)> BuildMutantsToFilter(string csharp, string anchor) { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs index dea02c4a84..2635ef8788 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/MutantFilterFactoryTests.cs @@ -4,14 +4,15 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.DiffProviders; -using Stryker.Abstractions.MutantFilters; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters.Json; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.DiffProviders; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.Reporters.Json; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class MutantFilterFactoryTests : TestBase @@ -109,7 +110,8 @@ public void MutantFilterFactory_Creates_ExcludeLinqExpressionFilter_When_Exclude } [TestMethod] - public void MutantFilterFactory_Creates_DashboardMutantFilter_And_DiffMutantFilter_WithBaseline_Enabled() { + public void MutantFilterFactory_Creates_DashboardMutantFilter_And_DiffMutantFilter_WithBaseline_Enabled() + { var options = new StrykerOptions() { WithBaseline = true, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs index 65ddb6744a..35d3431a9f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/SinceMutantFilterTests.cs @@ -1,18 +1,19 @@ -using Moq; -using Shouldly; -using Stryker.Abstractions.DiffProviders; -using Stryker.Abstractions.MutantFilters; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Moq; +using Shouldly; +using Stryker.Abstractions; +using Stryker.Abstractions.Mutants; +using Stryker.Core.DiffProviders; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; -namespace Stryker.Abstractions.UnitTest.MutantFilters +namespace Stryker.Core.UnitTest.MutantFilters { [TestClass] public class SinceMutantFilterTests : TestBase @@ -40,7 +41,8 @@ public void ShouldNotMutateUnchangedFiles() }; var diffProvider = new Mock(MockBehavior.Loose); - string myFile = Path.Combine("C:/test/", "myfile.cs"); ; + var myFile = Path.Combine("C:/test/", "myfile.cs"); + ; diffProvider.Setup(x => x.ScanDiff()).Returns(new DiffResult() { @@ -70,7 +72,8 @@ public void ShouldOnlyMutateChangedFiles() }; var diffProvider = new Mock(MockBehavior.Loose); - string myFile = Path.Combine("C:/test/", "myfile.cs"); ; + var myFile = Path.Combine("C:/test/", "myfile.cs"); + ; diffProvider.Setup(x => x.ScanDiff()).Returns(new DiffResult() { ChangedSourceFiles = new Collection() @@ -101,10 +104,11 @@ public void ShouldNotFilterMutantsWhereCoveringTestsContainsChangedTestFile() var diffProvider = new Mock(MockBehavior.Loose); // If a file inside the test project is changed, a test has been changed - var myTestPath = Path.Combine(testProjectPath, "myTest.cs"); ; + var myTestPath = Path.Combine(testProjectPath, "myTest.cs"); + ; var tests = new TestSet(); var test = new TestDescription(Guid.NewGuid(), "name", myTestPath); - tests.RegisterTests(new[] {test}); + tests.RegisterTests(new[] { test }); diffProvider.SetupGet(x => x.Tests).Returns(tests); diffProvider.Setup(x => x.ScanDiff()).Returns(new DiffResult { @@ -123,7 +127,7 @@ public void ShouldNotFilterMutantsWhereCoveringTestsContainsChangedTestFile() var file = new CsharpFileLeaf { FullPath = Path.Combine("C:/NotMyTests", "myfile.cs") }; var mutant = new Mutant { - CoveringTests = new TestGuidsList(new[] {test}) + CoveringTests = new TestGuidsList(new[] { test }) }; @@ -247,15 +251,15 @@ public void FilterMutants_FiltersNoMutants_IfTestsChanged() var tests = new TestSet(); var test1 = new TestDescription(Guid.NewGuid(), "name1", "C:/testfile1.cs"); var test2 = new TestDescription(Guid.NewGuid(), "name2", "C:/testfile2.cs"); - tests.RegisterTests(new[] {test1, test2}); + tests.RegisterTests(new[] { test1, test2 }); diffProvider.SetupGet(x => x.Tests).Returns(tests); var target = new SinceMutantFilter(diffProvider.Object); - var testFile1 = new TestGuidsList(new [] {test1}); - var testFile2 = new TestGuidsList(new [] {test2}); + var testFile1 = new TestGuidsList(new[] { test1 }); + var testFile2 = new TestGuidsList(new[] { test2 }); - var expectedToStay1 = new Mutant {CoveringTests = testFile1}; - var expectedToStay2 = new Mutant {CoveringTests = testFile1}; - var newMutant = new Mutant {CoveringTests = testFile2}; + var expectedToStay1 = new Mutant { CoveringTests = testFile1 }; + var expectedToStay2 = new Mutant { CoveringTests = testFile1 }; + var newMutant = new Mutant { CoveringTests = testFile2 }; var mutants = new List { expectedToStay1, @@ -267,7 +271,7 @@ public void FilterMutants_FiltersNoMutants_IfTestsChanged() var results = target.FilterMutants(mutants, new CsharpFileLeaf(), options); // Assert - results.ShouldBe(new []{expectedToStay1, expectedToStay2}); + results.ShouldBe(new[] { expectedToStay1, expectedToStay2 }); } [TestMethod] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs index f5e6d17f22..d0ab38d5da 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/CsharpMutantOrchestratorTests.cs @@ -2,12 +2,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; using Stryker.Abstractions.Options; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.Mutants; +namespace Stryker.Core.UnitTest.Mutants; [TestClass] public class CsharpMutantOrchestratorTests : MutantOrchestratorTestsBase @@ -88,11 +89,11 @@ public void ShouldMutateBlockStatements() }; _target = new CsharpMutantOrchestrator(new MutantPlacer(_injector), options: options); - string source = @"private void Move() + var source = @"private void Move() { ; }"; - string expected = @"private void Move() + var expected = @"private void Move() {if(StrykerNamespace.MutantControl.IsActive(0)){}else { ; }}"; @@ -114,10 +115,10 @@ public void ShouldMutateBlockStatements() [TestMethod] public void ShouldAddReturnDefaultToOperator() { - string source = @"public static string operator+ (TestClass value, TestClass other) + var source = @"public static string operator+ (TestClass value, TestClass other) { while(true) return value; }"; - string expected = @"public static string operator+ (TestClass value, TestClass other) + var expected = @"public static string operator+ (TestClass value, TestClass other) {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ while((StrykerNamespace.MutantControl.IsActive(2)?!(true):(StrykerNamespace.MutantControl.IsActive(1)?false:true))) return value; }return default(string);}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -126,9 +127,9 @@ public void ShouldAddReturnDefaultToOperator() [TestMethod] public void ShouldAddReturnDefaultToArrowExpressionOperator() { - string source = + var source = @"public static int operator+ (TestClass value, TestClass other) => Sub(out var x, """")?1:2;"; - string expected = + var expected = @"public static int operator+ (TestClass value, TestClass other) {if(StrykerNamespace.MutantControl.IsActive(1)){return(false?1:2);}else{if(StrykerNamespace.MutantControl.IsActive(0)){return(true?1:2);}else{return Sub(out var x, (StrykerNamespace.MutantControl.IsActive(2)?""Stryker was here!"":""""))?1:2;}}}"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -154,10 +155,10 @@ public void ShouldProperlyMutatePrefixUnitaryExpressionStatement() [TestMethod] public void ShouldMutateExpressionBodiedLocalFunction() { - string source = @"void TestMethod(){ + var source = @"void TestMethod(){ int SomeMethod() => (true && SomeOtherMethod(out var x)) ? x : 5; }"; - string expected = @"void TestMethod(){if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"void TestMethod(){if(StrykerNamespace.MutantControl.IsActive(0)){}else{ int SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(2)){return(false?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(1)){return(true?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(3)){return(true || SomeOtherMethod(out var x)) ? x : 5;}else{return((StrykerNamespace.MutantControl.IsActive(4)?false:true )&& SomeOtherMethod(out var x)) ? x : 5;}}}}; }}"; @@ -167,7 +168,7 @@ public void ShouldMutateExpressionBodiedLocalFunction() [TestMethod] public void IfStatementsShouldBeNested() { - string source = @"void TestMethod() + var source = @"void TestMethod() { int i = 0; if (i + 8 == 8) @@ -202,7 +203,7 @@ private bool Out(out string test) { return true; }"; - string expected = @"void TestMethod() + var expected = @"void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{if(StrykerNamespace.MutantControl.IsActive(19)){ int i = 0; if (i + 8 == 8) @@ -302,7 +303,7 @@ private bool Out(out string test) [TestMethod] public void ShouldNotLeakMutationsToNextMethodOrProperty() { - string source = @"public static class ExampleExtension + var source = @"public static class ExampleExtension { private static string[] tabs = { ""tab1"", ""tab2""}; @@ -318,7 +319,7 @@ public List Collection } } }"; - string expected = @"public static class ExampleExtension + var expected = @"public static class ExampleExtension { private static string[] tabs = { (StrykerNamespace.MutantControl.IsActive(1)?"""":""tab1""), (StrykerNamespace.MutantControl.IsActive(2)?"""":""tab2"")}; @@ -347,7 +348,7 @@ public List Collection [TestMethod] public void ShouldNotMutateWhenDeclaration() { - string source = @"void TestMethod() + var source = @"void TestMethod() { int i = 0; var result = Out(out var test) ? test : """"; @@ -356,7 +357,7 @@ private bool Out(out string test) { return true; }"; - string expected = @"void TestMethod() + var expected = @"void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{if(StrykerNamespace.MutantControl.IsActive(2)){ int i = 0; var result = (false?test :""""); @@ -380,7 +381,7 @@ private bool Out(out string test) [TestMethod] public void ShouldMutateWhenDeclarationInInnerScope() { - string source = @"void TestMethod() + var source = @"void TestMethod() { int i = 0; var result = Out(i, (x) => { int.TryParse(""3"", out int y); return x == y;} ) ? i.ToString() : """"; @@ -390,7 +391,7 @@ private bool Out(int test, Funclambda ) return true; } "; - string expected = @"void TestMethod() + var expected = @"void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ int i = 0; var result = (StrykerNamespace.MutantControl.IsActive(2)?(false?i.ToString() :""""):(StrykerNamespace.MutantControl.IsActive(1)?(true?i.ToString() :""""):Out(i, (x) => {if(StrykerNamespace.MutantControl.IsActive(3)){}else{ int.TryParse((StrykerNamespace.MutantControl.IsActive(4)?"""":""3""), out int y); return (StrykerNamespace.MutantControl.IsActive(5)?x != y:x == y);} return default;}) ? i.ToString() : (StrykerNamespace.MutantControl.IsActive(6)?""Stryker was here!"":""""))); @@ -560,10 +561,10 @@ public string ExampleBugMethod() [TestMethod] public void ShouldMutateArrayInitializer() { - string source = @"public int[] Foo(){ + var source = @"public int[] Foo(){ int[] test = { 1 }; }"; - string expected = + var expected = @"public int[] Foo(){if(StrykerNamespace.MutantControl.IsActive(0)){}else{if(StrykerNamespace.MutantControl.IsActive(1)){ int[] test = {}; }else{ @@ -596,8 +597,8 @@ public void ShouldMutateListCreation() [TestMethod] public void ShouldNotMutateImplicitArrayCreationProperties() { - string source = @"public int[] Foo() => new [] { 1 };"; - string expected = @"public int[] Foo() => new [] { 1 };"; + var source = @"public int[] Foo() => new [] { 1 };"; + var expected = @"public int[] Foo() => new [] { 1 };"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -605,8 +606,8 @@ public void ShouldNotMutateImplicitArrayCreationProperties() [TestMethod] public void ShouldNotMutateImplicitArrayCreation() { - string source = "public static readonly int[] Foo = { 1 };"; - string expected = "public static readonly int[] Foo = { 1 };"; + var source = "public static readonly int[] Foo = { 1 };"; + var expected = "public static readonly int[] Foo = { 1 };"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -614,8 +615,8 @@ public void ShouldNotMutateImplicitArrayCreation() [TestMethod] public void ShouldMutateProperties() { - string source = @"private string text => ""Some"" + ""Text"";"; - string expected = + var source = @"private string text => ""Some"" + ""Text"";"; + var expected = @"private string text => (StrykerNamespace.MutantControl.IsActive(0) ? """" : ""Some"") + (StrykerNamespace.MutantControl.IsActive(1) ? """" : ""Text"");"; ShouldMutateSourceInClassToExpected(source, expected); @@ -624,10 +625,10 @@ public void ShouldMutateProperties() [TestMethod] public void ShouldMutateTupleDeclaration() { - string source = @"public void TestMethod() { + var source = @"public void TestMethod() { var (one, two) = (1 + 1, """"); }"; - string expected = @"public void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var (one, two) = ((StrykerNamespace.MutantControl.IsActive(1)?1 - 1:1 + 1), (StrykerNamespace.MutantControl.IsActive(2)?""Stryker was here!"":"""")); } }"; @@ -638,8 +639,8 @@ public void ShouldMutateTupleDeclaration() [TestMethod] public void ShouldNotMutateConst() { - string source = @"private const int x = 1 + 2;"; - string expected = @"private const int x = 1 + 2;"; + var source = @"private const int x = 1 + 2;"; + var expected = @"private const int x = 1 + 2;"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -647,8 +648,8 @@ public void ShouldNotMutateConst() [TestMethod] public void ShouldMutateStackalloc() { - string source = @"Span kindaUnrelated = stackalloc ushort[] { 0 };"; - string expected = + var source = @"Span kindaUnrelated = stackalloc ushort[] { 0 };"; + var expected = @"Span kindaUnrelated = (StrykerNamespace.MutantControl.IsActive(0)?stackalloc ushort[] {}:stackalloc ushort[] { 0 });"; ShouldMutateSourceInClassToExpected(source, expected); @@ -662,8 +663,8 @@ public void ShouldMutateStackalloc() [TestMethod] public void ShouldNotMutateEnum() { - string source = @"private enum Numbers { One = 1, Two = One + 1 }"; - string expected = @"private enum Numbers { One = 1, Two = One + 1 }"; + var source = @"private enum Numbers { One = 1, Two = One + 1 }"; + var expected = @"private enum Numbers { One = 1, Two = One + 1 }"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -671,9 +672,9 @@ public void ShouldNotMutateEnum() [TestMethod] public void ShouldNotMutateAttributes() { - string source = @"[Obsolete(""thismustnotbemutated"")] + var source = @"[Obsolete(""thismustnotbemutated"")] public void SomeMethod() {}"; - string expected = @"[Obsolete(""thismustnotbemutated"")] + var expected = @"[Obsolete(""thismustnotbemutated"")] public void SomeMethod() {}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -682,11 +683,11 @@ public void ShouldNotMutateAttributes() [TestMethod] public void ShouldMutateForWithIfStatementAndConditionalStatement() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { for (var i = 0; i < 10; i++) { } }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ if(StrykerNamespace.MutantControl.IsActive(3)){for (var i = 0; i < 10; i--) { } }else{for (var i = 0; (StrykerNamespace.MutantControl.IsActive(2)?i <= 10:(StrykerNamespace.MutantControl.IsActive(1)?i > 10:i < 10)); i++) @@ -730,8 +731,8 @@ public void ShouldMutateInitializersForWithoutConditionWithIfStatementAndConditi [TestMethod] public void ShouldMutateComplexExpressionBodiedMethod() { - string source = @"public int SomeMethod() => (true && SomeOtherMethod(out var x)) ? x : 5;"; - string expected = + var source = @"public int SomeMethod() => (true && SomeOtherMethod(out var x)) ? x : 5;"; + var expected = @"public int SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(1)){return(false?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(0)){return(true?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(2)){return(true || SomeOtherMethod(out var x)) ? x : 5;}else{return ((StrykerNamespace.MutantControl.IsActive(3)?false:true )&& SomeOtherMethod(out var x)) ? x : 5;}}}}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -740,8 +741,8 @@ public void ShouldMutateComplexExpressionBodiedMethod() [TestMethod] public void ShouldMutateExpressionBodiedStaticConstructor() { - string source = @"static Test() => (true && SomeOtherMethod(out var x)) ? x : 5;"; - string expected = + var source = @"static Test() => (true && SomeOtherMethod(out var x)) ? x : 5;"; + var expected = @"static Test() {using(new StrykerNamespace.MutantContext()){if(StrykerNamespace.MutantControl.IsActive(1)){(false?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(0)){(true?x :5);}else{if(StrykerNamespace.MutantControl.IsActive(2)){(true || SomeOtherMethod(out var x)) ? x : 5;}else{((StrykerNamespace.MutantControl.IsActive(3)?false:true )&& SomeOtherMethod(out var x)) ? x : 5;}}}}}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -750,10 +751,10 @@ public void ShouldMutateExpressionBodiedStaticConstructor() [TestMethod] public void ShouldMutateInlineArrowFunction() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { int Add(int x, int y) => x + y; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ int Add(int x, int y) => (StrykerNamespace.MutantControl.IsActive(1)?x - y:x + y); }}"; @@ -763,10 +764,10 @@ public void ShouldMutateInlineArrowFunction() [TestMethod] public void ShouldMutateLambdaSecondParameter() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { Action act = () => Console.WriteLine(1 + 1, 1 + 1); }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ Action act = () => Console.WriteLine((StrykerNamespace.MutantControl.IsActive(1)?1 - 1:1 + 1), (StrykerNamespace.MutantControl.IsActive(2)?1 - 1:1 + 1)); }}"; @@ -776,11 +777,11 @@ public void ShouldMutateLambdaSecondParameter() [TestMethod] public void ShouldMutateLinqMethods() { - string source = @"public int TestLinq(int count){ + var source = @"public int TestLinq(int count){ var list = Enumerable.Range(1, count); return list.Last(); }"; - string expected = @"public int TestLinq(int count){if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public int TestLinq(int count){if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var list = Enumerable.Range(1, count); return (StrykerNamespace.MutantControl.IsActive(1)?list.First():list.Last()); }return default(int);}"; @@ -791,14 +792,14 @@ public void ShouldMutateLinqMethods() [TestMethod] public void ShouldMutateComplexLinqMethods() { - string source = @"private void Linq() + var source = @"private void Linq() { var array = new []{1, 2}; var alt1 = array.Count(x => x % 2 == 0); var alt2 = array.Min(); }"; - string expected = @"private void Linq() + var expected = @"private void Linq() {if(StrykerNamespace.MutantControl.IsActive(0)){}else { var array = new []{1, 2}; @@ -812,11 +813,11 @@ public void ShouldMutateComplexLinqMethods() [TestMethod] public void ShouldMutateReturnStatements() { - string source = @"private bool Move() + var source = @"private bool Move() { return true; }"; - string expected = @"private bool Move() + var expected = @"private bool Move() {if(StrykerNamespace.MutantControl.IsActive(0)){}else { return (StrykerNamespace.MutantControl.IsActive(1)?false:true); }return default(bool);}"; @@ -827,14 +828,14 @@ public void ShouldMutateReturnStatements() [TestMethod] public void ShouldMutateWhileLoop() { - string source = @"private void DummyLoop() + var source = @"private void DummyLoop() { while (this.Move()) { int x = 2 + 3; } }"; - string expected = @"private void DummyLoop() + var expected = @"private void DummyLoop() {if(StrykerNamespace.MutantControl.IsActive(0)){}else { while ((StrykerNamespace.MutantControl.IsActive(1)?!(this.Move()):this.Move())) {if(StrykerNamespace.MutantControl.IsActive(2)){}else { @@ -848,11 +849,11 @@ public void ShouldMutateWhileLoop() [TestMethod] public void ShouldMutateAssignmentStatementsWithIfStatement() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; x *= x + 2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; if(StrykerNamespace.MutantControl.IsActive(1)){ x /=x + 2; }else{ x *= (StrykerNamespace.MutantControl.IsActive(2)?x - 2:x + 2); @@ -864,12 +865,12 @@ public void ShouldMutateAssignmentStatementsWithIfStatement() [TestMethod] public void ShouldMutateRecursiveCoalescingAssignmentStatements() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { List a = null; List b = null; a ??= b ??= new List(); }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ List a = null; List b = null; if(StrykerNamespace.MutantControl.IsActive(1)){ a = b ??= new List(); @@ -883,13 +884,13 @@ public void ShouldMutateRecursiveCoalescingAssignmentStatements() [TestMethod] public void ShouldMutateRecursiveNullCoalescingStatements() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { List a = null; List b = null; List c = null; var d = a ?? b ?? c; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ List a = null; List b = null; List c = null; @@ -902,11 +903,11 @@ public void ShouldMutateRecursiveNullCoalescingStatements() [TestMethod] public void ShouldMutateIncrementStatementWithIfStatement() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; x++; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; if(StrykerNamespace.MutantControl.IsActive(1)){;}else{if(StrykerNamespace.MutantControl.IsActive(2)){ x--; }else{ x++; @@ -918,13 +919,13 @@ public void ShouldMutateIncrementStatementWithIfStatement() [TestMethod] public void ShouldNotMutateIfDisabledByComment() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; // Stryker disable all x++; x/=2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; // Stryker disable all x++; @@ -969,7 +970,7 @@ public void ShouldNotMutateIfDisabledByCommentOnStaticFields() [TestMethod] public void ShouldNotMutateIfDisabledByCommentAtMethodLevel() { - string source = @" + var source = @" // Stryker disable all : testing public void SomeMethod() { @@ -977,7 +978,7 @@ public void SomeMethod() x++; x/=2; }"; - string expected = @"// Stryker disable all : testing + var expected = @"// Stryker disable all : testing public void SomeMethod() { var x = 0; @@ -1011,13 +1012,13 @@ public void SomeMethod() [TestMethod] public void ShouldNotMutateOneLineIfDisabledByComment() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; // Stryker disable once all x++; x/=2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; // Stryker disable once all x++; @@ -1031,14 +1032,14 @@ public void ShouldNotMutateOneLineIfDisabledByComment() [TestMethod] public void ShouldNotMutateOneLineIfDisabledAndEnabledByComment() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; // Stryker disable all x++; // Stryker restore all x/=2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; // Stryker disable all x++; @@ -1054,13 +1055,13 @@ public void ShouldNotMutateOneLineIfDisabledAndEnabledByComment() [TestMethod] public void ShouldNotMutateOneLineIfDisabledOnce() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; // Stryker disable once all x++; x/=2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; // Stryker disable Update , Statement : comment x++; @@ -1076,14 +1077,14 @@ public void ShouldNotMutateOneLineIfDisabledOnce() [TestMethod] public void ShouldNotMutateOneLineIfSpecificMutatorDisabled() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; // Stryker disable Update , Statement : comment x++; // Stryker restore all x/=2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; // Stryker disable Update , Statement : comment x++; @@ -1107,13 +1108,13 @@ public void ShouldNotMutateOneLineIfSpecificMutatorDisabled() [TestMethod] public void ShouldNotMutateASubExpressionIfDisabledByComment() { - string source = @"public void SomeMethod() { + var source = @"public void SomeMethod() { var x = 0; x/= // Stryker disable once all x +2; }"; - string expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ + var expected = @"public void SomeMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var x = 0; if(StrykerNamespace.MutantControl.IsActive(1)){ x*=// Stryker disable once all x +2; @@ -1128,7 +1129,7 @@ public void ShouldNotMutateASubExpressionIfDisabledByComment() [TestMethod] public void ShouldMutateChainedMutations() { - string source = @"public void Simple() + var source = @"public void Simple() { object value = null; var flag1 = false; @@ -1137,7 +1138,7 @@ public void ShouldMutateChainedMutations() { } }"; - string expected = @"public void Simple() + var expected = @"public void Simple() {if(StrykerNamespace.MutantControl.IsActive(0)){}else { object value = null; var flag1 = (StrykerNamespace.MutantControl.IsActive(1)?true:false); @@ -1153,7 +1154,7 @@ public void ShouldMutateChainedMutations() [TestMethod] public void ShouldMutateStatics() { - string source = @"private static bool willMutateToFalse = true; + var source = @"private static bool willMutateToFalse = true; private static bool NoWorries => false; private static bool NoWorriesGetter @@ -1166,7 +1167,7 @@ static Mutator_Flag_MutatedStatics() int x = 0; var y = x++; }"; - string expected = @"private static bool willMutateToFalse = StrykerNamespace.MutantContext.TrackValue(()=>(StrykerNamespace.MutantControl.IsActive(0)?false:true)); + var expected = @"private static bool willMutateToFalse = StrykerNamespace.MutantContext.TrackValue(()=>(StrykerNamespace.MutantControl.IsActive(0)?false:true)); private static bool NoWorries => (StrykerNamespace.MutantControl.IsActive(1)?true:false); private static bool NoWorriesGetter @@ -1186,8 +1187,8 @@ static Mutator_Flag_MutatedStatics() [TestMethod] public void ShouldNotMutateDefaultValues() { - string source = @"public void SomeMethod(bool option = true) {}"; - string expected = @"public void SomeMethod(bool option = true) {}"; + var source = @"public void SomeMethod(bool option = true) {}"; + var expected = @"public void SomeMethod(bool option = true) {}"; ShouldMutateSourceInClassToExpected(source, expected); } @@ -1195,8 +1196,8 @@ public void ShouldNotMutateDefaultValues() [TestMethod] public void ShouldInitializeOutVars() { - string source = @"public void SomeMethod(out int x, out string text) { x = 1; text = ""hello"";}"; - string expected = @"public void SomeMethod(out int x, out string text) {{x= default(int);text= default(string);}if(StrykerNamespace.MutantControl.IsActive(0)){}else{ x = 1; text = (StrykerNamespace.MutantControl.IsActive(1)?"""":""hello""); + var source = @"public void SomeMethod(out int x, out string text) { x = 1; text = ""hello"";}"; + var expected = @"public void SomeMethod(out int x, out string text) {{x= default(int);text= default(string);}if(StrykerNamespace.MutantControl.IsActive(0)){}else{ x = 1; text = (StrykerNamespace.MutantControl.IsActive(1)?"""":""hello""); }}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -1205,7 +1206,7 @@ public void ShouldInitializeOutVars() [TestMethod] public void ShouldMutateInsideLambda() { - string source = @"private async Task GoodLuck() + var source = @"private async Task GoodLuck() { await SendRequest(url, HttpMethod.Get, (request) => { @@ -1213,7 +1214,7 @@ await SendRequest(url, HttpMethod.Get, (request) => request.Headers.TryAddWithoutValidation(""Date"", date); }, ensureSuccessStatusCode: false); }"; - string expected = @"private async Task GoodLuck() + var expected = @"private async Task GoodLuck() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ if(StrykerNamespace.MutantControl.IsActive(1)){;}else{ await SendRequest(url, HttpMethod.Get, (request) => {if(StrykerNamespace.MutantControl.IsActive(2)){}else { @@ -1236,7 +1237,7 @@ public void ShouldMutateDelegate() Console.WriteLine($""Hello {name}""); }; }"; - string expected = @"private void LocalFun() + var expected = @"private void LocalFun() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var test = delegate(string name) {if(StrykerNamespace.MutantControl.IsActive(1)){}else{ @@ -1257,7 +1258,7 @@ public void ShouldMutateParameterLessDelegate() Console.WriteLine(""Hello""); }; }"; - string expected = @"private void LocalFun() + var expected = @"private void LocalFun() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var test = delegate {if(StrykerNamespace.MutantControl.IsActive(1)){}else{ @@ -1271,7 +1272,7 @@ public void ShouldMutateParameterLessDelegate() [TestMethod] public void MutationsShouldHaveLinespan() { - string source = @"void TestMethod() + var source = @"void TestMethod() { var test3 = 2 + 5; }"; @@ -1288,7 +1289,7 @@ public void MutationsShouldHaveLinespan() [TestMethod] public void MutationsShouldHaveLinespan2() { - string source = @"using System; + var source = @"using System; using System.Collections.Generic; using System.Text; @@ -1319,11 +1320,11 @@ public static bool InvokeIfNotNull(this Action a) [TestMethod] public void ShouldAddReturnDefaultToMethods() { - string source = @"bool TestMethod() + var source = @"bool TestMethod() { while(true) return false; }"; - string expected = @"bool TestMethod() + var expected = @"bool TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ while((StrykerNamespace.MutantControl.IsActive(2)?!(true):(StrykerNamespace.MutantControl.IsActive(1)?false:true))) return (StrykerNamespace.MutantControl.IsActive(3)?true:false); }return default(bool);}"; @@ -1333,10 +1334,10 @@ public void ShouldAddReturnDefaultToMethods() [TestMethod] public void ShouldAddReturnDefaultToConversion() { - string source = @"public static explicit operator string(TestClass value) + var source = @"public static explicit operator string(TestClass value) { while(true) return value; }"; - string expected = @"public static explicit operator string(TestClass value) + var expected = @"public static explicit operator string(TestClass value) {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ while((StrykerNamespace.MutantControl.IsActive(2)?!(true):(StrykerNamespace.MutantControl.IsActive(1)?false:true))) return value; }return default(string);}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -1355,10 +1356,10 @@ public void ShouldNotMutateConstDeclaration() [TestMethod] public void ShouldAddReturnDefaultToAsyncMethods() { - string source = @"public async Task TestMethod() + var source = @"public async Task TestMethod() { while(true) return false; }"; - string expected = @"public async Task TestMethod() + var expected = @"public async Task TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ while((StrykerNamespace.MutantControl.IsActive(2)?!(true):(StrykerNamespace.MutantControl.IsActive(1)?false:true))) return (StrykerNamespace.MutantControl.IsActive(3)?true:false); }return default(bool);}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -1367,14 +1368,14 @@ public void ShouldAddReturnDefaultToAsyncMethods() [TestMethod] public void ShouldAddReturnDefaultToIndexerGetter() { - string source = @"public string this[string key] + var source = @"public string this[string key] { get { return key; } }"; - string expected = @"public string this[string key] + var expected = @"public string this[string key] { get {if(StrykerNamespace.MutantControl.IsActive(0)){}else { @@ -1388,7 +1389,7 @@ public void ShouldAddReturnDefaultToIndexerGetter() [TestMethod] public void ShouldNotAddReturnDefaultToEnumerationMethods() { - string source = @"public static IEnumerable Extracting(this IEnumerable enumerable, string propertyName) + var source = @"public static IEnumerable Extracting(this IEnumerable enumerable, string propertyName) { foreach (var o in enumerable) { @@ -1399,7 +1400,7 @@ public static IEnumerable Extracting(this IEnumerable enumerable) { yield break; }"; - string expected = @"public static IEnumerable Extracting(this IEnumerable enumerable, string propertyName) + var expected = @"public static IEnumerable Extracting(this IEnumerable enumerable, string propertyName) {if(StrykerNamespace.MutantControl.IsActive(0)){}else { foreach (var o in enumerable) {if(StrykerNamespace.MutantControl.IsActive(1)){}else { @@ -1416,10 +1417,10 @@ public static IEnumerable Extracting(this IEnumerable enumerable) [TestMethod] public void ShouldAddReturnDefaultToAsyncWithFullNamespaceMethods() { - string source = @"public async System.Threading.Tasks.Task TestMethod() + var source = @"public async System.Threading.Tasks.Task TestMethod() { while(true) return false; }"; - string expected = @"public async System.Threading.Tasks.Task TestMethod() + var expected = @"public async System.Threading.Tasks.Task TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ while((StrykerNamespace.MutantControl.IsActive(2)?!(true):(StrykerNamespace.MutantControl.IsActive(1)?false:true))) return (StrykerNamespace.MutantControl.IsActive(3)?true:false); }return default(bool);}"; ShouldMutateSourceInClassToExpected(source, expected); @@ -1428,11 +1429,11 @@ public void ShouldAddReturnDefaultToAsyncWithFullNamespaceMethods() [TestMethod] public void ShouldNotAddReturnDefaultToAsyncTaskMethods() { - string source = @"public async Task TestMethod() + var source = @"public async Task TestMethod() { ; }"; - string expected = @"public async Task TestMethod() + var expected = @"public async Task TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ ; }}"; @@ -1442,11 +1443,11 @@ public void ShouldNotAddReturnDefaultToAsyncTaskMethods() [TestMethod] public void ShouldNotAddReturnDefaultToMethodsWithReturnTypeVoid() { - string source = @"void TestMethod() + var source = @"void TestMethod() { ; }"; - string expected = @"void TestMethod() + var expected = @"void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ ; }}"; @@ -1461,7 +1462,7 @@ public void ShouldNotAddReturnDefaultToMethodsWithReturnTypeVoid() [DataRow("{;}")] public void ShouldNotAddReturnOnSomeBlocks(string code) { - string source = @$" + var source = @$" int TestMethod() // Stryker disable all {code}"; @@ -1471,14 +1472,14 @@ int TestMethod() [TestMethod] public void ShouldSkipStringsInSwitchExpression() { - string source = @"string TestMethod() + var source = @"string TestMethod() { return input switch { ""test"" => ""test"" }; }"; - string expected = @"string TestMethod() + var expected = @"string TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ return input switch { @@ -1551,12 +1552,12 @@ public void ShouldMutatePropertiesInArrowFormEvenWithComplexConstruction() [TestMethod] public void ShouldMutateConditionalExpression() { - string source = @"void TestMethod() + var source = @"void TestMethod() { var a = 1; var x = a == 1 ? 5 : 7; }"; - string expected = @"void TestMethod() + var expected = @"void TestMethod() {if(StrykerNamespace.MutantControl.IsActive(0)){}else{ var a = 1; var x = (StrykerNamespace.MutantControl.IsActive(2)?(false?5 :7):(StrykerNamespace.MutantControl.IsActive(1)?(true?5 :7):(StrykerNamespace.MutantControl.IsActive(3)?a != 1 :a == 1 )? 5 : 7)); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs index 52d3e0e291..cdc3b9ee30 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantOrchestratorTestsBase.cs @@ -1,10 +1,12 @@ using Microsoft.CodeAnalysis.CSharp; -using Stryker.Abstractions.InjectedHelpers; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; using Stryker.Abstractions; +using Stryker.Core.Mutants; +using Stryker.Core.InjectedHelpers; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest.Mutants +namespace Stryker.Core.UnitTest.Mutants { /// /// This base class provides helper to test source file mutation diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs index 3bbcb8305c..4dc04ed92e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantPlacerTests.cs @@ -1,20 +1,20 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.InjectedHelpers; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; +using Stryker.Core.InjectedHelpers; +using Stryker.Core.Mutants; +using Stryker.Core.Mutants.CsharpNodeOrchestrators; -namespace Stryker.Abstractions.UnitTest.Mutants +namespace Stryker.Core.UnitTest.Mutants { [TestClass] public class MutantPlacerTests : TestBase @@ -178,7 +178,7 @@ public void ShouldConvertPropertyExpressionBodyBackAndForth() CheckMutantPlacerProperlyPlaceAndRemoveHelpers(source, expected, placer.ConvertToBlockBody); } - + [TestMethod] public void ShouldInjectInitializersAndRestore() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs index e6d116e384..585ca432a2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutants/MutantTests.cs @@ -2,8 +2,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.UnitTest.Mutants +namespace Stryker.Core.UnitTest.Mutants { [TestClass] public class MutantTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs index da9720306f..7479116133 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/CSharpMutationTestProcessTests.cs @@ -5,17 +5,17 @@ using System.Reflection; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; using Mutation = Stryker.Abstractions.Mutants.Mutation; -namespace Stryker.Abstractions.UnitTest.MutationTest +namespace Stryker.Core.UnitTest.MutationTest { [TestClass] public class CSharpMutationTestProcessTests : TestBase @@ -88,7 +88,7 @@ public void MutateShouldWriteToDisk_IfCompilationIsSuccessful() orchestratorMock.SetupAllProperties(); orchestratorMock.Setup(x => x.GetLatestMutantBatch()).Returns(mockMutants); - var target = new CsharpMutationProcess( fileSystem, options, null, orchestratorMock.Object); + var target = new CsharpMutationProcess(fileSystem, options, null, orchestratorMock.Object); target.Mutate(input); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs index ae584b8c4c..1b1f0eb16b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs @@ -5,11 +5,12 @@ using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; using Stryker.Abstractions.Options; +using Stryker.Core.TestRunners; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners.VsTest; -namespace Stryker.Abstractions.UnitTest.MutationTest; +namespace Stryker.Core.UnitTest.MutationTest; /// /// This class simplifies the creation of run scenarios @@ -168,10 +169,10 @@ public Mock GetTestRunnerMock() string.Empty, Enumerable.Empty(), TimeSpan.Zero); - runnerMock.Setup(x => x.DiscoverTests( It.IsAny())).Returns(true); - runnerMock.Setup(x => x.GetTests( It.IsAny())).Returns(TestSet); - runnerMock.Setup(x => x.InitialTest( It.IsAny())).Returns(GetRunResult(InitialRunId)); - runnerMock.Setup(x => x.CaptureCoverage( It.IsAny())) + runnerMock.Setup(x => x.DiscoverTests(It.IsAny())).Returns(true); + runnerMock.Setup(x => x.GetTests(It.IsAny())).Returns(TestSet); + runnerMock.Setup(x => x.InitialTest(It.IsAny())).Returns(GetRunResult(InitialRunId)); + runnerMock.Setup(x => x.CaptureCoverage(It.IsAny())) .Returns(() => { var result = new List(_tests.Count); @@ -184,7 +185,7 @@ public Mock GetTestRunnerMock() } return result; }); - runnerMock.Setup(x => x.TestMultipleMutants( It.IsAny(), It.IsAny(), + runnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny())). Callback((Action, TestUpdateHandler>)((_, test1, list, update) => diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs index ace8840387..f562c47f99 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestExecutorTests.cs @@ -1,16 +1,19 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; -namespace Stryker.Abstractions.UnitTest.MutationTest +namespace Stryker.Core.UnitTest.MutationTest { [TestClass] public class MutationTestExecutorTests : TestBase @@ -20,14 +23,14 @@ public void MutationTestExecutor_NoFailedTestShouldBeSurvived() { var testRunnerMock = new Mock(MockBehavior.Strict); var mutant = new Mutant { Id = 1 }; - testRunnerMock.Setup(x => x.TestMultipleMutants( It.IsAny(),It.IsAny(), It.IsAny>(), null)).Returns(new TestRunResult(true)); + testRunnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), It.IsAny>(), null)).Returns(new TestRunResult(true)); var target = new MutationTestExecutor(testRunnerMock.Object); - target.Test(null, new List { mutant }, null, null); + target.Test(null, new List { mutant }, null, null); mutant.ResultStatus.ShouldBe(MutantStatus.Survived); - testRunnerMock.Verify(x => x.TestMultipleMutants( It.IsAny(),It.IsAny(), It.IsAny>(), null), Times.Once); + testRunnerMock.Verify(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), It.IsAny>(), null), Times.Once); } [TestMethod] @@ -35,14 +38,14 @@ public void MutationTestExecutor_FailedTestShouldBeKilled() { var testRunnerMock = new Mock(MockBehavior.Strict); var mutant = new Mutant { Id = 1, CoveringTests = TestGuidsList.EveryTest() }; - testRunnerMock.Setup(x => x.TestMultipleMutants( It.IsAny(),null, It.IsAny>(), null)).Returns(new TestRunResult(false)); + testRunnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), null, It.IsAny>(), null)).Returns(new TestRunResult(false)); var target = new MutationTestExecutor(testRunnerMock.Object); - target.Test(null,new List { mutant }, null, null); + target.Test(null, new List { mutant }, null, null); mutant.ResultStatus.ShouldBe(MutantStatus.Killed); - testRunnerMock.Verify(x => x.TestMultipleMutants( It.IsAny(),null, It.IsAny>(), null), Times.Once); + testRunnerMock.Verify(x => x.TestMultipleMutants(It.IsAny(), null, It.IsAny>(), null), Times.Once); } [TestMethod] @@ -50,16 +53,16 @@ public void MutationTestExecutor_TimeoutShouldBePassedToProcessTimeout() { var testRunnerMock = new Mock(MockBehavior.Strict); var mutant = new Mutant { Id = 1, CoveringTests = TestGuidsList.EveryTest() }; - testRunnerMock.Setup(x => x.TestMultipleMutants( It.IsAny(),It.IsAny(), It.IsAny>(), null)). + testRunnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), It.IsAny>(), null)). Returns(TestRunResult.TimedOut(new List(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.EveryTest(), "", Enumerable.Empty(), TimeSpan.Zero)); var target = new MutationTestExecutor(testRunnerMock.Object); var timeoutValueCalculator = new TimeoutValueCalculator(500); - target.Test(null, new List { mutant }, timeoutValueCalculator, null); + target.Test(null, new List { mutant }, timeoutValueCalculator, null); mutant.ResultStatus.ShouldBe(MutantStatus.Timeout); - testRunnerMock.Verify(x => x.TestMultipleMutants( It.IsAny(), timeoutValueCalculator, It.IsAny>(), null), Times.Once); + testRunnerMock.Verify(x => x.TestMultipleMutants(It.IsAny(), timeoutValueCalculator, It.IsAny>(), null), Times.Once); } [TestMethod] @@ -68,17 +71,17 @@ public void MutationTestExecutor_ShouldSwitchToSingleModeOnDubiousTimeouts() var testRunnerMock = new Mock(MockBehavior.Strict); var mutant1 = new Mutant { Id = 1, CoveringTests = TestGuidsList.EveryTest() }; var mutant2 = new Mutant { Id = 2, CoveringTests = TestGuidsList.EveryTest() }; - testRunnerMock.Setup(x => x.TestMultipleMutants( It.IsAny(),It.IsAny(), It.IsAny>(), null)). + testRunnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), It.IsAny>(), null)). Returns(TestRunResult.TimedOut(new List(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), TestGuidsList.NoTest(), "", Enumerable.Empty(), TimeSpan.Zero)); var target = new MutationTestExecutor(testRunnerMock.Object); var timeoutValueCalculator = new TimeoutValueCalculator(500); - target.Test(null, new List { mutant1, mutant2 }, timeoutValueCalculator, null); + target.Test(null, new List { mutant1, mutant2 }, timeoutValueCalculator, null); mutant1.ResultStatus.ShouldBe(MutantStatus.Timeout); mutant2.ResultStatus.ShouldBe(MutantStatus.Timeout); - testRunnerMock.Verify(x => x.TestMultipleMutants( It.IsAny(),timeoutValueCalculator, It.IsAny>(), null), Times.Exactly(3)); + testRunnerMock.Verify(x => x.TestMultipleMutants(It.IsAny(), timeoutValueCalculator, It.IsAny>(), null), Times.Exactly(3)); } } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs index 5508e743b5..70c8089737 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/MutationTestProcessTests.cs @@ -3,22 +3,23 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Abstractions.Reporting; using Stryker.Abstractions.Options; - -namespace Stryker.Abstractions.UnitTest.MutationTest +using Stryker.Abstractions.Reporting; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; + +namespace Stryker.Core.UnitTest.MutationTest { [TestClass] public class MutationTestProcessTests : TestBase @@ -142,7 +143,7 @@ public void ShouldCallExecutorForEveryMutantWhenNoOptimization() }); var reporterMock = new Mock(MockBehavior.Strict); - reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); + reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); var mutationExecutor = new MutationTestExecutor(_testScenario.GetTestRunnerMock().Object); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs index a8ff403a0f..d8cb8d0f02 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AbstractMutatorTests.cs @@ -9,9 +9,11 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; +using Stryker.Core.UnitTest; [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class AbstractMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs index a123a55928..98f15c9237 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ArrayCreationMutatorTests.cs @@ -1,10 +1,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class ArrayCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs index 395eccf336..c7be1e4d35 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/AssignmentStatementMutatorTests.cs @@ -1,12 +1,13 @@ +using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class AssignmentStatementMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs index 1a973cddae..b0ff8be547 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BinaryExpressionMutatorTests.cs @@ -4,8 +4,10 @@ using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class BinaryExpressionMutatorTests : TestBase @@ -54,7 +56,7 @@ public void ShouldMutate(Mutator expectedKind, SyntaxKind input, params SyntaxKi // there should be two mutations result.Count.ShouldBe(2, "Two mutations should have been made"); } - int index = 0; + var index = 0; foreach (var mutation in result) { mutation.ReplacementNode.IsKind(expectedOutput[index]).ShouldBeTrue(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs index d5c4fa948d..5e54bf90b3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BlockMutatorTests.cs @@ -2,12 +2,11 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Mutators; -using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.Mutators.Mutators { [TestClass] public class BlockMutatorTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs index fabbb025cb..60149603fb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/BooleanMutatorTests.cs @@ -1,11 +1,12 @@ +using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class BooleanMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs index a8a160d286..3697a440e2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/CheckedMutatorTests.cs @@ -1,12 +1,12 @@ +using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class CheckedMutatorTests : TestBase @@ -24,7 +24,7 @@ public void ShouldMutate(SyntaxKind original, string expression, SyntaxKind expe { var target = new CheckedMutator(); - ExpressionSyntax es = SyntaxFactory.ParseExpression(expression); + var es = SyntaxFactory.ParseExpression(expression); var result = target.ApplyMutations(SyntaxFactory.CheckedExpression(original, es), null).ToList(); var mutation = result.ShouldHaveSingleItem(); @@ -39,7 +39,7 @@ public void ShouldNotMutate(SyntaxKind original) { var target = new CheckedMutator(); - ExpressionSyntax es = SyntaxFactory.ParseExpression("4 + 2"); + var es = SyntaxFactory.ParseExpression("4 + 2"); var result = target.ApplyMutations(SyntaxFactory.CheckedExpression(original, es), null).ToList(); result.ShouldBeEmpty(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs index 947ddb6da4..ca473809e1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ConditionalExpressionMutatorTests.cs @@ -1,13 +1,13 @@ +using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Shouldly; -using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators; +namespace Stryker.Core.UnitTest.Mutators; [TestClass] public class ConditionalExpressionMutatorTests : TestBase @@ -58,7 +58,7 @@ public void ShouldNotMutateDeclarationPatterns() { var target = new ConditionalExpressionMutator(); var source = "var y = x is object result ? result.ToString() : null;"; - SyntaxTree tree = CSharpSyntaxTree.ParseText(source); + var tree = CSharpSyntaxTree.ParseText(source); var expressionSyntax = tree.GetRoot().DescendantNodes().OfType().Single(); var result = target.ApplyMutations(expressionSyntax, null).ToList(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs index 9780565e26..07091170d4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InitializerMutatorTests.cs @@ -1,11 +1,12 @@ +using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Collections.Generic; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class InitializerMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs index dbf4cc22b6..f21b156503 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/InterpolatedStringMutatorTests.cs @@ -1,11 +1,12 @@ +using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class InterpolatedStringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs index abcc2afbfe..85114f29ce 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/IsPatternExpressionMutatorTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Shouldly; -using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class IsPatternExpressionMutatorTests : TestBase @@ -103,7 +103,7 @@ public void ShouldNotMutateNotSupportedPatterns(IsPatternExpressionSyntax expres private IsPatternExpressionSyntax GenerateSimpleConstantPattern(bool isNotPattern) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication @@ -126,7 +126,7 @@ static void Main(string[] args) private IsPatternExpressionSyntax GenerateWithRelationalPattern(string @operator) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication @@ -149,7 +149,7 @@ static void Main(string[] args) private IsPatternExpressionSyntax GenerateWithBinaryPattern(string pattern) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs index 7c5b133b53..e79f35da0d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/LinqMutatorTest.cs @@ -1,13 +1,13 @@ -using Microsoft.CodeAnalysis; +using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Shouldly; -using Stryker.Abstractions.Mutators; -using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; using Stryker.Abstractions; +using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class LinqMutatorTest : TestBase @@ -102,9 +102,9 @@ public void ShouldMutate(LinqExpression original, LinqExpression expected) var mutation = result.ShouldHaveSingleItem(); var replacement = mutation.ReplacementNode.ShouldBeOfType(); - replacement.Name.Identifier.ValueText.ShouldBe(expected.ToString()); + replacement.Name.Identifier.ValueText.ShouldBe(expected.ToString()); - mutation.DisplayName.ShouldBe($"Linq method mutation ({ original }() to { expected }())"); + mutation.DisplayName.ShouldBe($"Linq method mutation ({original}() to {expected}())"); } /// diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs index 6252f94faf..d6f0dcbb44 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/MathMutatorTest.cs @@ -7,8 +7,10 @@ using Shouldly; using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class MathMutatorTest : TestBase @@ -20,7 +22,7 @@ public class MathMutatorTest : TestBase /// private InvocationExpressionSyntax GenerateClassCallExpression(string memberName, string expression) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication @@ -48,7 +50,7 @@ static void Main(string[] args) /// private InvocationExpressionSyntax GenerateStaticCallExpression(string expression) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; using static System.Math; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs index b0f79ae784..6966110c8d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NegateConditionMutatorTests.cs @@ -1,12 +1,12 @@ -using Microsoft.CodeAnalysis; +using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators; +namespace Stryker.Core.UnitTest.Mutators; [TestClass] public class NegateConditionMutatorTests : TestBase @@ -25,7 +25,7 @@ public void ShouldBeMutationLevelStandard() /// private InvocationExpressionSyntax GenerateExpressions(string expression) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication @@ -67,7 +67,7 @@ public void MutatesStatementWithMethodCallWithNoArguments(string method) public void ShouldNotMutateThis(string method) { var target = new NegateConditionMutator(); - SyntaxTree tree = CSharpSyntaxTree.ParseText(method); + var tree = CSharpSyntaxTree.ParseText(method); var expressionSyntax = tree.GetRoot().DescendantNodes().OfType().Single(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs index 4e8fb3c417..180680cffd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/NullCoalescingExpressionMutatorTests.cs @@ -1,12 +1,13 @@ +using System.Linq; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.CodeAnalysis; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators; +namespace Stryker.Core.UnitTest.Mutators; [TestClass] public class NullCoalescingExpressionMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs index d4665e2a16..26f1833598 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/ObjectCreationMutatorTests.cs @@ -1,11 +1,11 @@ -using Microsoft.Build.Logging.StructuredLogger; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class ObjectCreationMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs index cec84d3cd0..74d67d3d17 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PostfixUnaryMutatorTests.cs @@ -4,34 +4,34 @@ using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators; + +[TestClass] +public class PostfixUnaryMutatorTests : TestBase { - [TestClass] - public class PostfixUnaryMutatorTests : TestBase + [TestMethod] + public void ShouldBeMutationLevelStandard() { - [TestMethod] - public void ShouldBeMutationLevelStandard() - { - var target = new PostfixUnaryMutator(); - target.MutationLevel.ShouldBe(MutationLevel.Standard); - } + var target = new PostfixUnaryMutator(); + target.MutationLevel.ShouldBe(MutationLevel.Standard); + } - [TestMethod] - [DataRow(SyntaxKind.PostIncrementExpression, SyntaxKind.PostDecrementExpression)] - [DataRow(SyntaxKind.PostDecrementExpression, SyntaxKind.PostIncrementExpression)] - public void ShouldMutate(SyntaxKind original, SyntaxKind expected) - { - var target = new PostfixUnaryMutator(); - var originalNode = SyntaxFactory.PostfixUnaryExpression(original, - SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1))); + [TestMethod] + [DataRow(SyntaxKind.PostIncrementExpression, SyntaxKind.PostDecrementExpression)] + [DataRow(SyntaxKind.PostDecrementExpression, SyntaxKind.PostIncrementExpression)] + public void ShouldMutate(SyntaxKind original, SyntaxKind expected) + { + var target = new PostfixUnaryMutator(); + var originalNode = SyntaxFactory.PostfixUnaryExpression(original, + SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1))); - var result = target.ApplyMutations(originalNode, null).ToList(); + var result = target.ApplyMutations(originalNode, null).ToList(); - var mutation = result.ShouldHaveSingleItem(); - mutation.ReplacementNode.IsKind(expected).ShouldBeTrue(); - mutation.Type.ShouldBe(Mutator.Update); - mutation.DisplayName.ShouldBe($"{original} to {expected} mutation"); - } + var mutation = result.ShouldHaveSingleItem(); + mutation.ReplacementNode.IsKind(expected).ShouldBeTrue(); + mutation.Type.ShouldBe(Mutator.Update); + mutation.DisplayName.ShouldBe($"{original} to {expected} mutation"); } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs index 35c4a8ffb0..2478455076 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/PrefixUnaryMutatorTests.cs @@ -1,11 +1,12 @@ +using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class PrefixUnaryMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs index ca7e67a1b1..aba888af76 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/RegexMutatorTest.cs @@ -1,11 +1,12 @@ +using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using System.Linq; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class RegexMutatorTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs index a93caa0193..41e996e6ad 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StatementMutatorTests.cs @@ -2,11 +2,12 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class StatementMutatorTests : TestBase @@ -52,7 +53,7 @@ void Method() {{ [TestMethod] public void ShouldNotMutate() { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" namespace Test {{ class Program diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs index 6c3a5b3154..705a3bf83d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringEmptyMutatorTests.cs @@ -5,8 +5,9 @@ using Shouldly; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class StringEmptyMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs index 5ff79571af..477182126e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMethodMutatorTests.cs @@ -5,8 +5,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators; +namespace Stryker.Core.UnitTest.Mutators; [TestClass] public class StringMethodMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs index 96871644a3..08c1186613 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/StringMutatorTests.cs @@ -4,8 +4,9 @@ using Stryker.Abstractions.Mutators; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class StringMutatorTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs index a58267d373..248bf3410c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/SwitchExpressionMutatorTests.cs @@ -3,11 +3,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Shouldly; -using Stryker.Abstractions.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.Mutators; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { [TestClass] public class SwitchExpressionMutatorTests : TestBase @@ -75,7 +75,7 @@ public void ShouldNotMutateNotSupportedPatterns(SwitchExpressionSyntax expressio private SwitchExpressionSyntax GenerateWithRelationalPattern(string @operator) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication @@ -101,7 +101,7 @@ static void Main(string[] args) private SwitchExpressionSyntax GenerateWithBinaryPattern(string pattern) { - SyntaxTree tree = CSharpSyntaxTree.ParseText($@" + var tree = CSharpSyntaxTree.ParseText($@" using System; namespace TestApplication diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs index 13be99e5e2..f03157f854 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Mutators/TestMutator.cs @@ -1,6 +1,6 @@ using Stryker.Utilities.Attributes; -namespace Stryker.Abstractions.UnitTest.Mutators +namespace Stryker.Core.UnitTest.Mutators { public enum TestMutator { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs index 83cc7b8071..e673f10a63 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AdditionalTimeoutMsInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class AdditionalTimeoutMsInputTests : TestBase @@ -26,7 +27,7 @@ public void ShouldAllowZero() result.ShouldBe(0); } - + [TestMethod] public void ShouldHaveDefault() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs index d403cd54fc..6c028dbb0f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageSasInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Baseline; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageSasInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs index bf0ed841a7..cf0ee72a94 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/AzureFileStorageUrlInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Baseline; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class AzureFileStorageUrlInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs index f5cd10b666..37e9b6a4cb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BasePathInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class BasePathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs index d31e2ec169..8a8751cb7c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BaselineProviderInputTests.cs @@ -2,11 +2,12 @@ using Shouldly; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class BaselineProviderInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs index 618093f403..5b2767d98d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/BreakOnInitialTestFailureInputTests.cs @@ -1,8 +1,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class BreakOnInitialTestFailureInputTests : TestBase @@ -13,7 +14,7 @@ public void ShouldHaveHelpText() var target = new BreakOnInitialTestFailureInput(); target.HelpText.ShouldBe(@"Instruct Stryker to break execution when at least one test failed on initial run. | default: 'False'"); } - + [TestMethod] [DataRow(null, false)] [DataRow(false, false)] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs index ae549dec98..71920f63b1 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConcurrencyInputTests.cs @@ -5,8 +5,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ConcurrencyInputTests : TestBase @@ -71,7 +72,7 @@ public void WhenGiven1ShouldPrintWarning() _loggerMock.Verify(LogLevel.Warning, "Stryker is running in single threaded mode due to concurrency being set to 1.", Times.Once); _loggerMock.VerifyNoOtherCalls(); } - + [TestMethod] public void WhenGivenNullShouldGetDefault() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs index 89f4d51ce9..0fe60a063e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ConfigurationInputTests.cs @@ -3,7 +3,7 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Abstractions.UnitTest.Options.Inputs; +namespace Stryker.Core.UnitTest.Options.Inputs; [TestClass] public class ConfigurationInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs index 1454627443..96fe75265a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardApiKeyInputTests.cs @@ -2,11 +2,12 @@ using Shouldly; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DashboardApiKeyInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs index 8c78313a7e..a26fa069bf 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DashboardUrlInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DashboardUrlInputTests : TestBase @@ -24,7 +25,7 @@ public void ShouldHaveDefault() defaultValue.ShouldBe("https://dashboard.stryker-mutator.io"); } - + [TestMethod] public void ShouldAllowValidUri() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs index 7f50fc816f..2a47b02836 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DevModeInputTests.cs @@ -1,8 +1,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DevModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs index c45956226f..b7b1abadd0 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DiffIgnoreChangesInputTests.cs @@ -2,8 +2,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DiffIgnoreChangesInputTests : TestBase @@ -29,7 +30,7 @@ public void ShouldAcceptGlob() result.ShouldHaveSingleItem().Glob.ToString().ShouldBe("*"); } - + [TestMethod] public void ShouldParseAll() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs index 2aa2f889f8..79efef02f5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableBailInputTests.cs @@ -3,7 +3,7 @@ using Stryker.Abstractions.Options; using Stryker.Abstractions.Options.Inputs; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DisableBailInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs index 02e34fbabd..8bbbf60e4e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/DisableMixMutantsInputTests.cs @@ -1,10 +1,9 @@ using Shouldly; -using Stryker.Abstractions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class DisableMixMutantsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs index bc635b05b8..a4955ef2bc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/FallbackVersionInputTests.cs @@ -1,8 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Options.Inputs; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class FallbackVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs index 6499e6ccda..a807db7492 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMethodsInputTests.cs @@ -3,7 +3,7 @@ using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class IgnoreMethodsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs index 2a0890a9c9..61685c1ba5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/IgnoreMutationsInputTests.cs @@ -5,11 +5,12 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Mutators; using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.UnitTest.Mutators; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions; +using Stryker.Core.UnitTest.Mutators; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class IgnoreMutationsInputTests : TestBase @@ -55,10 +56,13 @@ public void ShouldIgnoreMutatorWithOptions() [TestMethod] public void ShouldReturnMultipleMutators() { - var target = new IgnoreMutationsInput { SuppliedInput = new[] { + var target = new IgnoreMutationsInput + { + SuppliedInput = new[] { Mutator.String.ToString(), Mutator.Regex.ToString(), - } }; + } + }; var result = target.Validate(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs index a9f4e504ef..5082c2995d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LanguageVersionInputTests.cs @@ -6,8 +6,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class LanguageVersionInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs index d736ef8e4f..5d51d52d15 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/LogToFileInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class LogToFileInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs index af0763a6e6..2cc45b8175 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ModuleNameInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ModuleNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs index d6df02a5e0..f320c45358 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MsBuildPathInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class MsBuildPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs index 5d1729c75e..7171f6c647 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutateInputTests.cs @@ -3,8 +3,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class MutateInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs index cacd909b86..7fa22470eb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/MutationLevelInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Mutators; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class MutationLevelInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs index e57f069467..307c3d39c3 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportEnabledInputTests.cs @@ -1,8 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Options.Inputs; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class OpenReportEnabledInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs index 8d1f91e040..06d7c3c9a7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OpenReportInputTests.cs @@ -1,9 +1,10 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.Options.Inputs; -using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class OpenReportInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs index c79e6ad616..f1c951a643 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OptimizationModeInputTests.cs @@ -1,11 +1,10 @@ using Shouldly; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class OptimizationModeInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs index 715894d4a0..631d4dbd2c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/OutputPathInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class OutputPathInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs index bda3292964..1613b8fdfa 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectNameInputTests.cs @@ -1,8 +1,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Options.Inputs; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs index 569528acf5..239b21f1d4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ProjectVersionInputTests.cs @@ -2,10 +2,11 @@ using Shouldly; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ProjectVersionInputTests : TestBase @@ -61,7 +62,8 @@ public void ProjectVersion_CannotBeEmpty_WhenBaselineEnabled() { var input = new ProjectVersionInput(); - var exception = Should.Throw(() => { + var exception = Should.Throw(() => + { input.Validate(reporters: Enumerable.Empty(), withBaseline: true); }); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs index 6918aec6bd..e7c23e731f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportFileNameInputTests.cs @@ -3,8 +3,9 @@ using Shouldly; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ReportFileNameInputTests : TestBase @@ -64,7 +65,7 @@ public void ShouldStripHtmlAndJsonFileExtensions() [TestMethod] public void ShouldNotStripNoneHtmlAndJsonFileExtensions() { - string input = $"{DefaultName}.project"; + var input = $"{DefaultName}.project"; var target = new ReportFileNameInput() { SuppliedInput = input }; target.Validate().ShouldBe(input); } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs index 9d784df329..5e2ce51208 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportOpenerTests.cs @@ -1,9 +1,10 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Stryker.Abstractions.Exceptions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.Options.Inputs; -using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ReportOpenerTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs index 146c4a5e7f..be712babee 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ReportersInputTests.cs @@ -2,10 +2,10 @@ using Shouldly; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.Reporters; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ReportersInputTests : TestBase @@ -42,7 +42,9 @@ public void ShouldReturnReporter() [TestMethod] public void ShouldReturnReporters() { - var target = new ReportersInput { SuppliedInput = new[] { + var target = new ReportersInput + { + SuppliedInput = new[] { Reporter.Html.ToString(), Reporter.Json.ToString(), Reporter.Progress.ToString(), @@ -51,7 +53,8 @@ public void ShouldReturnReporters() Reporter.ClearTextTree.ToString(), Reporter.Dashboard.ToString(), Reporter.Dots.ToString(), - } }; + } + }; var result = target.Validate(false); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs index 4ecdc09dbb..bd943efbf9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class SinceInputTests : TestBase @@ -66,7 +67,7 @@ public void ShouldBeImplicitlyEnabledWithBaseline() [TestMethod] public void ShouldNotBeAllowedToExplicitlyEnableWithBaseline() { - var sinceEnabled = new SinceInput{SuppliedInput = true }; + var sinceEnabled = new SinceInput { SuppliedInput = true }; var exception = Should.Throw(() => sinceEnabled.Validate(withBaseline: true)); exception.Message.ShouldBe("The since and baseline features are mutually exclusive."); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs index 023fbb1bd2..5a41239a66 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SinceTargetInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class SinceTargetInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs index 886bb11f70..6ef5a8c675 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SolutionInputTests.cs @@ -4,8 +4,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class SolutionInputTests : TestBase @@ -106,7 +107,7 @@ public void ShouldThrowWhenNotExists() var dir = Directory.GetCurrentDirectory(); var fileSystem = new MockFileSystem(); fileSystem.AddDirectory(dir); - + var ex = Should.Throw(() => { input.Validate(dir, fileSystem); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs index 331f91ce41..edcc66f3e6 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/SourceProjectNameInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class SourceProjectNameInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs index adf5a800aa..c82531c6fb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TargetFrameworkInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class TargetFrameworkInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs index 0164ba49aa..783ad07dac 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestCaseFilterInputTests.cs @@ -1,8 +1,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class TestCaseFilterInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs index aa31eb0841..a0fd244d3f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/TestProjectsInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Utilities; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class TestProjectsInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs index e36091db05..ab5ac4dbce 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdBreakInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ThresholdBreakInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs index 6d6e7053b0..32e4141d0a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdHighInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ThresholdHighInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs index c4dff4eea6..628ffef08f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/ThresholdLowInputTests.cs @@ -2,8 +2,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class ThresholdLowInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs index d167f14169..75079a085e 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/VerbosityInputTests.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class VerbosityInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs index d470dc2952..b0dde35e14 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/Inputs/WithBaselineInputTests.cs @@ -1,8 +1,9 @@ using Shouldly; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Options.Inputs +namespace Stryker.Core.UnitTest.Options.Inputs { [TestClass] public class WithBaselineInputTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs index 6fcc0898a4..f2f3ddce0f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Options/StrykerInputsTests.cs @@ -1,13 +1,12 @@ using System.IO; using Shouldly; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions; using Stryker.Abstractions.Options.Inputs; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.UnitTest.Options +namespace Stryker.Core.UnitTest.Options { [TestClass] public class StrykerInputsTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs index a41349a0d7..db7a4c8094 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/CsharpProjectComponentTests.cs @@ -4,8 +4,10 @@ using Stryker.Abstractions.ProjectComponents; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; -namespace Stryker.Abstractions.UnitTest.ProjectComponents +namespace Stryker.Core.UnitTest.ProjectComponents { [TestClass] public class CsharpProjectComponentTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs index 9961d4af5f..77c23727b9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/SourceProjects/SourceProjectInfoTests.cs @@ -2,10 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; -using Stryker.Abstractions.Initialisation.Buildalyzer; -using Stryker.Abstractions.ProjectComponents.SourceProjects; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.ProjectComponents.SourceProjects; -namespace Stryker.Abstractions.UnitTest.ProjectComponents.SourceProjects +namespace Stryker.Core.UnitTest.ProjectComponents.SourceProjects { [TestClass] public class SourceProjectInfoTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs index b66b7782e8..54fbd24fc9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestCaseTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; -using Shouldly; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestCaseTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs index d456819835..bd799483ad 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestFileTests.cs @@ -1,10 +1,10 @@ using System; using Microsoft.CodeAnalysis.CSharp; -using Shouldly; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestFileTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs index eb31659dda..0c514803b2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectTests.cs @@ -3,11 +3,11 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Shouldly; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shouldly; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs index 00561a48b5..556219b834 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ProjectComponents/TestProjects/TestProjectsInfoTests.cs @@ -8,12 +8,12 @@ using Microsoft.Extensions.Logging.Abstractions; using Moq; using Shouldly; -using Stryker.Abstractions.Initialisation.Buildalyzer; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Utilities; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.UnitTest.ProjectComponents.TestProjects +namespace Stryker.Core.UnitTest.ProjectComponents.TestProjects { [TestClass] public class TestProjectsInfoTests : TestBase @@ -211,7 +211,7 @@ public void RestoreOriginalAssembly_IgnoreIfBackupIsAbsent() Mock.Get(file).VerifyAll(); } - + [TestMethod] public void RestoreOriginalAssembly_IgnoreIfBackupCopyFails() { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs index 7b60542cb2..42586271b9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BaselineReporterTests.cs @@ -1,13 +1,14 @@ -using Moq; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.Reporters.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Moq; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; +using Stryker.Core.Reporters.Json; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class BaselineReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs index 70b5f12f2b..87356adf45 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/BroadcastReporterTests.cs @@ -1,15 +1,17 @@ using System.Collections.ObjectModel; using System.IO.Abstractions.TestingHelpers; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Reporting; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class BroadcastReporterTests : TestBase @@ -57,7 +59,7 @@ public void BroadcastReporter_ShouldInvokeSameMethodWithSameObject_OnMutantsCrea public void BroadcastReporter_ShouldInvokeSameMethodWithSameObject_OnMutantTested() { var reporterMock = new Mock(MockBehavior.Strict); - reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); + reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); var exampleInputComponent = new CsharpFileLeaf(); var exampleMutant = new Mutant(); @@ -80,7 +82,7 @@ public void BroadcastReporter_ShouldInvokeAllReportersInList() var reporterMock = new Mock(MockBehavior.Strict); reporterMock.Setup(x => x.OnAllMutantsTested(It.IsAny(), It.IsAny())); reporterMock.Setup(x => x.OnMutantsCreated(It.IsAny(), It.IsAny())); - reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); + reporterMock.Setup(x => x.OnMutantTested(It.IsAny())); var exampleTestProjectsInfo = new TestProjectsInfo(mockFileSystem); var exampleInputComponent = new CsharpFileLeaf(); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs index c05ff0e65f..9ac51430d5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextReporterTests.cs @@ -6,14 +6,15 @@ using Moq; using Shouldly; using Spectre.Console.Testing; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class ClearTextReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs index 327ac3ee44..87c74c7f3d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ClearTextTreeReporterTests.cs @@ -2,18 +2,19 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Spectre.Console.Testing; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class ClearTextTreeReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs index 9d8b81704f..d11cdd49d7 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ConsoleDotReporterTests.cs @@ -1,11 +1,11 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Spectre.Console.Testing; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters; -using System.IO; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class ConsoleDotReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs index 259eaf3896..4ecf6418a4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/DashboardReporterTests.cs @@ -1,17 +1,17 @@ using System.Linq; using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Abstractions.Clients; using Stryker.Abstractions; -using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Json.SourceFiles; -using Stryker.Abstractions.Reporters.WebBrowserOpener; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Stryker.Abstractions.UnitTest.Reporters +using Stryker.Abstractions.Options; +using Stryker.Core.Clients; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.WebBrowserOpener; + +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class DashboardReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs index aa4baac924..bc8a1323dd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/HtmlReporterTests.cs @@ -2,19 +2,20 @@ using System.Collections.Generic; using System.IO; using System.IO.Abstractions.TestingHelpers; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Spectre.Console.Testing; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using Stryker.Abstractions.Options.Inputs; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Html; -using Stryker.Abstractions.Reporters.Html.RealTime; -using Stryker.Abstractions.Reporters.WebBrowserOpener; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Stryker.Abstractions.UnitTest.Reporters.Html +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Html; +using Stryker.Core.Reporters.Html.RealTime; +using Stryker.Core.Reporters.WebBrowserOpener; + +namespace Stryker.Core.UnitTest.Reporters.Html { [TestClass] public class HtmlReporterTests : TestBase @@ -228,7 +229,7 @@ public void ShouldSendMutantEventIfOpenReportOptionIsProvided() reporter.OnMutantTested(new Mutant()); - _handlerMock.Verify(h => h.SendMutantTestedEvent(It.IsAny())); + _handlerMock.Verify(h => h.SendMutantTestedEvent(It.IsAny())); } [TestMethod] diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs index 26da9ed200..09bc319123 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTest.cs @@ -1,7 +1,8 @@ -using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Core.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs index 2962687c29..211f4c8988 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/Events/SseEventTypeTest.cs @@ -1,9 +1,10 @@ using System; using Shouldly; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime.Events; +namespace Stryker.Core.UnitTest.Reporters.Html.RealTime.Events; [TestClass] public class SseEventTypeTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs index 888eb3a14f..5abf96e18a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/RealTimeMutantHandlerTest.cs @@ -1,14 +1,15 @@ using System; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters.Html.RealTime; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; -using Stryker.Abstractions.Reporters.Json.SourceFiles; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.Reporters.Html.RealTime; +using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Core.Reporters.Json.SourceFiles; -namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Core.UnitTest.Reporters.Html.RealTime; [TestClass] public class RealTimeMutantHandlerTest : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs index d270061d82..0ec690f69c 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs @@ -4,11 +4,12 @@ using System.Threading.Tasks; using LaunchDarkly.EventSource; using Shouldly; -using Stryker.Abstractions.Reporters.Html.RealTime; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Core.Reporters.Html.RealTime; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Reporters.Html.RealTime; +namespace Stryker.Core.UnitTest.Reporters.Html.RealTime; [TestClass] public class SseServerTest : TestBase @@ -83,7 +84,7 @@ public void ShouldSendMutantTestedEventCorrectly() var @object = new { Id = "1", Status = "Survived" }; var eventReceived = new ManualResetEvent(false); var sseClient = new EventSource(new Uri($"http://localhost:{_sut.Port}/")); - + sseClient.MessageReceived += (_, e) => { @event = e.EventName; @@ -93,7 +94,7 @@ public void ShouldSendMutantTestedEventCorrectly() Task.Run(() => sseClient.StartAsync()); WaitForConnection(500).ShouldBeTrue(); - + _sut.SendEvent(new SseEvent { Event = SseEventType.MutantTested, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs index 690bd7e8b9..3ee77c6333 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs @@ -10,17 +10,17 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Newtonsoft.Json; using Shouldly; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Json.SourceFiles; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; -namespace Stryker.Abstractions.UnitTest.Reporters.Json +namespace Stryker.Core.UnitTest.Reporters.Json { [TestClass] public class JsonReporterTests : TestBase @@ -65,7 +65,7 @@ public void JsonMutantLocation_FromValidFileLinePositionSpanShouldAdd1ToLineAndC new LinePosition(2, 2), new LinePosition(4, 5)); - var jsonMutantLocation = new Abstractions.Reporters.Json.Location(lineSpan); + var jsonMutantLocation = new Core.Reporters.Json.Location(lineSpan); jsonMutantLocation.Start.Line.ShouldBe(3); jsonMutantLocation.Start.Column.ShouldBe(3); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs index a0d0836abc..21444a322d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReport.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Stryker.Abstractions.Reporters.Json; using Stryker.Abstractions.Reporting; +using Stryker.Core.Reporters.Json; -namespace Stryker.Abstractions.UnitTest.Reporters.Json +namespace Stryker.Core.UnitTest.Reporters.Json { public class MockJsonReport : JsonReport { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs index d218b878fb..644ae1f999 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/MockJsonReportFileComponent.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using Stryker.Abstractions.Reporting; -using Stryker.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.Json.SourceFiles; -namespace Stryker.Abstractions.UnitTest.Reporters.Json; +namespace Stryker.Core.UnitTest.Reporters.Json; public class MockJsonReportFileComponent : SourceFile { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs index d8396c2593..1cb048a629 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/MarkdownSummaryReporterTests.cs @@ -1,13 +1,13 @@ using System.IO; using System.IO.Abstractions.TestingHelpers; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; using Spectre.Console.Testing; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class MarkdownSummaryReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs index 3083a623d5..9c5459cebb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressBarReporterTests.cs @@ -1,10 +1,11 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters.Progress; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Mutants; +using Stryker.Core.Reporters.Progress; -namespace Stryker.Abstractions.UnitTest.Reporters.Progress +namespace Stryker.Core.UnitTest.Reporters.Progress { [TestClass] public class ProgressBarReporterTests diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs index 73ff21b45c..32045d1d72 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Progress/ProgressReporterTests.cs @@ -1,9 +1,10 @@ using Moq; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters.Progress; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Reporters.Progress; +using Stryker.Core.Mutants; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.Reporters.Progress +namespace Stryker.Core.UnitTest.Reporters.Progress { [TestClass] public class ProgressReporterTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs index 7d83e3370b..2f23554fdd 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReportTestHelper.cs @@ -5,8 +5,11 @@ using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents; +using Stryker.Core.ProjectComponents.Csharp; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { public static class ReportTestHelper { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs index 1dcdc6b06f..02b8fb6ee2 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/ReporterFactoryTests.cs @@ -1,16 +1,17 @@ using System; using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; using Stryker.Abstractions; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.Reporters.Html; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Progress; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Abstractions.Options; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Reporters; +using Stryker.Core.Reporters.Html; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Progress; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class ReporterFactoryTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs index 1aba666533..d076f806bb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/StatusReporterTests.cs @@ -2,15 +2,16 @@ using Moq; using Shouldly; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.Reporters; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents.Csharp; -namespace Stryker.Abstractions.UnitTest.Reporters +namespace Stryker.Core.UnitTest.Reporters { [TestClass] public class StatusReporterTests : TestBase @@ -29,7 +30,7 @@ public void ShouldPrintNoMutations() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf() { - Mutants = new Collection() + Mutants = new Collection() { } }); @@ -48,7 +49,7 @@ public void ShouldPrintIgnoredStatus() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf() { - Mutants = new Collection() + Mutants = new Collection() { new Mutant() { ResultStatus = MutantStatus.Ignored, ResultStatusReason = "In excluded file" }, } @@ -61,7 +62,7 @@ public void ShouldPrintIgnoredStatus() _loggerMock.Verify(LogLevel.Information, "0 total mutants will be tested", Times.Once); _loggerMock.VerifyNoOtherCalls(); } - + [TestMethod] public void ShouldPrintEachReasonWithCount() { @@ -70,7 +71,7 @@ public void ShouldPrintEachReasonWithCount() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf() { - Mutants = new Collection() + Mutants = new Collection() { new Mutant() { ResultStatus = MutantStatus.Ignored, ResultStatusReason = "In excluded file" }, new Mutant() { ResultStatus = MutantStatus.Ignored, ResultStatusReason = "In excluded file" }, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs index 48b3395bb0..e74dbc3bdc 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StringExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { internal static class StringExtensions { diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs index 28f3ae8e17..4eda378ddb 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunResultTests.cs @@ -2,7 +2,7 @@ using Stryker.Abstractions; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Stryker.Abstractions.UnitTest +namespace Stryker.Core.UnitTest { [TestClass] public class StrykerRunResultTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs index e9d76f53a7..ec9cbba040 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/StrykerRunnerTests.cs @@ -1,25 +1,27 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters; -using Stryker.Abstractions.TestRunners; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.Options; - -namespace Stryker.Abstractions.UnitTest +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; +using Stryker.Core.TestRunners; + +namespace Stryker.Core.UnitTest { [TestClass] public class StrykerRunnerTests : TestBase @@ -37,7 +39,7 @@ public void Stryker_ShouldInvokeAllProcesses() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf() { - Mutants = new List { new Mutant { Id = 1 } } + Mutants = new List { new Mutant { Id = 1 } } }); var projectInfo = Mock.Of(); @@ -68,7 +70,7 @@ public void Stryker_ShouldInvokeAllProcesses() mutationTestProcessMock.SetupGet(x => x.Input).Returns(mutationTestInput); mutationTestProcessMock.Setup(x => x.GetCoverage()); - mutationTestProcessMock.Setup(x => x.Test(It.IsAny>())) + mutationTestProcessMock.Setup(x => x.Test(It.IsAny>())) .Returns(new StrykerRunResult(It.IsAny(), It.IsAny())); mutationTestProcessMock.Setup(x => x.Restore()); @@ -84,7 +86,7 @@ public void Stryker_ShouldInvokeAllProcesses() projectOrchestratorMock.Verify(x => x.MutateProjects(It.Is(x => x.ProjectPath == "C:/test"), It.IsAny(), It.IsAny()), Times.Once); mutationTestProcessMock.Verify(x => x.GetCoverage(), Times.Once); - mutationTestProcessMock.Verify(x => x.Test(It.IsAny>()), Times.Once); + mutationTestProcessMock.Verify(x => x.Test(It.IsAny>()), Times.Once); reporterMock.Verify(x => x.OnMutantsCreated(It.IsAny(), It.IsAny()), Times.Once); reporterMock.Verify(x => x.OnStartMutantTestRun(It.IsAny>()), Times.Once); reporterMock.Verify(x => x.OnAllMutantsTested(It.IsAny(), It.IsAny()), Times.Once); @@ -103,7 +105,7 @@ public void ShouldStop_WhenAllMutationsWereIgnored() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf { - Mutants = new Collection() { new Mutant() { Id = 1, ResultStatus = MutantStatus.Ignored } } + Mutants = new Collection() { new Mutant() { Id = 1, ResultStatus = MutantStatus.Ignored } } }); var mutationTestInput = new MutationTestInput() { @@ -138,8 +140,8 @@ public void ShouldStop_WhenAllMutationsWereIgnored() result.MutationScore.ShouldBe(double.NaN); - reporterMock.Verify(x => x.OnStartMutantTestRun(It.IsAny>()), Times.Never); - reporterMock.Verify(x => x.OnMutantTested(It.IsAny()), Times.Never); + reporterMock.Verify(x => x.OnStartMutantTestRun(It.IsAny>()), Times.Never); + reporterMock.Verify(x => x.OnMutantTested(It.IsAny()), Times.Never); reporterMock.Verify(x => x.OnAllMutantsTested(It.IsAny(), It.IsAny()), Times.Once); } @@ -155,7 +157,7 @@ public void ShouldThrow_WhenNoProjectsFound() var folder = new CsharpFolderComposite(); folder.Add(new CsharpFileLeaf { - Mutants = new Collection() { new Mutant() { Id = 1, ResultStatus = MutantStatus.Ignored } } + Mutants = new Collection() { new Mutant() { Id = 1, ResultStatus = MutantStatus.Ignored } } }); var mutationTestInput = new MutationTestInput() { @@ -181,8 +183,8 @@ public void ShouldThrow_WhenNoProjectsFound() Should.Throw(() => target.RunMutationTest(inputsMock.Object, new LoggerFactory(), projectOrchestratorMock.Object)); - reporterMock.Verify(x => x.OnStartMutantTestRun(It.IsAny>()), Times.Never); - reporterMock.Verify(x => x.OnMutantTested(It.IsAny()), Times.Never); + reporterMock.Verify(x => x.OnStartMutantTestRun(It.IsAny>()), Times.Never); + reporterMock.Verify(x => x.OnMutantTested(It.IsAny()), Times.Never); reporterMock.Verify(x => x.OnAllMutantsTested(It.IsAny(), It.IsAny()), Times.Never); } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs index 7d136e72ea..4b544aba3d 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestBase.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; -namespace Stryker.Abstractions.UnitTest; +namespace Stryker.Core.UnitTest; public abstract class TestBase { protected TestBase() => diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs index 52ba5388ff..76f535de3b 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestHelper.cs @@ -3,7 +3,7 @@ using Buildalyzer; using Moq; -namespace Stryker.Abstractions.UnitTest; +namespace Stryker.Core.UnitTest; public static class TestHelper { @@ -35,7 +35,7 @@ public static Mock SetupProjectAnalyzerResult(Dictionary predicate, int timeout) [TestMethod] public void CanParseConfiguration() { - var referenceConf=""; + var referenceConf = ""; var node = new XmlDocument(); node.LoadXml(referenceConf); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs index 64b63b7f30..33f8c949e5 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/CoverageCollectorTests.cs @@ -7,8 +7,9 @@ using Shouldly; using Stryker.DataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Stryker.Core.UnitTest; -namespace Stryker.Abstractions.UnitTest.TestRunners +namespace Stryker.Core.UnitTest.TestRunners { [TestClass] public class CoverageCollectorTests : TestBase @@ -37,11 +38,11 @@ public void ProperlySelectMutant() var testCase = new TestCase("theTest", new Uri("xunit://"), "source.cs"); var nonCoveringTestCase = new TestCase("theOtherTest", new Uri("xunit://"), "source.cs"); - var mutantMap = new List<(int, IEnumerable)> {(10, new List{testCase.Id}), (5, new List{nonCoveringTestCase.Id})}; + var mutantMap = new List<(int, IEnumerable)> { (10, new List { testCase.Id }), (5, new List { nonCoveringTestCase.Id }) }; var start = new TestSessionStartArgs { - Configuration = CoverageCollector.GetVsTestSettings(false, mutantMap, this.GetType().Namespace) + Configuration = CoverageCollector.GetVsTestSettings(false, mutantMap, GetType().Namespace) }; var mock = new Mock(MockBehavior.Loose); collector.Initialize(mock.Object); @@ -60,11 +61,11 @@ public void SelectMutantEarlyIfSingle() var collector = new CoverageCollector(); var testCase = new TestCase("theTest", new Uri("xunit://"), "source.cs"); - var mutantMap = new List<(int, IEnumerable)> {(5, new List{testCase.Id})}; + var mutantMap = new List<(int, IEnumerable)> { (5, new List { testCase.Id }) }; var start = new TestSessionStartArgs { - Configuration = CoverageCollector.GetVsTestSettings(false, mutantMap, this.GetType().Namespace) + Configuration = CoverageCollector.GetVsTestSettings(false, mutantMap, GetType().Namespace) }; var mock = new Mock(MockBehavior.Loose); collector.Initialize(mock.Object); @@ -96,7 +97,7 @@ public void ProperlyCaptureCoverage() var dataCollection = new DataCollectionContext(testCase); collector.TestCaseEnd(new TestCaseEndArgs(dataCollection, TestOutcome.Passed)); - mock.Verify(sink => sink.SendData(dataCollection,CoverageCollector.PropertyName, "0,1;1"), Times.Once); + mock.Verify(sink => sink.SendData(dataCollection, CoverageCollector.PropertyName, "0,1;1"), Times.Once); collector.TestSessionEnd(new TestSessionEndArgs()); } @@ -119,7 +120,7 @@ public void ProperlyReportNoCoverage() var dataCollection = new DataCollectionContext(testCase); collector.TestCaseEnd(new TestCaseEndArgs(dataCollection, TestOutcome.Passed)); - mock.Verify(sink => sink.SendData(dataCollection,CoverageCollector.PropertyName, ";"), Times.Once); + mock.Verify(sink => sink.SendData(dataCollection, CoverageCollector.PropertyName, ";"), Times.Once); collector.TestSessionEnd(new TestSessionEndArgs()); } @@ -144,8 +145,8 @@ public void ProperlyReportLeakedMutations() MutantControl.HitNormal(1); collector.TestCaseEnd(new TestCaseEndArgs(dataCollection, TestOutcome.Passed)); - mock.Verify(sink => sink.SendData(dataCollection,CoverageCollector.PropertyName, "1;"), Times.Once); - mock.Verify(sink => sink.SendData(dataCollection,CoverageCollector.OutOfTestsPropertyName, "0"), Times.Once); + mock.Verify(sink => sink.SendData(dataCollection, CoverageCollector.PropertyName, "1;"), Times.Once); + mock.Verify(sink => sink.SendData(dataCollection, CoverageCollector.OutOfTestsPropertyName, "0"), Times.Once); collector.TestSessionEnd(new TestSessionEndArgs()); } } diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs index bdcb2cc617..9767e9170f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs @@ -16,20 +16,22 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollector.InProcDataCollector; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; -using Stryker.Abstractions.ToolHelpers; +using Stryker.Core.Helpers; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; using Stryker.DataCollector; using Stryker.Utilities; using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Abstractions.UnitTest.TestRunners; +namespace Stryker.Core.UnitTest.TestRunners; /// /// This class has a set of methods that can be used to mock VsTest behavior. @@ -94,7 +96,7 @@ public VsTestMockingHelper() _testProjectsInfo = BuildTestProjectsInfo(); SourceProjectInfo = BuildSourceProjectInfo(); - TestCases = new List { firstTest, secondTest }; + TestCases = new List { firstTest, secondTest }; } protected SourceProjectInfo BuildSourceProjectInfo(IEnumerable mutants = null) @@ -109,7 +111,7 @@ protected SourceProjectInfo BuildSourceProjectInfo(IEnumerable mutants = { "TargetDir", Path.Combine(_filesystemRoot, "app", "bin", "Debug") }, { "TargetFileName", "AppToTest.dll" }, { "Language", "C#" } - },targetFramework: "netcoreapp2.1").Object, + }, targetFramework: "netcoreapp2.1").Object, ProjectContents = content, TestProjectsInfo = _testProjectsInfo }; @@ -141,41 +143,41 @@ protected VsTest.TestCase BuildCase(string name, TestFrameworks framework = Test protected VsTest.TestCase FindOrBuildCase(string testResultId) => TestCases.FirstOrDefault(t => t.FullyQualifiedName == testResultId) ?? BuildCase(testResultId); private static void MockTestRun(ITestRunEventsHandler testRunEvents, IReadOnlyList testResults, - VsTest.TestCase timeOutTest = null) + VsTest.TestCase timeOutTest = null) + { + if (testResults.Count == 0) { - if (testResults.Count == 0) - { - // no test ==> no event at all - return; - } - var timer = new Stopwatch(); - testRunEvents.HandleTestRunStatsChange( - new TestRunChangedEventArgs(new TestRunStatistics(0, null), null, timeOutTest == null ? null : new[] { timeOutTest })); - - for (var i = 0; i < testResults.Count; i++) - { - testResults[i].StartTime = DateTimeOffset.Now; - Thread.Sleep(1); - testResults[i].EndTime = DateTimeOffset.Now + testResults[i].Duration; - testRunEvents.HandleTestRunStatsChange(new TestRunChangedEventArgs( - new TestRunStatistics(i + 1, null), new[] { testResults[i] }, null)); - } - - if (timeOutTest != null) - { - testRunEvents.HandleTestRunStatsChange(new TestRunChangedEventArgs( - new TestRunStatistics(testResults.Count, null), null, new[] { timeOutTest })); - } + // no test ==> no event at all + return; + } + var timer = new Stopwatch(); + testRunEvents.HandleTestRunStatsChange( + new TestRunChangedEventArgs(new TestRunStatistics(0, null), null, timeOutTest == null ? null : new[] { timeOutTest })); + for (var i = 0; i < testResults.Count; i++) + { + testResults[i].StartTime = DateTimeOffset.Now; Thread.Sleep(1); - testRunEvents.HandleTestRunComplete( - new TestRunCompleteEventArgs(new TestRunStatistics(testResults.Count, null), false, false, null, - null, timer.Elapsed), - new TestRunChangedEventArgs(null, Array.Empty(), new List()), - null, - null); + testResults[i].EndTime = DateTimeOffset.Now + testResults[i].Duration; + testRunEvents.HandleTestRunStatsChange(new TestRunChangedEventArgs( + new TestRunStatistics(i + 1, null), new[] { testResults[i] }, null)); } + if (timeOutTest != null) + { + testRunEvents.HandleTestRunStatsChange(new TestRunChangedEventArgs( + new TestRunStatistics(testResults.Count, null), null, new[] { timeOutTest })); + } + + Thread.Sleep(1); + testRunEvents.HandleTestRunComplete( + new TestRunCompleteEventArgs(new TestRunStatistics(testResults.Count, null), false, false, null, + null, timer.Elapsed), + new TestRunChangedEventArgs(null, Array.Empty(), new List()), + null, + null); + } + protected void SetupMockTestRun(Mock mockVsTest, bool testResult, IReadOnlyList testCases) { var results = new List<(string, bool)>(testCases.Count); @@ -209,7 +211,7 @@ protected void SetupMockTestRun(Mock mockVsTest, IReadOnl It.IsAny(), It.IsAny())).Callback( (IEnumerable _, string _, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, - ITestHostLauncher _) => MockTestRun(testRunEvents, results)); + ITestHostLauncher _) => MockTestRun(testRunEvents, results)); protected void SetupFailingTestRun(Mock mockVsTest) => mockVsTest.Setup(x => @@ -235,7 +237,7 @@ protected void SetupFailingTestRun(Mock mockVsTest) => new TransationLayerException("VsTest Crashed"), null, timer.Elapsed), new TestRunChangedEventArgs(null, Array.Empty(), - new List()), + new List()), null, null); })); @@ -256,7 +258,7 @@ protected void SetupFrozenTestRun(Mock mockVsTest, int re testRunEvents.HandleTestRunStatsChange( new TestRunChangedEventArgs(new TestRunStatistics(0, null), null, null)); - if (repeated--<=0) + if (repeated-- <= 0) testRunEvents.HandleTestRunComplete( new TestRunCompleteEventArgs(new TestRunStatistics(0, null), false, false, null, @@ -278,33 +280,33 @@ protected void SetupFrozenTestRun(Mock mockVsTest, int re } })); - protected void SetupFrozenVsTest(Mock mockVsTest, int repeated = 1) => - mockVsTest.Setup(x => - x.RunTestsWithCustomTestHost( - It.Is>(t => t.Any(source => source == _testAssemblyPath)), - It.Is(settings => !settings.Contains("(o => o != null && o.TestCaseFilter == null), - It.IsAny(), - It.IsAny())).Callback( - (IEnumerable _, string _, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, - ITestHostLauncher _) => - // generate test results - { - testRunEvents.HandleTestRunStatsChange( - new TestRunChangedEventArgs(new TestRunStatistics(0, null), null, null)); - - testRunEvents.HandleTestRunComplete( - new TestRunCompleteEventArgs(new TestRunStatistics(0, null), false, false, - null, - null, TimeSpan.FromMilliseconds(10)), - new TestRunChangedEventArgs(null, Array.Empty(), - new List()), - null, - null); - - if (repeated-->0) - Thread.Sleep(1000); - }); + protected void SetupFrozenVsTest(Mock mockVsTest, int repeated = 1) => + mockVsTest.Setup(x => + x.RunTestsWithCustomTestHost( + It.Is>(t => t.Any(source => source == _testAssemblyPath)), + It.Is(settings => !settings.Contains("(o => o != null && o.TestCaseFilter == null), + It.IsAny(), + It.IsAny())).Callback( + (IEnumerable _, string _, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, + ITestHostLauncher _) => + // generate test results + { + testRunEvents.HandleTestRunStatsChange( + new TestRunChangedEventArgs(new TestRunStatistics(0, null), null, null)); + + testRunEvents.HandleTestRunComplete( + new TestRunCompleteEventArgs(new TestRunStatistics(0, null), false, false, + null, + null, TimeSpan.FromMilliseconds(10)), + new TestRunChangedEventArgs(null, Array.Empty(), + new List()), + null, + null); + + if (repeated-- > 0) + Thread.Sleep(1000); + }); protected void SetupMockCoverageRun(Mock mockVsTest, IReadOnlyDictionary coverageResults) => SetupMockCoverageRun(mockVsTest, GenerateCoverageTestResults(coverageResults)); @@ -392,12 +394,12 @@ protected VsTest.TestResult BuildCoverageTestResult(string key, string[] covered protected static void SetupMockPartialTestRun(Mock mockVsTest, IReadOnlyDictionary results) => mockVsTest.Setup(x => x.RunTestsWithCustomTestHost( - It.IsAny>(), + It.IsAny>(), It.Is(s => !s.Contains("(o => o != null && o.TestCaseFilter == null), It.IsAny(), It.IsAny())).Callback( - (IEnumerable sources, string settings, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, + (IEnumerable sources, string settings, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, ITestHostLauncher _) => { var collector = new CoverageCollector(); @@ -449,7 +451,7 @@ protected static void SetupMockTimeOutTestRun(Mock mockVs It.IsAny(), It.IsAny())).Callback( (IEnumerable sources, string settings, TestPlatformOptions _, ITestRunEventsHandler testRunEvents, - ITestHostLauncher _) => + ITestHostLauncher _) => { var collector = new CoverageCollector(); var start = new TestSessionStartArgs @@ -496,8 +498,8 @@ protected static void SetupMockTimeOutTestRun(Mock mockVs }); - protected Mock BuildVsTestRunnerPool(StrykerOptions options, - out VsTestRunnerPool runner, IReadOnlyCollection testCases = null, TestProjectsInfo testProjectsInfo = null) + protected Mock BuildVsTestRunnerPool(IStrykerOptions options, + out VsTestRunnerPool runner, IReadOnlyCollection testCases = null, ITestProjectsInfo testProjectsInfo = null) { testCases ??= TestCases.ToList(); var mockedVsTestConsole = new Mock(MockBehavior.Strict); @@ -505,7 +507,7 @@ protected Mock BuildVsTestRunnerPool(StrykerOptions optio mockedVsTestConsole.Setup(x => x.InitializeExtensions(It.IsAny>())); mockedVsTestConsole.Setup(x => x.AbortTestRun()); mockedVsTestConsole.Setup(x => x.EndSession()); - + mockedVsTestConsole.Setup(x => x.DiscoverTests(It.Is>(d => d.Any(e => e == _testAssemblyPath)), It.IsAny(), @@ -529,7 +531,7 @@ protected Mock BuildVsTestRunnerPool(StrykerOptions optio return mockedVsTestConsole; } - protected MutationTestProcess BuildMutationTestProcess(VsTestRunnerPool runner, StrykerOptions options, IReadOnlyList tests = null, SourceProjectInfo sourceProject = null) + protected MutationTestProcess BuildMutationTestProcess(VsTestRunnerPool runner, IStrykerOptions options, IReadOnlyList tests = null, SourceProjectInfo sourceProject = null) { var testRunResult = new TestRunResult(new List(), new TestGuidsList((tests ?? TestCases).Select(t => t.Id)), TestGuidsList.NoTest(), diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs index 5b025e8e02..ac8f15ad3a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestRunnerPoolTests.cs @@ -1,21 +1,22 @@ using System; using System.Collections.Generic; using System.Linq; -using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.CoverageAnalysis; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; +using Stryker.Core.CoverageAnalysis; +using Stryker.Core.Initialisation; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; +using VsTest = Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Abstractions.UnitTest.TestRunners +namespace Stryker.Core.UnitTest.TestRunners { /// /// This class hosts the VsTestRunner related tests. The design of VsTest implies the creation of many mocking objects, so the tests may be hard to read. @@ -129,7 +130,7 @@ public void DoNotTestWhenNoTestPresent() // tests are successful => run should be successful result.ExecutedTests.IsEmpty.ShouldBeTrue(); } - + // If no tests are present in the assembly, VsTest raises no event at all // previous versions of Stryker froze when this happened [TestMethod] @@ -147,7 +148,7 @@ public void RecycleRunnerOnError() { var mockVsTest = BuildVsTestRunnerPool(new StrykerOptions(), out var runner); SetupFailingTestRun(mockVsTest); - var action = () => runner.TestMultipleMutants(SourceProjectInfo, null, new[] { Mutant }, null); + var action = () => runner.TestMultipleMutants(SourceProjectInfo, null, new[] { Mutant }, null); action.ShouldThrow(); // the test will always end in a crash, VsTestRunner should retry at least a few times mockVsTest.Verify(m => m.RunTestsWithCustomTestHost(It.IsAny>(), @@ -194,7 +195,7 @@ public void ShouldRetryFrozenSession() VsTestRunner.VsTestExtraTimeOutInMs = 100; // the test session will freeze twice SetupFrozenTestRun(mockVsTest, 2); - runner.TestMultipleMutants(SourceProjectInfo, new TimeoutValueCalculator(0, 10,9), new[] { Mutant }, null); + runner.TestMultipleMutants(SourceProjectInfo, new TimeoutValueCalculator(0, 10, 9), new[] { Mutant }, null); VsTestRunner.VsTestExtraTimeOutInMs = defaultTimeOut; mockVsTest.Verify(m => m.RunTestsWithCustomTestHost(It.IsAny>(), It.IsAny(), It.IsAny(), @@ -211,7 +212,7 @@ public void ShouldNotRetryFrozenVsTest() // it will be recycled SetupFrozenVsTest(mockVsTest, 3); VsTestRunner.VsTestExtraTimeOutInMs = 100; - runner.TestMultipleMutants(SourceProjectInfo, new TimeoutValueCalculator(0, 10,9), new[] { Mutant }, null); + runner.TestMultipleMutants(SourceProjectInfo, new TimeoutValueCalculator(0, 10, 9), new[] { Mutant }, null); VsTestRunner.VsTestExtraTimeOutInMs = defaultTimeOut; mockVsTest.Verify(m => m.EndSession(), Times.Exactly(2)); } @@ -635,7 +636,7 @@ public void HandleExtraTestResult() var mockVsTest = BuildVsTestRunnerPool(options, out var runner); var testResult = BuildCoverageTestResult("T0", new[] { "0;", "" }); - var other = new VsTest.TestResult(FindOrBuildCase("T0")) + var other = new VsTest.TestResult(FindOrBuildCase("T0")) { DisplayName = "T0", Outcome = VsTest.TestOutcome.Passed, diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs index 31af84ab76..7b27a19199 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTextContextInformationTests.cs @@ -15,16 +15,19 @@ using Shouldly; using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners.VsTest; -using Stryker.Abstractions.ToolHelpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Utilities; - -namespace Stryker.Abstractions.UnitTest.TestRunners +using Stryker.Core.TestRunners.VsTest; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Helpers; +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Abstractions.Options; +using Stryker.Core.UnitTest; + +namespace Stryker.Core.UnitTest.TestRunners { [TestClass] - public class VsTextContextInformationTests: TestBase + public class VsTextContextInformationTests : TestBase { private readonly string _testAssemblyPath; private readonly TestProjectsInfo _testProjectsInfo; @@ -106,7 +109,7 @@ private static void DiscoverTests(ITestDiscoveryEventsHandler discoveryEventsHan private Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase BuildCaseMsTest(string name) => new(name, _msTestExecutorUri, _testAssemblyPath) { Id = new Guid() }; - private VsTestContextInformation BuildVsTextContext(StrykerOptions options, out Mock mockedVsTestConsole) + private VsTestContextInformation BuildVsTextContext(IStrykerOptions options, out Mock mockedVsTestConsole) { mockedVsTestConsole = new Mock(MockBehavior.Strict); mockedVsTestConsole.Setup(x => x.StartSession()); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs index 9a77b9a17d..8db7e0e681 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/ToolHelpers/BuildalyzerHelperTests.cs @@ -4,9 +4,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Shouldly; -using Stryker.Abstractions.Initialisation.Buildalyzer; +using Stryker.Core.Initialisation.Buildalyzer; -namespace Stryker.Abstractions.UnitTest.ToolHelpers; +namespace Stryker.Core.UnitTest.ToolHelpers; [TestClass] public class BuildalyzerHelperTests : TestBase diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json index f8d939342d..137acbaaf9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json @@ -277,14 +277,6 @@ "resolved": "8.0.0", "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", "resolved": "8.0.0", @@ -1608,7 +1600,12 @@ } }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } }, "Azure.Storage.Files.Shares": { "type": "CentralTransitive", @@ -1732,6 +1729,15 @@ "Microsoft.Extensions.Options": "8.0.0" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "Microsoft.TestPlatform": { "type": "CentralTransitive", "requested": "[17.10.0, )", diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs index 2f46f67943..076eb5076f 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/AzureFileShareBaselineProvider.cs @@ -7,9 +7,12 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Json; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Reporting; +using Stryker.Core.Reporters.Json; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { public class AzureFileShareBaselineProvider : IBaselineProvider { @@ -20,7 +23,7 @@ public class AzureFileShareBaselineProvider : IBaselineProvider private readonly ILogger _logger; private readonly string _outputPath; - public AzureFileShareBaselineProvider(StrykerOptions options, ShareClient shareClient = null, ILogger logger = null) + public AzureFileShareBaselineProvider(IStrykerOptions options, ShareClient shareClient = null, ILogger logger = null) { _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger(); @@ -28,7 +31,7 @@ public AzureFileShareBaselineProvider(StrykerOptions options, ShareClient shareC _fileShareClient = shareClient ?? new ShareClient(new Uri(options.AzureFileStorageUrl), new AzureSasCredential(options.AzureFileStorageSas)); } - public async Task Load(string version) + public async Task Load(string version) { var (uri, root, subdirectoryNames, fileName) = BuildFileUriComponents(version); @@ -52,7 +55,7 @@ public async Task Load(string version) return null; } - public async Task Save(JsonReport report, string version) + public async Task Save(IJsonReport report, string version) { var (uri, root, subdirectoryNames, fileName) = BuildFileUriComponents(version); diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs index 5feabf24ea..18c5c23663 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/BaselineProviderFactory.cs @@ -1,11 +1,12 @@ using Stryker.Abstractions.Baseline; using Stryker.Abstractions; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { public static class BaselineProviderFactory { - public static IBaselineProvider Create(StrykerOptions options) + public static IBaselineProvider Create(IStrykerOptions options) { return options.BaselineProvider switch { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs index 979b1b46a3..be3edda7ae 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DashboardBaselineProvider.cs @@ -1,24 +1,26 @@ -using Stryker.Abstractions.Clients; -using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Json; using System.Threading.Tasks; +using Stryker.Abstractions; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Reporting; +using Stryker.Core.Clients; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { public class DashboardBaselineProvider : IBaselineProvider { private readonly IDashboardClient _client; - public DashboardBaselineProvider(StrykerOptions options, IDashboardClient client = null) + public DashboardBaselineProvider(IStrykerOptions options, IDashboardClient client = null) { _client = client ?? new DashboardClient(options); } - public async Task Load(string version) + public async Task Load(string version) { return await _client.PullReport(version); } - public async Task Save(JsonReport report, string version) + public async Task Save(IJsonReport report, string version) { await _client.PublishReport(report, version); } diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs index 2a0df43ba9..2f86369ce8 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/DiskBaselineProvider.cs @@ -1,21 +1,24 @@ -using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Logging; -using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Json; using System.IO; using System.IO.Abstractions; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Reporting; +using Stryker.Core.Reporters.Json; +using Stryker.Utilities; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { public class DiskBaselineProvider : IBaselineProvider { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IFileSystem _fileSystem; private readonly ILogger _logger; private const string _outputPath = "StrykerOutput"; - public DiskBaselineProvider(StrykerOptions options, IFileSystem fileSystem = null) + public DiskBaselineProvider(IStrykerOptions options, IFileSystem fileSystem = null) { _options = options; _fileSystem = fileSystem ?? new FileSystem(); @@ -23,7 +26,7 @@ public DiskBaselineProvider(StrykerOptions options, IFileSystem fileSystem = nul } - public async Task Load(string version) + public async Task Load(string version) { var reportPath = FilePathUtils.NormalizePathSeparators( Path.Combine(_options.ProjectPath, _outputPath, version, "stryker-report.json")); @@ -39,7 +42,7 @@ public async Task Load(string version) return null; } - public async Task Save(JsonReport report, string version) + public async Task Save(IJsonReport report, string version) { var reportDirectory = FilePathUtils.NormalizePathSeparators( Path.Combine(_options.ProjectPath, _outputPath, version)); diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs index e4a6871448..7057d598bc 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/GitInfoProvider.cs @@ -1,17 +1,16 @@ +using System; +using System.Linq; using LibGit2Sharp; +using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions; -using System; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { - using Logging; - using Microsoft.Extensions.Logging; - using System.Linq; - public class GitInfoProvider : IGitInfoProvider { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly string _repositoryPath; private readonly ILogger _logger; @@ -19,7 +18,7 @@ public class GitInfoProvider : IGitInfoProvider public string RepositoryPath => _repositoryPath ?? LibGit2Sharp.Repository.Discover(_options.ProjectPath)?.Split(".git")[0]; - public GitInfoProvider(StrykerOptions options, IRepository repository = null, string repositoryPath = null, ILogger logger = null) + public GitInfoProvider(IStrykerOptions options, IRepository repository = null, string repositoryPath = null, ILogger logger = null) { _repositoryPath = repositoryPath; _options = options; diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs index ff4eaf1553..436d938aa2 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Providers/IGitInfoProvider.cs @@ -1,6 +1,6 @@ using LibGit2Sharp; -namespace Stryker.Abstractions.Baseline.Providers +namespace Stryker.Core.Baseline.Providers { public interface IGitInfoProvider { diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs index 3c139081f5..6e0540deb2 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/BaselineMutantHelper.cs @@ -4,22 +4,22 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Baseline.Utils +namespace Stryker.Core.Baseline.Utils { public class BaselineMutantHelper : IBaselineMutantHelper { - public IEnumerable GetMutantMatchingSourceCode(IEnumerable mutants, JsonMutant baselineMutant, string baselineMutantSourceCode) + public IEnumerable GetMutantMatchingSourceCode(IEnumerable mutants, IJsonMutant baselineMutant, string baselineMutantSourceCode) { return mutants.Where(x => x.Mutation.OriginalNode.ToString() == baselineMutantSourceCode && x.Mutation.DisplayName == baselineMutant.MutatorName); } - public string GetMutantSourceCode(string source, JsonMutant baselineMutant) + public string GetMutantSourceCode(string source, IJsonMutant baselineMutant) { - SyntaxTree tree = CSharpSyntaxTree.ParseText(source); + var tree = CSharpSyntaxTree.ParseText(source); var beginLinePosition = new LinePosition(baselineMutant.Location.Start.Line - 1, baselineMutant.Location.Start.Column - 1); var endLinePosition = new LinePosition(baselineMutant.Location.End.Line - 1, baselineMutant.Location.End.Column - 1); diff --git a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs index 7f42f31eb0..d8fd76b909 100644 --- a/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Baseline/Utils/IBaselineMutantHelper.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; -using Stryker.Abstractions.Reporters.Json.SourceFiles; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Baseline.Utils +namespace Stryker.Core.Baseline.Utils { public interface IBaselineMutantHelper { - IEnumerable GetMutantMatchingSourceCode(IEnumerable mutants, JsonMutant baselineMutant, string baselineMutantSourceCode); + IEnumerable GetMutantMatchingSourceCode(IEnumerable mutants, IJsonMutant baselineMutant, string baselineMutantSourceCode); - string GetMutantSourceCode(string source, JsonMutant baselineMutant); + string GetMutantSourceCode(string source, IJsonMutant baselineMutant); } } diff --git a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs index e89b2025ad..9ba194fd28 100644 --- a/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs +++ b/src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs @@ -1,21 +1,22 @@ -using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Logging; -using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Json; using System; using System.Collections.Generic; using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; -using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Microsoft.Extensions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.Logging; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.Reporting; +using Stryker.Core.Reporters.Json; -namespace Stryker.Abstractions.Clients +namespace Stryker.Core.Clients { public interface IDashboardClient { - Task PublishReport(JsonReport report, string version, bool realTime = false); + Task PublishReport(IJsonReport report, string version, bool realTime = false); Task PullReport(string version); - Task PublishMutantBatch(JsonMutant mutant); + Task PublishMutantBatch(IJsonMutant mutant); Task PublishFinished(); } @@ -23,12 +24,12 @@ public class DashboardClient : IDashboardClient { private const int MutantBatchSize = 10; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly ILogger _logger; private readonly HttpClient _httpClient; - private readonly List _batch = new(); + private readonly List _batch = new(); - public DashboardClient(StrykerOptions options, HttpClient httpClient = null, ILogger logger = null) + public DashboardClient(IStrykerOptions options, HttpClient httpClient = null, ILogger logger = null) { _options = options; _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger(); @@ -43,7 +44,7 @@ public DashboardClient(StrykerOptions options, HttpClient httpClient = null, ILo } } - public async Task PublishReport(JsonReport report, string version, bool realTime = false) + public async Task PublishReport(IJsonReport report, string version, bool realTime = false) { var url = GetUrl(version, realTime); @@ -57,14 +58,14 @@ public async Task PublishReport(JsonReport report, string version, bool var result = await response.Content.ReadFromJsonAsync(); return result?.Href; } - catch(Exception exception) + catch (Exception exception) { _logger.LogError(exception, "Failed to upload report to the dashboard at {DashboardUrl}", url); return null; } } - public async Task PublishMutantBatch(JsonMutant mutant) + public async Task PublishMutantBatch(IJsonMutant mutant) { _batch.Add(mutant); if (_batch.Count != MutantBatchSize) @@ -79,7 +80,7 @@ public async Task PublishMutantBatch(JsonMutant mutant) response.EnsureSuccessStatusCode(); _batch.Clear(); } - catch(Exception exception) + catch (Exception exception) { _logger.LogError(exception, "Failed to upload mutant to the dashboard at {DashboardUrl}", url); } @@ -101,7 +102,7 @@ public async Task PublishFinished() var deleteResponse = await _httpClient.DeleteAsync(url); deleteResponse.EnsureSuccessStatusCode(); } - catch(Exception exception) + catch (Exception exception) { _logger.LogError(exception, "Failed send finished event to the dashboard at {DashboardUrl}", url); } diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs index 72179553b7..3d2ece86f9 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs @@ -9,10 +9,10 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Compiling +namespace Stryker.Core.Compiling { public interface ICSharpRollbackProcess { diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs index a175c42cc7..ee6a51f640 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcessResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp; -namespace Stryker.Abstractions.Compiling +namespace Stryker.Core.Compiling { public record CSharpRollbackProcessResult( CSharpCompilation Compilation, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs index 3b6368b120..b8d085adfc 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CompilingProcessResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Abstractions.Compiling +namespace Stryker.Core.Compiling { public record CompilingProcessResult( bool Success, diff --git a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs index 9d8caa0c09..d4805f388f 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/CsharpCompilingProcess.cs @@ -12,13 +12,14 @@ using Microsoft.CodeAnalysis.Emit; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.MutationTest; +using Stryker.Core.Initialisation; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Compiling; +namespace Stryker.Core.Compiling; public interface ICSharpCompilingProcess { @@ -34,13 +35,13 @@ public class CsharpCompilingProcess : ICSharpCompilingProcess { private const int MaxAttempt = 50; private readonly MutationTestInput _input; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly ICSharpRollbackProcess _rollbackProcess; private readonly ILogger _logger; public CsharpCompilingProcess(MutationTestInput input, ICSharpRollbackProcess rollbackProcess = null, - StrykerOptions options = null) + IStrykerOptions options = null) { _input = input; _options = options ?? new StrykerOptions(); @@ -83,7 +84,7 @@ public CompilingProcessResult Compile(IEnumerable syntaxTrees, Strea if (emitResult.Success) { - return new ( + return new( true, rollbackProcessResult?.RollbackedIds ?? Enumerable.Empty()); } @@ -176,7 +177,7 @@ private CSharpCompilation GetCSharpCompilation(IEnumerable syntaxTre _input.SourceProjectInfo.AnalyzerResult.GetSymbolFileName()); EmitResult emitResult = null; var resourceDescriptions = _input.SourceProjectInfo.AnalyzerResult.GetResources(_logger); - while(emitResult == null) + while (emitResult == null) { if (previousEmitResult != null) { @@ -214,14 +215,14 @@ private CSharpCompilation GetCSharpCompilation(IEnumerable syntaxTre LogEmitResult(emitResult); - return (rollbackProcessResult, emitResult, retryCount+1); + return (rollbackProcessResult, emitResult, retryCount + 1); } private CSharpCompilation ScanForCauseOfException(CSharpCompilation compilation) { var syntaxTrees = compilation.SyntaxTrees; // we add each file incrementally until it fails - foreach(var st in syntaxTrees) + foreach (var st in syntaxTrees) { var local = compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(st); try @@ -232,7 +233,7 @@ private CSharpCompilation ScanForCauseOfException(CSharpCompilation compilation) manifestResources: _input.SourceProjectInfo.AnalyzerResult.GetResources(_logger), options: null); } - catch(Exception e) + catch (Exception e) { _logger.LogError(e, "Failed to compile {FilePath}", st.FilePath); _logger.LogTrace("source code:\n {Source}", st.GetText()); @@ -276,12 +277,12 @@ private void DumpErrorDetails(IEnumerable diagnostics) } private static string ReadableNumber(int number) => number switch - { - 1 => "first", - 2 => "second", - 3 => "third", - _ => number + "th" - }; + { + 1 => "first", + 2 => "second", + 3 => "third", + _ => number + "th" + }; // This class is used to provide the options to the source generators [ExcludeFromCodeCoverage] @@ -326,7 +327,7 @@ public override bool TryGetValue(string key, out string value) return false; } - public override IEnumerable Keys =>[]; + public override IEnumerable Keys => []; } } diff --git a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs index 091c4da21c..af49654aed 100644 --- a/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Compiling/FsharpCompilingProcess.cs @@ -8,14 +8,14 @@ using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutationTest; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.TestProjects; using IFileSystem = System.IO.Abstractions.IFileSystem; using ParsedInput = FSharp.Compiler.Syntax.ParsedInput; -namespace Stryker.Abstractions.Compiling +namespace Stryker.Core.Compiling { public class FsharpCompilingProcess { diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs index ce90f865d6..bb8e76bb34 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/CoverageAnalyser.cs @@ -7,21 +7,24 @@ using Stryker.Abstractions.Mutants; using Stryker.Abstractions; using Stryker.Abstractions.TestRunners; +using Stryker.Core.TestRunners; +using Stryker.Core.Mutants; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.CoverageAnalysis +namespace Stryker.Core.CoverageAnalysis { public class CoverageAnalyser : ICoverageAnalyser { private readonly ILogger _logger; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; - public CoverageAnalyser(StrykerOptions options) + public CoverageAnalyser(IStrykerOptions options) { _options = options; _logger = ApplicationLogging.LoggerFactory.CreateLogger(); } - public void DetermineTestCoverage(IProjectAndTests project, ITestRunner runner, IEnumerable mutants, + public void DetermineTestCoverage(IProjectAndTests project, ITestRunner runner, IEnumerable mutants, ITestGuids resultFailingTests) { if (!_options.OptimizationMode.HasFlag(OptimizationModes.SkipUncoveredMutants) && @@ -39,7 +42,7 @@ public void DetermineTestCoverage(IProjectAndTests project, ITestRunner runner, ParseCoverage(runner.CaptureCoverage(project), mutants, new TestGuidsList(resultFailingTests.GetGuids())); } - private void ParseCoverage(IEnumerable coverage, IEnumerable mutantsToScan, + private void ParseCoverage(IEnumerable coverage, IEnumerable mutantsToScan, TestGuidsList failedTests) { var dubiousTests = new HashSet(); @@ -79,7 +82,7 @@ private void ParseCoverage(IEnumerable coverage, IEnumerable< var allTest = TestGuidsList.EveryTest(); - var allTestsExceptTrusted = (trustedTests.Count == 0 && failedTests.Count == 0) + var allTestsExceptTrusted = trustedTests.Count == 0 && failedTests.Count == 0 ? TestGuidsList.EveryTest() : new TestGuidsList(testIds.Except(trustedTests).ToHashSet()).Excluding(failedTests); @@ -96,7 +99,7 @@ private void ParseCoverage(IEnumerable coverage, IEnumerable< } } - private void CoverageForThisMutant(Mutant mutant, + private void CoverageForThisMutant(IMutant mutant, IReadOnlyDictionary> mutationToResultMap, TestGuidsList everytest, TestGuidsList allTestsGuidsExceptTrusted, @@ -146,7 +149,7 @@ private void CoverageForThisMutant(Mutant mutant, { _logger.LogDebug( "Mutant {MutantId} will be tested against ({TestCases}) tests.", mutant.Id, - (mutant.AssessingTests.IsEveryTest ? "all" : mutant.AssessingTests.Count)); + mutant.AssessingTests.IsEveryTest ? "all" : mutant.AssessingTests.Count); } } diff --git a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs index feee3fc152..fabc73f632 100644 --- a/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs +++ b/src/Stryker.Core/Stryker.Core/CoverageAnalysis/ICoverageAnalyser.cs @@ -2,11 +2,12 @@ using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.TestRunners; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.CoverageAnalysis +namespace Stryker.Core.CoverageAnalysis { public interface ICoverageAnalyser { - void DetermineTestCoverage(IProjectAndTests project, ITestRunner runner, IEnumerable mutants, ITestGuids resultFailingTests); + void DetermineTestCoverage(IProjectAndTests project, ITestRunner runner, IEnumerable mutants, ITestGuids resultFailingTests); } } diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs index d01d7153fb..35ddab27a4 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/DiffResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stryker.Abstractions.DiffProviders +namespace Stryker.Core.DiffProviders { public class DiffResult { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs index 530675b17f..41498070d7 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/GitDiffProvider.cs @@ -2,21 +2,21 @@ using System.IO; using System.Linq; using LibGit2Sharp; -using Stryker.Abstractions.Baseline.Providers; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Mutants; using Stryker.Utilities; -namespace Stryker.Abstractions.DiffProviders +namespace Stryker.Core.DiffProviders { public class GitDiffProvider : IDiffProvider { public TestSet Tests { get; } - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IGitInfoProvider _gitInfoProvider; - public GitDiffProvider(StrykerOptions options, TestSet tests, IGitInfoProvider gitInfoProvider = null) + public GitDiffProvider(IStrykerOptions options, TestSet tests, IGitInfoProvider gitInfoProvider = null) { Tests = tests; _options = options; @@ -54,7 +54,7 @@ public DiffResult ScanDiff() foreach (var patchChanges in repository.Diff.Compare(commit.Tree, DiffTargets.WorkingDirectory)) { - string diffPath = FilePathUtils.NormalizePathSeparators(Path.Combine(_gitInfoProvider.RepositoryPath, patchChanges.Path)); + var diffPath = FilePathUtils.NormalizePathSeparators(Path.Combine(_gitInfoProvider.RepositoryPath, patchChanges.Path)); if (testPaths.Any(testPath => diffPath.StartsWith(testPath))) { diff --git a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs index 900c5b27b9..237639ff6a 100644 --- a/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs +++ b/src/Stryker.Core/Stryker.Core/DiffProviders/IDiffProvider.cs @@ -1,6 +1,6 @@ -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.DiffProviders +namespace Stryker.Core.DiffProviders { public interface IDiffProvider { diff --git a/src/Stryker.Core/Stryker.Core/ExitCodes.cs b/src/Stryker.Core/Stryker.Core/ExitCodes.cs index bd4d6c4d83..d754ae5174 100644 --- a/src/Stryker.Core/Stryker.Core/ExitCodes.cs +++ b/src/Stryker.Core/Stryker.Core/ExitCodes.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions +namespace Stryker.Core { /// /// Known Stryker exit codes. diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs similarity index 88% rename from src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs rename to src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs index f8c06c3405..e56db83010 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/MsBuildHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using System.IO; using System.IO.Abstractions; -using System.Linq; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Testing; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.ToolHelpers; +namespace Stryker.Core.Helpers; public class MsBuildHelper { @@ -37,7 +36,7 @@ public MsBuildHelper(IFileSystem fileSystem = null, IProcessExecutor executor = public static string QuotesIfNeeded(string parameter) { - if (!parameter.Contains(' ') || parameter.Length<3 || (parameter[0] == '"' && parameter[^1]=='"')) + if (!parameter.Contains(' ') || parameter.Length < 3 || parameter[0] == '"' && parameter[^1] == '"') { return parameter; } @@ -75,7 +74,7 @@ public string GetMsBuildPath() { var (exe, command) = usingMsBuild ? GetMsBuildExeAndCommand() : ("dotnet", "build"); - List fullOptions = string.IsNullOrEmpty(command) ? [QuotesIfNeeded(projectFile)] : [command, QuotesIfNeeded(projectFile)]; + List fullOptions = string.IsNullOrEmpty(command) ? [QuotesIfNeeded(projectFile)] : [command, QuotesIfNeeded(projectFile)]; if (!string.IsNullOrEmpty(configuration)) { fullOptions.Add(usingMsBuild ? $"/property:Configuration={QuotesIfNeeded(configuration)}" : $"-c {QuotesIfNeeded(configuration)}"); @@ -91,14 +90,15 @@ public string GetMsBuildPath() return (_executor.Start(path, exe, arguments), exe, arguments); } - private (string executable, string command) GetMsBuildExeAndCommand() => GetMsBuildPath().EndsWith(".exe", System.StringComparison.InvariantCultureIgnoreCase) ? (_msBuildPath, string.Empty) : ("dotnet", QuotesIfNeeded(_msBuildPath)+' '); + private (string executable, string command) GetMsBuildExeAndCommand() => GetMsBuildPath().EndsWith(".exe", System.StringComparison.InvariantCultureIgnoreCase) ? (_msBuildPath, string.Empty) : ("dotnet", QuotesIfNeeded(_msBuildPath) + ' '); private string SearchMsBuildVersion(string version) { foreach (var drive in Directory.GetLogicalDrives()) { var visualStudioPath = Path.Combine(drive, "Program Files (x86)", "Microsoft Visual Studio"); - if (!_fileSystem.Directory.Exists(visualStudioPath)) continue; + if (!_fileSystem.Directory.Exists(visualStudioPath)) + continue; _logger.LogDebug("Using vswhere.exe to locate msbuild"); var vsWherePath = Path.Combine(visualStudioPath, "Installer", "vswhere.exe"); @@ -106,10 +106,12 @@ private string SearchMsBuildVersion(string version) $@"-{version} -requires Microsoft.Component.MSBuild -products * -find MSBuild\**\Bin\MSBuild.exe"; var vsWhereResult = _executor.Start(visualStudioPath, vsWherePath, vsWhereCommand); - if (vsWhereResult.ExitCode != ExitCodes.Success) continue; + if (vsWhereResult.ExitCode != ExitCodes.Success) + continue; var msBuildPath = vsWhereResult.Output.Trim(); - if (!_fileSystem.File.Exists(msBuildPath)) continue; - _logger.LogDebug("Msbuild executable path found at {MsBuildPath}",msBuildPath); + if (!_fileSystem.File.Exists(msBuildPath)) + continue; + _logger.LogDebug("Msbuild executable path found at {MsBuildPath}", msBuildPath); return msBuildPath; } diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs index 17391434ce..fb0e7ad598 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs @@ -5,7 +5,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; -namespace Stryker.Abstractions.Helpers +namespace Stryker.Core.Helpers { internal static class RoslynHelper { diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs similarity index 99% rename from src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs rename to src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs index 0cf8c53284..fa22a93451 100644 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/VsTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs @@ -10,8 +10,9 @@ using Microsoft.Extensions.Logging; using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Stryker.Abstractions.Logging; +using Stryker.Utilities; -namespace Stryker.Abstractions.ToolHelpers +namespace Stryker.Core.Helpers { public interface IVsTestHelper { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs index da35cdffe5..0f485e9720 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultCSharpExtensions.cs @@ -3,8 +3,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Stryker.Abstractions; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Initialisation.Buildalyzer +namespace Stryker.Core.Initialisation.Buildalyzer { public static class IAnalyzerResultCSharpExtensions { @@ -28,7 +29,7 @@ public static CSharpCompilationOptions GetCompilationOptions(this IAnalyzerResul return compilationOptions; } - public static CSharpParseOptions GetParseOptions(this IAnalyzerResult analyzerResult, StrykerOptions options) => new CSharpParseOptions(options.LanguageVersion, DocumentationMode.None, preprocessorSymbols: analyzerResult.PreprocessorSymbols); + public static CSharpParseOptions GetParseOptions(this IAnalyzerResult analyzerResult, IStrykerOptions options) => new CSharpParseOptions(options.LanguageVersion, DocumentationMode.None, preprocessorSymbols: analyzerResult.PreprocessorSymbols); private static NullableContextOptions GetNullableContextOptions(this IAnalyzerResult analyzerResult) { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs index 7ed38afb03..2f63ecdfaf 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs @@ -11,8 +11,9 @@ using Microsoft.Extensions.Logging; using NuGet.Frameworks; using Stryker.Abstractions.Exceptions; +using Stryker.Utilities; -namespace Stryker.Abstractions.Initialisation.Buildalyzer; +namespace Stryker.Core.Initialisation.Buildalyzer; public static class IAnalyzerResultExtensions { @@ -21,7 +22,7 @@ public static string GetAssemblyFileName(this IAnalyzerResult analyzerResult) => public static bool BuildsAnAssembly(this IAnalyzerResult analyzerResult) => analyzerResult.Properties.ContainsKey("TargetFileName"); - public static string GetReferenceAssemblyPath(this IAnalyzerResult analyzerResult) => analyzerResult.Properties.TryGetValue("TargetRefPath", out var property) ? FilePathUtils.NormalizePathSeparators(property) : GetAssemblyPath(analyzerResult); + public static string GetReferenceAssemblyPath(this IAnalyzerResult analyzerResult) => analyzerResult.Properties.TryGetValue("TargetRefPath", out var property) ? FilePathUtils.NormalizePathSeparators(property) : analyzerResult.GetAssemblyPath(); public static string GetAssemblyDirectoryPath(this IAnalyzerResult analyzerResult) => FilePathUtils.NormalizePathSeparators(analyzerResult.Properties["TargetDir"]); @@ -98,7 +99,7 @@ private static void LogAnalyzerLoadError(ILogger logger, object sender, Analyzer if (e.Exception != null) { - logger?.LogWarning("Failed to load analyzer '{Source}': Exception {Exception}.", source,e.Exception); + logger?.LogWarning("Failed to load analyzer '{Source}': Exception {Exception}.", source, e.Exception); } } @@ -150,7 +151,7 @@ internal static NuGetFramework GetNuGetFramework(this IAnalyzerResult analyzerRe throw new InputException(message); } - internal static bool TargetsFullFramework(this IAnalyzerResult analyzerResult) => GetNuGetFramework(analyzerResult).IsDesktop(); + internal static bool TargetsFullFramework(this IAnalyzerResult analyzerResult) => analyzerResult.GetNuGetFramework().IsDesktop(); public static Language GetLanguage(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("Language") switch @@ -195,7 +196,7 @@ internal static bool IsSignedAssembly(this IAnalyzerResult analyzerResult) => internal static string GetAssemblyOriginatorKeyFile(this IAnalyzerResult analyzerResult) { var assemblyKeyFileProp = analyzerResult.GetPropertyOrDefault("AssemblyOriginatorKeyFile"); - return assemblyKeyFileProp is null ? null : Path.Combine(Path.GetDirectoryName(analyzerResult.ProjectFilePath)??".", assemblyKeyFileProp); + return assemblyKeyFileProp is null ? null : Path.Combine(Path.GetDirectoryName(analyzerResult.ProjectFilePath) ?? ".", assemblyKeyFileProp); } internal static ImmutableDictionary GetDiagnosticOptions( @@ -241,7 +242,7 @@ private static string GetRootNamespace(this IAnalyzerResult analyzerResult) => analyzerResult.GetPropertyOrDefault("RootNamespace") ?? analyzerResult.GetAssemblyName(); internal static bool GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, bool defaultBoolean) => - bool.Parse(GetPropertyOrDefault(analyzerResult, name, defaultBoolean.ToString())); + bool.Parse(analyzerResult.GetPropertyOrDefault(name, defaultBoolean.ToString())); internal static string GetPropertyOrDefault(this IAnalyzerResult analyzerResult, string name, string defaultValue = default) => diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs index 916a4639c9..39eb54b3e2 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CrossPlatformAssemblyResolver.cs @@ -5,7 +5,7 @@ using System.Text; using Mono.Cecil; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { // This (CrossPlatformAssemblyResolver) is a copy of Mono.Cecil's BaseAssemblyResolver with all the conditional compilation removed and changes made to "Resolve" // Original: https://github.com/jbevain/cecil/blob/7b8ee049a151204997eecf587c69acc2f67c8405/Mono.Cecil/BaseAssemblyResolver.cs @@ -184,7 +184,7 @@ protected virtual AssemblyDefinition SearchDirectory(AssemblyNameReference name, { return GetAssembly(file, parameters); } - catch (System.BadImageFormatException) + catch (BadImageFormatException) { continue; } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs index be3925dfaa..a33a8a8f92 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs @@ -9,22 +9,25 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Initialisation.Buildalyzer; -using Stryker.Abstractions.MutantFilters.Extensions; using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; - -namespace Stryker.Abstractions.Initialisation +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.ProjectComponents; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.MutantFilters; +using Stryker.Abstractions.Options; + +namespace Stryker.Core.Initialisation { public class CsharpProjectComponentsBuilder : ProjectComponentsBuilder { private readonly SourceProjectInfo _projectInfo; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly string[] _foldersToExclude; private readonly ILogger _logger; - public CsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, StrykerOptions options, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) + public CsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, IStrykerOptions options, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) { _projectInfo = projectInfo; _options = options; @@ -56,7 +59,7 @@ private CsharpFolderComposite FindProjectFilesScanningProjectFolders(IAnalyzerRe foreach (var dir in ExtractProjectFolders(analyzerResult)) { var folder = FileSystem.Path.Combine(Path.GetDirectoryName(sourceProjectDir), dir); - _logger.LogDebug("Scanning {Folder}",folder); + _logger.LogDebug("Scanning {Folder}", folder); inputFiles.Add(FindInputFiles(folder, sourceProjectDir, analyzerResult, cSharpParseOptions)); } @@ -66,7 +69,7 @@ private CsharpFolderComposite FindProjectFilesScanningProjectFolders(IAnalyzerRe public override void InjectHelpers(IReadOnlyProjectComponent inputFiles) => InjectMutantHelpers((CsharpFolderComposite)inputFiles, BuildCsharpParseOptions(_projectInfo.AnalyzerResult, _options)); - private CsharpFolderComposite FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) + private CsharpFolderComposite FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, IStrykerOptions options) { var generatedAssemblyInfo = analyzerResult.AssemblyAttributeFileName(); var projectUnderTestFolderComposite = new CsharpFolderComposite() @@ -114,13 +117,13 @@ private CsharpFolderComposite FindProjectFilesUsingBuildalyzer(IAnalyzerResult a return projectUnderTestFolderComposite; } - public override Action PostBuildAction() => ( )=> ScanPackageContentFiles(_projectInfo.AnalyzerResult, (CsharpFolderComposite)_projectInfo.ProjectContents); + public override Action PostBuildAction() => () => ScanPackageContentFiles(_projectInfo.AnalyzerResult, (CsharpFolderComposite)_projectInfo.ProjectContents); public void ScanPackageContentFiles(IAnalyzerResult analyzerResult, CsharpFolderComposite projectUnderTestFolderComposite) { // look for extra source files coming from Nuget packages - var folder= analyzerResult.GetProperty("ContentPreprocessorOutputDirectory"); - var sourceProjectDir= Path.GetDirectoryName(analyzerResult.ProjectFilePath); + var folder = analyzerResult.GetProperty("ContentPreprocessorOutputDirectory"); + var sourceProjectDir = Path.GetDirectoryName(analyzerResult.ProjectFilePath); if (string.IsNullOrEmpty(folder)) { return; @@ -234,7 +237,7 @@ private void InjectMutantHelpers(CsharpFolderComposite rootFolderComposite, CSha } } - private static CSharpParseOptions BuildCsharpParseOptions(IAnalyzerResult analyzerResult, StrykerOptions options) => + private static CSharpParseOptions BuildCsharpParseOptions(IAnalyzerResult analyzerResult, IStrykerOptions options) => new(options.LanguageVersion, DocumentationMode.None, preprocessorSymbols: analyzerResult.PreprocessorSymbols); // get the FolderComposite object representing the project's folder 'targetFolder'. Build the needed FolderComposite(s) for a complete path @@ -281,7 +284,7 @@ private CsharpFolderComposite GetOrBuildFolderComposite(IDictionary { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs index 807fb94d7e..e0202d0962 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/FsharpProjectComponentsBuilder.cs @@ -1,29 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using Buildalyzer; using FSharp.Compiler.CodeAnalysis; using FSharp.Compiler.Text; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Control; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using Stryker.Core.ProjectComponents.Fsharp; +using Stryker.Core.ProjectComponents.SourceProjects; using static FSharp.Compiler.Syntax.ParsedInput; using IFileSystem = System.IO.Abstractions.IFileSystem; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { internal class FsharpProjectComponentsBuilder : ProjectComponentsBuilder { private readonly SourceProjectInfo _projectInfo; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly string[] _foldersToExclude; private readonly ILogger _logger; - public FsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, StrykerOptions options, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) + public FsharpProjectComponentsBuilder(SourceProjectInfo projectInfo, IStrykerOptions options, string[] foldersToExclude, ILogger logger, IFileSystem fileSystem) : base(fileSystem) { _projectInfo = projectInfo; _options = options; @@ -46,7 +47,7 @@ public override IReadOnlyProjectComponent Build() } // do nothing - public override void InjectHelpers(IReadOnlyProjectComponent inputFiles) {} + public override void InjectHelpers(IReadOnlyProjectComponent inputFiles) { } public override Action PostBuildAction() => () => { }; @@ -88,7 +89,7 @@ private FsharpFolderComposite FindProjectFilesUsingBuildalyzer(IAnalyzerResult a if (!FileSystem.File.Exists(sourceFile)) { - _logger.LogWarning("F# project builder: skipping non existing file {SourceFile}.",sourceFile); + _logger.LogWarning("F# project builder: skipping non existing file {SourceFile}.", sourceFile); continue; } @@ -182,7 +183,7 @@ private FsharpFolderComposite GetOrBuildFolderComposite(IDictionary(); } - public void InitialBuild(bool fullFramework, string projectPath, string solutionPath, string configuration=null, + public void InitialBuild(bool fullFramework, string projectPath, string solutionPath, string configuration = null, string msbuildPath = null) { if (fullFramework && string.IsNullOrEmpty(solutionPath)) @@ -32,7 +32,7 @@ public void InitialBuild(bool fullFramework, string projectPath, string solution throw new InputException("Stryker could not build your project as no solution file was presented. Please pass the solution path to stryker."); } - var msBuildHelper = new MsBuildHelper(executor: _processExecutor ,msBuildPath: msbuildPath); + var msBuildHelper = new MsBuildHelper(executor: _processExecutor, msBuildPath: msbuildPath); _logger.LogDebug("Started initial build using dotnet build"); @@ -41,7 +41,7 @@ public void InitialBuild(bool fullFramework, string projectPath, string solution var directoryName = Path.GetDirectoryName(target); var (result, exe, args) = msBuildHelper.BuildProject(directoryName, buildPath, fullFramework, configuration); - if (result.ExitCode!=ExitCodes.Success && !string.IsNullOrEmpty(solutionPath)) + if (result.ExitCode != ExitCodes.Success && !string.IsNullOrEmpty(solutionPath)) { // dump previous build result _logger.LogTrace("Initial build output: {0}", result.Output); @@ -83,7 +83,7 @@ private static string FormatBuildResultErrorString(string buildCommand, string o private static string QuotesIfNeeded(string parameter) { - if (!parameter.Contains(' ') || parameter.Length<3 || (parameter[0] == '"' && parameter[^1]=='"')) + if (!parameter.Contains(' ') || parameter.Length < 3 || parameter[0] == '"' && parameter[^1] == '"') { return parameter; } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs index 1814f29e09..caaeb7df93 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs @@ -1,13 +1,16 @@ using System.Diagnostics; using Microsoft.Extensions.Logging; +using Stryker.Abstractions; +using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Options; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public interface IInitialTestProcess { - InitialTestRun InitialTest(StrykerOptions options, IProjectAndTests project, ITestRunner testRunner); + InitialTestRun InitialTest(IStrykerOptions options, IProjectAndTests project, ITestRunner testRunner); } public class InitialTestProcess : IInitialTestProcess @@ -25,7 +28,7 @@ public class InitialTestProcess : IInitialTestProcess /// /// Stryker options /// The duration of the initial test run - public InitialTestRun InitialTest(StrykerOptions options, IProjectAndTests project, ITestRunner testRunner) + public InitialTestRun InitialTest(IStrykerOptions options, IProjectAndTests project, ITestRunner testRunner) { // Setup a stopwatch to record the initial test duration var stopwatch = new Stopwatch(); diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs index 0419d950ae..7ddae6eb46 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestRun.cs @@ -1,6 +1,7 @@ -using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public class InitialTestRun { @@ -11,6 +12,6 @@ public InitialTestRun(TestRunResult result, ITimeoutValueCalculator timeoutValue } public TestRunResult Result { get; } - public ITimeoutValueCalculator TimeoutValueCalculator { get;} + public ITimeoutValueCalculator TimeoutValueCalculator { get; } } } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs index dc1efa0555..088cd0c9c8 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs @@ -4,14 +4,14 @@ using System.Linq; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutationTest; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.Options; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.Initialisation; -// For mocking purposes +namespace Stryker.Core.Initialisation; public interface IInitialisationProcess { @@ -20,11 +20,11 @@ public interface IInitialisationProcess /// /// stryker options /// an enumeration of , one for each found project (if any). - IReadOnlyCollection GetMutableProjectsInfo(StrykerOptions options); + IReadOnlyCollection GetMutableProjectsInfo(IStrykerOptions options); - void BuildProjects(StrykerOptions options, IEnumerable projects); + void BuildProjects(IStrykerOptions options, IEnumerable projects); - IReadOnlyCollection GetMutationTestInputs(StrykerOptions options, + IReadOnlyCollection GetMutationTestInputs(IStrykerOptions options, IReadOnlyCollection projects, ITestRunner runner); } @@ -47,7 +47,7 @@ public InitialisationProcess( } /// - public IReadOnlyCollection GetMutableProjectsInfo(StrykerOptions options) + public IReadOnlyCollection GetMutableProjectsInfo(IStrykerOptions options) { _logger.LogInformation("Analysis starting."); try @@ -62,7 +62,7 @@ public IReadOnlyCollection GetMutableProjectsInfo(StrykerOpti } /// - public void BuildProjects(StrykerOptions options, IEnumerable projects) + public void BuildProjects(IStrykerOptions options, IEnumerable projects) { if (options.IsSolutionContext) { @@ -98,12 +98,12 @@ public void BuildProjects(StrykerOptions options, IEnumerable // perform post build update (to capture some content files in C# project for example) foreach (var project in projects) { - project.OnProjectBuilt?.Invoke(); - } + project.OnProjectBuilt?.Invoke(); + } } - public IReadOnlyCollection GetMutationTestInputs(StrykerOptions options, - IReadOnlyCollection projects, ITestRunner runner) + public IReadOnlyCollection GetMutationTestInputs(IStrykerOptions options, + IReadOnlyCollection projects, ITestRunner runner) { var result = new List(); foreach (var info in projects) @@ -113,14 +113,14 @@ public IReadOnlyCollection GetMutationTestInputs(StrykerOptio SourceProjectInfo = info, TestProjectsInfo = info.TestProjectsInfo, TestRunner = runner, - InitialTestRun = InitialTest(options, info, runner, projects.Count == 1) + InitialTestRun = InitialTest(options, info, runner, projects.Count == 1) }); } return result; } - private InitialTestRun InitialTest(StrykerOptions options, SourceProjectInfo projectInfo, + private InitialTestRun InitialTest(IStrykerOptions options, SourceProjectInfo projectInfo, ITestRunner testRunner, bool throwIfFails) { DiscoverTests(projectInfo, testRunner); @@ -164,9 +164,9 @@ private InitialTestRun InitialTest(StrykerOptions options, SourceProjectInfo pro private static readonly Dictionary TestFrameworks = new() { - ["xunit.core"] = ("xunit.runner.visualstudio","xunit.runner.visualstudio"), + ["xunit.core"] = ("xunit.runner.visualstudio", "xunit.runner.visualstudio"), ["nunit.framework"] = ("NUnit3.TestAdapter", "NUnit3TestAdapter"), - ["Microsoft.VisualStudio.TestPlatform.TestFramework"] = + ["Microsoft.VisualStudio.TestPlatform.TestFramework"] = ("Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter", "MSTest.TestAdapter") }; @@ -193,14 +193,14 @@ private void DiscoverTests(SourceProjectInfo projectInfo, ITestRunner testRunner $"Project '{testProject.ProjectFilePath}' did not report any test."; if (testProject.PackageReferences?.ContainsKey(package) == true) { - message+=$" This may be because the test adapter package, {package}, failed to deploy or run. " + + message += $" This may be because the test adapter package, {package}, failed to deploy or run. " + "Check if any dependency is missing or there is a version conflict, check the testdiscovery logs or explore with VsTest.console."; } else { - message += - $" This may be because it is missing an appropriate VsTest adapter for '{framework}'. " + - $"Adding '{adapter}' to this project references may resolve the issue."; + message += + $" This may be because it is missing an appropriate VsTest adapter for '{framework}'. " + + $"Adding '{adapter}' to this project references may resolve the issue."; } projectInfo.LogError(message); diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs index c58f7106ba..3ec8437b15 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs @@ -10,18 +10,18 @@ using Buildalyzer.Environment; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Testing; +using Stryker.Abstractions.Options; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.Initialisation; +namespace Stryker.Core.Initialisation; public interface IInputFileResolver { - IReadOnlyCollection ResolveSourceProjectInfos(StrykerOptions options); + IReadOnlyCollection ResolveSourceProjectInfos(IStrykerOptions options); IFileSystem FileSystem { get; } } @@ -56,15 +56,15 @@ public InputFileResolver() : this(new FileSystem()) { } public IFileSystem FileSystem { get; } - public IReadOnlyCollection ResolveSourceProjectInfos(StrykerOptions options) + public IReadOnlyCollection ResolveSourceProjectInfos(IStrykerOptions options) { - var manager = _analyzerProvider.Provide(options.SolutionPath, options.DevMode ? new AnalyzerManagerOptions { LogWriter = _buildalyzerLog }: null); + var manager = _analyzerProvider.Provide(options.SolutionPath, options.DevMode ? new AnalyzerManagerOptions { LogWriter = _buildalyzerLog } : null); if (options.IsSolutionContext) { var projectList = manager.Projects.Values.Select(p => p.ProjectFile.Path).ToList(); _logger.LogInformation("Identifying projects to mutate in {solution}. This can take a while.", options.SolutionPath); - return AnalyzeAndIdentifyProjects(projectList , options, manager, ScanMode.NoScan); + return AnalyzeAndIdentifyProjects(projectList, options, manager, ScanMode.NoScan); } // we analyze the test project(s) and identify the project to be mutated @@ -97,7 +97,7 @@ public IReadOnlyCollection ResolveSourceProjectInfos(StrykerO .Append(BuildReferenceChoice(result.Select(p => p.AnalyzerResult.ProjectFilePath))); throw new InputException(stringBuilder.ToString()); } - + public string FindTestProject(string path) { var projectFile = FindProjectFile(path); @@ -111,7 +111,7 @@ private enum ScanMode ScanTestProjectReferences = 1 // add test project references during scan } - private List AnalyzeAndIdentifyProjects(List projectList, StrykerOptions options, + private List AnalyzeAndIdentifyProjects(List projectList, IStrykerOptions options, IAnalyzerManager manager, ScanMode mode) { // build all projects @@ -148,39 +148,39 @@ private List AnalyzeAndIdentifyProjects(List projectL return projectInfos; } - private ConcurrentBag<(IAnalyzerResults result, bool isTest)> AnalyzeAllNeededProjects(List projectList, StrykerOptions options, IAnalyzerManager manager, ScanMode mode) + private ConcurrentBag<(IAnalyzerResults result, bool isTest)> AnalyzeAllNeededProjects(List projectList, IStrykerOptions options, IAnalyzerManager manager, ScanMode mode) { var mutableProjectsAnalyzerResults = new ConcurrentBag<(IAnalyzerResults result, bool isTest)>(); try { var list = new DynamicEnumerableQueue(projectList); var normalizedProjectUnderTestNameFilter = !string.IsNullOrEmpty(options.SourceProjectName) ? options.SourceProjectName.Replace("\\", "/") : null; - while(!list.Empty) + while (!list.Empty) { Parallel.ForEach(list.Consume(), new ParallelOptions - { MaxDegreeOfParallelism = options.DevMode ? 1 : Math.Max(options.Concurrency, 1) }, projectFile => + { MaxDegreeOfParallelism = options.DevMode ? 1 : Math.Max(options.Concurrency, 1) }, projectFile => + { + var project = manager.GetProject(projectFile); + var buildResult = AnalyzeSingleProject(project, options); + if (buildResult.Count == 0) { - var project = manager.GetProject(projectFile); - var buildResult = AnalyzeSingleProject(project, options); - if (buildResult.Count == 0) - { - // analysis failed - return; - } - var isTestProject = buildResult.IsTestProject(); - var referencesToAdd = ScanReferences(mode, buildResult); - - var addProject = isTestProject || normalizedProjectUnderTestNameFilter == null || - project.ProjectFile.Path.Replace('\\', '/') - .Contains(normalizedProjectUnderTestNameFilter, StringComparison.InvariantCultureIgnoreCase); - if (addProject) - mutableProjectsAnalyzerResults.Add((buildResult, isTestProject)); - foreach (var reference in referencesToAdd) - { - list.Add(reference); - } - }); + // analysis failed + return; + } + var isTestProject = buildResult.IsTestProject(); + var referencesToAdd = ScanReferences(mode, buildResult); + + var addProject = isTestProject || normalizedProjectUnderTestNameFilter == null || + project.ProjectFile.Path.Replace('\\', '/') + .Contains(normalizedProjectUnderTestNameFilter, StringComparison.InvariantCultureIgnoreCase); + if (addProject) + mutableProjectsAnalyzerResults.Add((buildResult, isTestProject)); + foreach (var reference in referencesToAdd) + { + list.Add(reference); + } + }); } } catch (AggregateException ex) @@ -212,7 +212,7 @@ private List ScanReferences(ScanMode mode, IAnalyzerResults buildResult) foreach (var projectReference in buildResult.SelectMany(p => p.ProjectReferences)) { // in single level mode we only want to find the projects referenced by test project - if (( mode == ScanMode.ScanTestProjectReferences && !isTestProject) || !FileSystem.File.Exists(projectReference)) + if (mode == ScanMode.ScanTestProjectReferences && !isTestProject || !FileSystem.File.Exists(projectReference)) { continue; } @@ -223,7 +223,7 @@ private List ScanReferences(ScanMode mode, IAnalyzerResults buildResult) return referencesToAdd; } - private IAnalyzerResults AnalyzeSingleProject(IProjectAnalyzer project, StrykerOptions options) + private IAnalyzerResults AnalyzeSingleProject(IProjectAnalyzer project, IStrykerOptions options) { if (options.DevMode) { @@ -231,11 +231,11 @@ private IAnalyzerResults AnalyzeSingleProject(IProjectAnalyzer project, StrykerO _buildalyzerLog.GetStringBuilder().Clear(); } var projectLogName = Path.GetRelativePath(options.WorkingDirectory, project.ProjectFile.Path); - _logger.LogDebug("Analyzing {ProjectFilePath}", projectLogName); + _logger.LogDebug("Analyzing {ProjectFilePath}", projectLogName); var buildResult = project.Build([options.TargetFramework]); var buildResultOverallSuccess = buildResult.OverallSuccess || Array. - TrueForAll(project.ProjectFile.TargetFrameworks,tf => + TrueForAll(project.ProjectFile.TargetFrameworks, tf => buildResult.Any(br => IsValid(br) && br.TargetFramework == tf)); if (!buildResultOverallSuccess) @@ -259,10 +259,10 @@ private IAnalyzerResults AnalyzeSingleProject(IProjectAnalyzer project, StrykerO buildResult = project.Build([options.TargetFramework], buildOptions); // check the new status - buildResultOverallSuccess = Array.TrueForAll(project.ProjectFile.TargetFrameworks,tf => + buildResultOverallSuccess = Array.TrueForAll(project.ProjectFile.TargetFrameworks, tf => buildResult.Any(br => IsValid(br) && br.TargetFramework == tf)); } - + if (buildResultOverallSuccess) { _logger.LogDebug("Analysis of project {projectFilePath} succeeded.", projectLogName); @@ -285,7 +285,7 @@ private IAnalyzerResults AnalyzeSingleProject(IProjectAnalyzer project, StrykerO return buildResult.All(br => !IsValid(br)) ? new AnalyzerResults() : buildResult; } - private void LogAnalyzerResult(IAnalyzerResults analyzerResults, StrykerOptions options) + private void LogAnalyzerResult(IAnalyzerResults analyzerResults, IStrykerOptions options) { // do not log if trace is not enabled if (!_logger.IsEnabled(LogLevel.Trace) || !options.DevMode) @@ -297,15 +297,15 @@ private void LogAnalyzerResult(IAnalyzerResults analyzerResults, StrykerOptions log.AppendLine("**** Buildalyzer result ****"); log.AppendLine($"Project: {analyzerResults.First().ProjectFilePath}"); - foreach(var analyzerResult in analyzerResults) + foreach (var analyzerResult in analyzerResults) { - log.AppendLine($"TargetFramework: {analyzerResult.TargetFramework}" ); + log.AppendLine($"TargetFramework: {analyzerResult.TargetFramework}"); log.AppendLine("Succeeded: {analyzerResult.Succeeded}"); var properties = analyzerResult.Properties ?? new Dictionary(); foreach (var property in importantProperties) { - log.AppendLine($"Property {property}={properties.GetValueOrDefault(property)??"\"'undefined'\""}"); + log.AppendLine($"Property {property}={properties.GetValueOrDefault(property) ?? "\"'undefined'\""}"); } foreach (var sourceFile in analyzerResult.SourceFiles ?? Enumerable.Empty()) { @@ -319,7 +319,8 @@ private void LogAnalyzerResult(IAnalyzerResults analyzerResults, StrykerOptions foreach (var property in properties) { - if (importantProperties.Contains(property.Key)) continue; // already logged + if (importantProperties.Contains(property.Key)) + continue; // already logged log.AppendLine($"Property {property.Key}={property.Value.Replace(Environment.NewLine, "\\n")}"); } log.AppendLine(); @@ -338,8 +339,8 @@ public IAnalyzerResult SelectAnalyzerResult(IEnumerable analyze if (targetFramework is null) { - // we try to avoid desktop versions - return validResults.Find(a => a.Succeeded && !a.TargetsFullFramework()) ?? validResults[0]; + // we try to avoid desktop versions + return validResults.Find(a => a.Succeeded && !a.TargetsFullFramework()) ?? validResults[0]; } var resultForRequestedFramework = validResults.Find(a => a.TargetFramework == targetFramework); @@ -362,20 +363,20 @@ public IAnalyzerResult SelectAnalyzerResult(IEnumerable analyze } // checks if an analyzer result is valid - private static bool IsValid(IAnalyzerResult br) => br.Succeeded || (br.SourceFiles.Length > 0 && br.References.Length > 0 && br.TargetFramework !=null); + private static bool IsValid(IAnalyzerResult br) => br.Succeeded || br.SourceFiles.Length > 0 && br.References.Length > 0 && br.TargetFramework != null; private static Dictionary> FindMutableAnalyzerResults(ConcurrentBag<(IAnalyzerResults result, bool isTest)> mutableProjectsAnalyzerResults) { var mutableToTestMap = new Dictionary>(); - var analyzerTestProjects = mutableProjectsAnalyzerResults.Where(p => p.isTest).SelectMany(p=>p.result).Where(p => p.BuildsAnAssembly()); - var mutableProjects = mutableProjectsAnalyzerResults.Where(p => !p.isTest).SelectMany(p=>p.result).Where(p => p.BuildsAnAssembly()).ToArray(); + var analyzerTestProjects = mutableProjectsAnalyzerResults.Where(p => p.isTest).SelectMany(p => p.result).Where(p => p.BuildsAnAssembly()); + var mutableProjects = mutableProjectsAnalyzerResults.Where(p => !p.isTest).SelectMany(p => p.result).Where(p => p.BuildsAnAssembly()).ToArray(); // for each test project foreach (var testProject in analyzerTestProjects) { // we identify which project are referenced by it - foreach(var mutableProject in mutableProjects) + foreach (var mutableProject in mutableProjects) { - if (Array.TrueForAll( testProject.References, r => + if (Array.TrueForAll(testProject.References, r => !r.Equals(mutableProject.GetAssemblyPath(), StringComparison.OrdinalIgnoreCase) && !r.Equals(mutableProject.GetReferenceAssemblyPath(), StringComparison.OrdinalIgnoreCase))) { @@ -400,7 +401,7 @@ private static Dictionary> FindMutableAna /// project buildalyzer result /// test project(s) buildalyzer result(s) /// - private SourceProjectInfo BuildSourceProjectInfo(StrykerOptions options, + private SourceProjectInfo BuildSourceProjectInfo(IStrykerOptions options, IAnalyzerResult analyzerResult, IEnumerable analyzerResults) { @@ -441,7 +442,7 @@ private SourceProjectInfo BuildSourceProjectInfo(StrykerOptions options, targetProjectInfo.ProjectContents = inputFiles; _logger.LogInformation("Found project {0} to mutate.", analyzerResult.ProjectFilePath); - targetProjectInfo.TestProjectsInfo = new(FileSystem) + targetProjectInfo.TestProjectsInfo = new TestProjectsInfo(FileSystem) { TestProjects = analyzerResults.Select(testProjectAnalyzerResult => new TestProject(FileSystem, testProjectAnalyzerResult)).ToList() }; @@ -470,7 +471,7 @@ private string FindProjectFile(string path) throw new InputException($"No .csproj or .fsproj file found, please check your project directory at {path}"); } - _logger.LogTrace("Scanned the directory {Path} for *.csproj files: found {ProjectFilesCount}", path, projectFiles); + _logger.LogTrace("Scanned the directory {Path} for *.csproj files: found {ProjectFilesCount}", path, projectFiles); switch (projectFiles.Length) { @@ -514,7 +515,7 @@ private sealed class DynamicEnumerableQueue public DynamicEnumerableQueue(IEnumerable init) { - _cache = [..init]; + _cache = [.. init]; _queue = new Queue(_cache); } @@ -531,7 +532,7 @@ public void Add(T entry) public IEnumerable Consume() { - while(_queue.Count > 0) + while (_queue.Count > 0) { yield return _queue.Dequeue(); } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs index c4efc9a630..93384d79db 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/Language.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public enum Language { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs index 8ed9fc7505..32a3031185 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs @@ -4,10 +4,10 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Testing; -using Stryker.Abstractions.ToolHelpers; +using Stryker.Core.Helpers; +using Stryker.Core.Testing; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public interface INugetRestoreProcess { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs index 6c097b9660..ac7bdfc8b8 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectComponentsBuilder.cs @@ -10,7 +10,7 @@ using System.IO.Abstractions; using Stryker.Utilities; -namespace Stryker.Abstractions.Initialisation; +namespace Stryker.Core.Initialisation; public abstract class ProjectComponentsBuilder { diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs index fc78dd24ff..01699099fe 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectMutator.cs @@ -3,16 +3,18 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Stryker.Abstractions.Reporting; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public interface IProjectMutator { - IMutationTestProcess MutateProject(StrykerOptions options, MutationTestInput input, IReporter reporters); + IMutationTestProcess MutateProject(IStrykerOptions options, MutationTestInput input, IReporter reporters); } public class ProjectMutator : IProjectMutator @@ -26,11 +28,11 @@ public ProjectMutator(IMutationTestProcess mutationTestProcess = null) _logger = ApplicationLogging.LoggerFactory.CreateLogger(); } - public IMutationTestProcess MutateProject(StrykerOptions options, MutationTestInput input, IReporter reporters) + public IMutationTestProcess MutateProject(IStrykerOptions options, MutationTestInput input, IReporter reporters) { var process = _injectedMutationTestProcess ?? new MutationTestProcess(input, options, reporters, new MutationTestExecutor(input.TestRunner)); - + // Enrich test projects info with unit tests EnrichTestProjectsWithTestInfo(input.InitialTestRun, input.TestProjectsInfo); @@ -40,7 +42,7 @@ public IMutationTestProcess MutateProject(StrykerOptions options, MutationTestIn return process; } - private void EnrichTestProjectsWithTestInfo(InitialTestRun initialTestRun, TestProjectsInfo testProjectsInfo) + private void EnrichTestProjectsWithTestInfo(InitialTestRun initialTestRun, ITestProjectsInfo testProjectsInfo) { var unitTests = initialTestRun.Result.VsTestDescriptions diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs index 45c1beb4c6..a782db2fb5 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs @@ -6,23 +6,24 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Mono.Cecil; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutationTest; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.Reporters; +using Stryker.Abstractions.Options; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.TestRunners.VsTest; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.TestRunners; +using Stryker.Core.TestRunners.VsTest; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { - public interface IProjectOrchestrator: IDisposable + public interface IProjectOrchestrator : IDisposable { - IEnumerable MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner = null); + IEnumerable MutateProjects(IStrykerOptions options, IReporter reporters, ITestRunner runner = null); } - + public sealed class ProjectOrchestrator : IProjectOrchestrator { private IInitialisationProcess _initializationProcess; @@ -44,7 +45,7 @@ public ProjectOrchestrator(IProjectMutator projectMutator = null, _initializationProcess = initializationProcess; } - public IEnumerable MutateProjects(StrykerOptions options, IReporter reporters, + public IEnumerable MutateProjects(IStrykerOptions options, IReporter reporters, ITestRunner runner = null) { @@ -73,14 +74,14 @@ public IEnumerable MutateProjects(StrykerOptions options, return mutationTestProcesses; } - private void InitializeDashboardProjectInformation(StrykerOptions options, SourceProjectInfo projectInfo) + private void InitializeDashboardProjectInformation(IStrykerOptions options, SourceProjectInfo projectInfo) { var dashboardReporterEnabled = options.Reporters.Contains(Reporter.Dashboard) || options.Reporters.Contains(Reporter.All); var dashboardBaselineEnabled = options.WithBaseline && options.BaselineProvider == BaselineProvider.Dashboard; var requiresProjectInformation = dashboardReporterEnabled || dashboardBaselineEnabled; var missingProjectName = string.IsNullOrEmpty(options.ProjectName); var missingProjectVersion = string.IsNullOrEmpty(options.ProjectVersion); - if (!requiresProjectInformation || (!missingProjectVersion && !missingProjectName)) + if (!requiresProjectInformation || !missingProjectVersion && !missingProjectName) { return; } diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs index c2566049f2..362f78df7e 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/TimeoutValueCalculator.cs @@ -1,6 +1,7 @@ using System; +using Stryker.Abstractions; -namespace Stryker.Abstractions.Initialisation +namespace Stryker.Core.Initialisation { public class TimeoutValueCalculator : ITimeoutValueCalculator { @@ -17,7 +18,7 @@ public TimeoutValueCalculator(int extraMs, int testSessionTime, int aggregatedTe _initializationTime = Math.Max(testSessionTime - aggregatedTestTimes, 0); _aggregatedTestTimes = aggregatedTestTimes; } - + public int DefaultTimeout => CalculateTimeoutValue(_aggregatedTestTimes); public int CalculateTimeoutValue(int estimatedTime) => (int)((_initializationTime + estimatedTime) * Ratio) + _extraMs; diff --git a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs index 5dabe720b9..03b4842c9d 100644 --- a/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs +++ b/src/Stryker.Core/Stryker.Core/InjectedHelpers/CodeInjection.cs @@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Abstractions.InjectedHelpers +namespace Stryker.Core.InjectedHelpers { public class CodeInjection { @@ -75,14 +75,14 @@ public ObjectCreationExpressionSyntax GetContextClassConstructor() => .WithLeadingTrivia(SyntaxFactory.Space), SyntaxFactory.ArgumentList(), null); - + /// /// Get a SyntaxNode describing accessing a member of the mutant context class. /// /// Desired member /// Returns Stryker.MutantContext. with proper namespace - public MemberAccessExpressionSyntax GetContextClassAccessExpression(string member) => + public MemberAccessExpressionSyntax GetContextClassAccessExpression(string member) => SyntaxFactory.MemberAccessExpression( SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.MemberAccessExpression( @@ -99,7 +99,8 @@ public MemberAccessExpressionSyntax GetContextClassAccessExpression(string memb /// expected member name /// Returns true if the expression is Stryker.MutantContext. with proper namespace public static bool IsContextAccessExpression(ExpressionSyntax memberAccess, string member) => - memberAccess is MemberAccessExpressionSyntax { + memberAccess is MemberAccessExpressionSyntax + { Expression: MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: MutantContextClassName } diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs index 88fd2f6e4f..ffbf8b4118 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/BaseEngine.cs @@ -1,9 +1,9 @@ using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Base logic for all instrumentation helpers. It takes of generating a specific annotation @@ -11,7 +11,7 @@ namespace Stryker.Abstractions.Instrumentation; /// SyntaxNode type handled by this helper. /// There is no standard helper injection method as each injector may require specific arguments. /// Multiple helpers can work on the same type of constructs. -internal abstract class BaseEngine: IInstrumentCode where T: CSharpSyntaxNode +internal abstract class BaseEngine : IInstrumentCode where T : CSharpSyntaxNode { protected BaseEngine() => Marker = MutantPlacer.RegisterEngine(this); diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs index 8e31b6f6dc..e52ee5d5ef 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/ConditionalInstrumentationEngine.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Injects a mutation controlled by a conditional operator. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs index bd81547969..e875ff50e6 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/DefaultInitializationEngine.cs @@ -4,9 +4,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Injects initialization to default value for a parameter or a variable at the beginning of a method. @@ -54,7 +54,7 @@ public BlockSyntax InjectOutParametersInitialization(BlockSyntax body, IEnumerab originalStatements = body.Statements; } - var initializersBlock = SyntaxFactory.Block(initializers.Union( parameters.Select( p => SyntaxFactory.ExpressionStatement(SyntaxFactory.AssignmentExpression( + var initializersBlock = SyntaxFactory.Block(initializers.Union(parameters.Select(p => SyntaxFactory.ExpressionStatement(SyntaxFactory.AssignmentExpression( SyntaxKind.SimpleAssignmentExpression, SyntaxFactory.IdentifierName(p.Identifier), p.Type.BuildDefaultExpression()))))) .WithAdditionalAnnotations(BlockMarker); diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs index 4232d429a0..0a6c9d4da5 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/EndingReturnEngine.cs @@ -2,14 +2,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Injects 'return default(...)' statement at the end of a method /// -internal class EndingReturnEngine: BaseEngine +internal class EndingReturnEngine : BaseEngine { public BlockSyntax InjectReturn(BlockSyntax block, TypeSyntax type) { @@ -25,7 +25,7 @@ public BlockSyntax InjectReturn(BlockSyntax block, TypeSyntax type) return block; } - block = block.AddStatements(SyntaxFactory.ReturnStatement( type == null ? + block = block.AddStatements(SyntaxFactory.ReturnStatement(type == null ? SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression).WithLeadingTrivia(SyntaxFactory.Space) : type.BuildDefaultExpression())).WithAdditionalAnnotations(Marker); diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs index ccdc7735c9..2817faac10 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IInstrumentCode.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using System; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Implements code instrumentation logic. diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs index f89ad15ddc..89d242a7db 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/IfInstrumentationEngine.cs @@ -3,12 +3,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Abstractions.Instrumentation; +namespace Stryker.Core.Instrumentation; /// /// Injects a mutation controlled by an if Statement. /// -internal class IfInstrumentationEngine: BaseEngine +internal class IfInstrumentationEngine : BaseEngine { /// /// Injects an if statement with the original code or the mutated one, depending on condition's result. @@ -19,7 +19,7 @@ internal class IfInstrumentationEngine: BaseEngine /// A statement containing the expected construct. /// This method works with statement and block. public IfStatementSyntax InjectIf(ExpressionSyntax condition, StatementSyntax originalNode, StatementSyntax mutatedNode) => - SyntaxFactory.IfStatement(condition, + SyntaxFactory.IfStatement(condition, AsBlock(mutatedNode), SyntaxFactory.ElseClause(AsBlock(originalNode))).WithAdditionalAnnotations(Marker); diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs index c437f684e7..041f72ae49 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInitializerMarkerEngine.cs @@ -2,14 +2,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.InjectedHelpers; +using Stryker.Core.InjectedHelpers; -namespace Stryker.Abstractions.Instrumentation +namespace Stryker.Core.Instrumentation { /// /// Injects static tracking logic in static fields/properties' initializers. /// - internal class StaticInitializerMarkerEngine: BaseEngine + internal class StaticInitializerMarkerEngine : BaseEngine { private const string MutantContextValueTrackName = "TrackValue"; diff --git a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs index bce6085e16..2816f0d05d 100644 --- a/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs +++ b/src/Stryker.Core/Stryker.Core/Instrumentation/StaticInstrumentationEngine.cs @@ -1,9 +1,9 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.InjectedHelpers; +using Stryker.Core.InjectedHelpers; -namespace Stryker.Abstractions.Instrumentation +namespace Stryker.Core.Instrumentation { /// /// Injects a static marker, to help identification of mutations executed through a static constructor/method/property... @@ -17,12 +17,12 @@ internal class StaticInstrumentationEngine : BaseEngine /// /// public BlockSyntax PlaceStaticContextMarker(BlockSyntax block, CodeInjection injector) => - SyntaxFactory.Block( + SyntaxFactory.Block( SyntaxFactory.UsingStatement(null, injector.GetContextClassConstructor(), block)).WithAdditionalAnnotations(Marker); - + protected override SyntaxNode Revert(BlockSyntax node) { - if ( node.Statements.Count == 1 && node.Statements[0] is UsingStatementSyntax usingStatement) + if (node.Statements.Count == 1 && node.Statements[0] is UsingStatementSyntax usingStatement) { return usingStatement.Statement; } diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs index cd32444fd5..cead9da75b 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs @@ -4,19 +4,19 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.Baseline.Utils; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters.Json; using Stryker.Abstractions.Reporting; -using Stryker.Abstractions; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Baseline.Utils; +using Stryker.Core.Mutants; using Stryker.Utilities; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public class BaselineMutantFilter : IMutantFilter { @@ -25,13 +25,13 @@ public class BaselineMutantFilter : IMutantFilter private readonly ILogger _logger; private readonly IBaselineMutantHelper _baselineMutantHelper; - private readonly StrykerOptions _options; - private readonly JsonReport _baseline; + private readonly IStrykerOptions _options; + private readonly IJsonReport _baseline; public MutantFilter Type => MutantFilter.Baseline; public string DisplayName => "baseline filter"; - public BaselineMutantFilter(StrykerOptions options, IBaselineProvider baselineProvider = null, + public BaselineMutantFilter(IStrykerOptions options, IBaselineProvider baselineProvider = null, IGitInfoProvider gitInfoProvider = null, IBaselineMutantHelper baselineMutantHelper = null) { _logger = ApplicationLogging.LoggerFactory.CreateLogger(); @@ -48,8 +48,8 @@ public BaselineMutantFilter(StrykerOptions options, IBaselineProvider baselinePr } - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, - StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, + IStrykerOptions options) { if (options.WithBaseline) { @@ -68,7 +68,7 @@ public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyF return mutants; } - private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadOnlyFileLeaf file) + private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadOnlyFileLeaf file) { if (!_baseline.Files.ContainsKey(FilePathUtils.NormalizePathSeparators(file.RelativePath))) { @@ -91,7 +91,7 @@ private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadO continue; } - IEnumerable matchingMutants = + var matchingMutants = _baselineMutantHelper.GetMutantMatchingSourceCode(mutants, baselineMutant, baselineMutantSourceCode); @@ -101,7 +101,7 @@ private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IReadO } private void SetMutantStatusToBaselineMutantStatus(IJsonMutant baselineMutant, - IEnumerable matchingMutants) + IEnumerable matchingMutants) { if (matchingMutants.Count() == 1) { @@ -119,7 +119,7 @@ private void SetMutantStatusToBaselineMutantStatus(IJsonMutant baselineMutant, } } - private async Task GetBaselineAsync() + private async Task GetBaselineAsync() { var branchName = _gitInfoProvider.GetCurrentBranchName(); @@ -141,7 +141,7 @@ private async Task GetBaselineAsync() return report; } - private async Task GetFallbackBaselineAsync(bool baseline = true) + private async Task GetFallbackBaselineAsync(bool baseline = true) { var report = await _baselineProvider.Load($"{(baseline ? "baseline/" : "")}{_options.FallbackVersion}"); diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs index 1a3ae3ab9b..84f2aae79e 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BroadcastMutantFilter.cs @@ -1,10 +1,10 @@ -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public class BroadcastMutantFilter : IMutantFilter { @@ -15,7 +15,7 @@ public class BroadcastMutantFilter : IMutantFilter public string DisplayName => "broadcast filter"; - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) { var mutantsToTest = mutants.Where(m => m.ResultStatus is not MutantStatus.Ignored); diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs index e5f476dbe1..ccf5c656ce 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeFromCodeCoverageFilter.cs @@ -1,20 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public class ExcludeFromCodeCoverageFilter : IMutantFilter { public MutantFilter Type => MutantFilter.ExcludeFromCodeCoverage; public string DisplayName => "exclude from code coverage filter"; - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) { return mutants.Where(m => !Exclude(m.Mutation.OriginalNode)); } diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs index f367a460ff..d561a5aef0 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeLinqExpressionFilter.cs @@ -4,12 +4,13 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { /// /// Checks if the linq expression of the mutant should be excluded. @@ -21,11 +22,11 @@ public class ExcludeLinqExpressionFilter : IMutantFilter public string DisplayName => "linq expression filter"; private SyntaxTriviaRemover _triviaRemover { get; init; } = new SyntaxTriviaRemover(); - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) => options.ExcludedLinqExpressions.Any() ? + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) => options.ExcludedLinqExpressions.Any() ? mutants.Where(m => m.Mutation.Type != Mutator.Linq || !IsIgnoreExpression(m.Mutation.OriginalNode, options)) : mutants; - private bool IsIgnoreExpression(SyntaxNode syntaxNode, StrykerOptions options) => + private bool IsIgnoreExpression(SyntaxNode syntaxNode, IStrykerOptions options) => syntaxNode switch { // Check if the current node is an invocation. This will also ignore invokable properties like `Func MyProp { get;}` @@ -40,7 +41,7 @@ private bool IsIgnoreExpression(SyntaxNode syntaxNode, StrykerOptions options) = }; - private static bool MatchesAnIgnoredExpression(string expressionString, StrykerOptions options) => options.ExcludedLinqExpressions.Any(r => expressionString.EndsWith(Enum.GetName(r))); + private static bool MatchesAnIgnoredExpression(string expressionString, IStrykerOptions options) => options.ExcludedLinqExpressions.Any(r => expressionString.EndsWith(Enum.GetName(r))); /// /// Removes comments, whitespace, and other junk from a syntax tree. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs index 7656d1a281..15ea20dfb4 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/ExcludeMutationMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { /// /// Checks if the mutation type of the mutant should be excluded. @@ -16,6 +16,6 @@ public class IgnoreMutationMutantFilter : IMutantFilter public string DisplayName => "mutation type filter"; /// - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) => mutants.Where(mutant => !options.ExcludedMutations.Contains(mutant.Mutation.Type)); + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) => mutants.Where(mutant => !options.ExcludedMutations.Contains(mutant.Mutation.Type)); } } diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs index 9351aebb61..3bf10c23a2 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/FilePatternMutantFilter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { /// /// Checks if the mutation should be skipped depending on the file and position of the mutation. @@ -13,20 +13,20 @@ public class FilePatternMutantFilter : IMutantFilter { public MutantFilter Type => MutantFilter.FilePattern; public string DisplayName => "mutate filter"; - private readonly IEnumerable _includePattern; - private readonly IEnumerable _excludePattern; + private readonly IEnumerable _includePattern; + private readonly IEnumerable _excludePattern; - public FilePatternMutantFilter(StrykerOptions options) + public FilePatternMutantFilter(IStrykerOptions options) { _includePattern = options.Mutate.Where(x => !x.IsExclude).ToList(); _excludePattern = options.Mutate.Where(x => x.IsExclude).ToList(); } - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) { return mutants.Where(IsMutantIncluded); - bool IsMutantIncluded(Mutant mutant) + bool IsMutantIncluded(IMutant mutant) { // Check if the the mutant is included. if (!_includePattern.Any(MatchesPattern)) @@ -37,7 +37,7 @@ bool IsMutantIncluded(Mutant mutant) // Check if the mutant is excluded. return !_excludePattern.Any(MatchesPattern); - bool MatchesPattern(FilePattern pattern) + bool MatchesPattern(IFilePattern pattern) { // if we do not have the original node, we cannot exclude the mutation according to its location if (mutant.Mutation.OriginalNode == null) diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs index 0983302d13..646e7ca644 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/GeneratedCodeFilterExtension.cs @@ -4,7 +4,7 @@ using System; -namespace Stryker.Abstractions.MutantFilters.Extensions +namespace Stryker.Core.MutantFilters { using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs index ec29a72c55..7adb37f35d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IMutantFilter.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; -using Stryker.Abstractions.ProjectComponents; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { /// /// Allows to filter a set of mutants before the mutants are tested. @@ -17,7 +18,7 @@ public interface IMutantFilter /// The origin file of the mutants. /// The stryker options. /// Return only the mutants that made it through the filter. - IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options); + IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options); /// /// Gets the display name of the filter. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs index 69cee71882..c0633002a8 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs @@ -4,8 +4,10 @@ using Stryker.Abstractions.Mutators; using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Mutants; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public class IgnoreBlockMutantFilter : IMutantFilter { @@ -24,7 +26,7 @@ public IgnoreBlockMutantFilter() }; } - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) { var blockMutants = mutants.Where(m => m.Mutation.Type == Mutator.Block); var mutantsToIgnore = blockMutants.Where(blockMutant => mutants.Any( diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs index 4615b2998d..6b19b7d8e3 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoredMethodMutantFilter.cs @@ -4,10 +4,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { /// /// Checks if the mutants are part of ignored method calls. @@ -21,45 +21,45 @@ public sealed class IgnoredMethodMutantFilter : IMutantFilter private readonly SyntaxTriviaRemover _triviaRemover = new(); - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) => + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) => options.IgnoredMethods.Any() ? mutants.Where(m => !IsPartOfIgnoredMethodCall(m.Mutation.OriginalNode, options)) : mutants; - private bool IsPartOfIgnoredMethodCall(SyntaxNode syntaxNode, StrykerOptions options, bool canGoUp = true) => + private bool IsPartOfIgnoredMethodCall(SyntaxNode syntaxNode, IStrykerOptions options, bool canGoUp = true) => syntaxNode switch { // Check if the current node is an invocation. This will also ignore invokable properties like `Func MyProp { get;}` // follow the invocation chain to see if it ends with a filtered one InvocationExpressionSyntax invocation => MatchesAnIgnoredMethod(_triviaRemover.Visit(invocation.Expression).ToString(), options) - || (invocation.Parent is MemberAccessExpressionSyntax && invocation.Parent.Parent is InvocationExpressionSyntax && - IsPartOfIgnoredMethodCall(invocation.Parent.Parent, options, false)) || (canGoUp && IsPartOfIgnoredMethodCall(invocation.Parent, options)), + || invocation.Parent is MemberAccessExpressionSyntax && invocation.Parent.Parent is InvocationExpressionSyntax && + IsPartOfIgnoredMethodCall(invocation.Parent.Parent, options, false) || canGoUp && IsPartOfIgnoredMethodCall(invocation.Parent, options), // Check if the current node is an object creation syntax (constructor invocation). ObjectCreationExpressionSyntax creation => MatchesAnIgnoredMethod(_triviaRemover.Visit(creation.Type) + ".ctor", options), ConditionalAccessExpressionSyntax conditional => IsPartOfIgnoredMethodCall(conditional.WhenNotNull, options, false), - ConditionalExpressionSyntax conditionalExpression => (IsPartOfIgnoredMethodCall(conditionalExpression.WhenTrue, options, false) && IsPartOfIgnoredMethodCall(conditionalExpression.WhenFalse, options, false)) - || (canGoUp && IsPartOfIgnoredMethodCall(conditionalExpression.Parent, options)), + ConditionalExpressionSyntax conditionalExpression => IsPartOfIgnoredMethodCall(conditionalExpression.WhenTrue, options, false) && IsPartOfIgnoredMethodCall(conditionalExpression.WhenFalse, options, false) + || canGoUp && IsPartOfIgnoredMethodCall(conditionalExpression.Parent, options), ExpressionStatementSyntax expressionStatement => IsPartOfIgnoredMethodCall(expressionStatement.Expression, options, false), - AssignmentExpressionSyntax assignmentExpression => IsPartOfIgnoredMethodCall(assignmentExpression.Right, options, false), + AssignmentExpressionSyntax assignmentExpression => IsPartOfIgnoredMethodCall(assignmentExpression.Right, options, false), LocalDeclarationStatementSyntax localDeclaration => localDeclaration.Declaration.Variables.All(v => IsPartOfIgnoredMethodCall(v.Initializer?.Value, options, false)), - - BlockSyntax { Statements.Count: >0 } block => block.Statements.All(s=> IsPartOfIgnoredMethodCall(s, options, false)), + + BlockSyntax { Statements.Count: > 0 } block => block.Statements.All(s => IsPartOfIgnoredMethodCall(s, options, false)), MemberDeclarationSyntax => false, // Traverse the tree upwards. - { Parent: not null } => canGoUp && IsPartOfIgnoredMethodCall(syntaxNode.Parent, options), + { Parent: not null } => canGoUp && IsPartOfIgnoredMethodCall(syntaxNode.Parent, options), _ => false, }; - private static bool MatchesAnIgnoredMethod(string expressionString, StrykerOptions options) => options.IgnoredMethods.Any(r => r.IsMatch(expressionString)); + private static bool MatchesAnIgnoredMethod(string expressionString, IStrykerOptions options) => options.IgnoredMethods.Any(r => r.IsMatch(expressionString)); /// /// Removes comments, whitespace, and other junk from a syntax tree. diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs index dfffbc54af..c1af7f0f1d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilter.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { // Filters are executed in the order they appear in in this enum. If you change this order you change the order or filter execution public enum MutantFilter diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs index 9c01e7826f..b315ae34e4 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/MutantFilterFactory.cs @@ -1,13 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; -using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions.DiffProviders; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions; +using Stryker.Abstractions.Baseline; +using Stryker.Abstractions.Options; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.DiffProviders; +using Stryker.Core.MutationTest; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public static class MutantFilterFactory { @@ -16,7 +17,7 @@ public static class MutantFilterFactory private static IBaselineProvider _baselineProvider; private static MutationTestInput _input; - public static IMutantFilter Create(StrykerOptions options, MutationTestInput mutationTestInput, + public static IMutantFilter Create(IStrykerOptions options, MutationTestInput mutationTestInput, IDiffProvider diffProvider = null, IBaselineProvider baselineProvider = null, IGitInfoProvider gitInfoProvider = null) { @@ -26,14 +27,14 @@ public static IMutantFilter Create(StrykerOptions options, MutationTestInput mut } _input = mutationTestInput; - _diffProvider = diffProvider ; + _diffProvider = diffProvider; _baselineProvider = baselineProvider; _gitInfoProvider = gitInfoProvider; return new BroadcastMutantFilter(DetermineEnabledMutantFilters(options)); } - private static IEnumerable DetermineEnabledMutantFilters(StrykerOptions options) + private static IEnumerable DetermineEnabledMutantFilters(IStrykerOptions options) { var enabledFilters = new SortedSet(new ByMutantFilterType()) { new FilePatternMutantFilter(options), @@ -62,7 +63,7 @@ private static IEnumerable DetermineEnabledMutantFilters(StrykerO private sealed class ByMutantFilterType : IComparer { - public int Compare(IMutantFilter x, IMutantFilter y) => x?.Type.CompareTo(y?.Type) ?? -1; + public int Compare(IMutantFilter x, IMutantFilter y) => x?.Type.CompareTo(y?.Type) ?? -1; } } } diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs index d8ccd0e41a..a0bdb98709 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs @@ -3,14 +3,14 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.DiffProviders; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Mutants; +using Stryker.Core.DiffProviders; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.MutantFilters +namespace Stryker.Core.MutantFilters { public class SinceMutantFilter : IMutantFilter { @@ -49,10 +49,10 @@ public SinceMutantFilter(IDiffProvider diffProvider = null) } } - public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, StrykerOptions options) + public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyFileLeaf file, IStrykerOptions options) { // Mutants can be enabled for testing based on multiple reasons. We store all the filtered mutants in this list and return this list. - IEnumerable filteredMutants; + IEnumerable filteredMutants; // A non-csharp file is flagged by the diff result as modified. We cannot determine which mutants will be affected by this, thus all mutants have to be tested. if (_diffResult.ChangedTestFiles is { } && _diffResult.ChangedTestFiles.Any(x => !x.EndsWith(".cs"))) @@ -82,7 +82,7 @@ public IEnumerable FilterMutants(IEnumerable mutants, IReadOnlyF return filteredMutants; } - private IEnumerable SetNotRunMutantsToIgnored(IEnumerable mutants) + private IEnumerable SetNotRunMutantsToIgnored(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus == MutantStatus.Pending || m.ResultStatus == MutantStatus.NoCoverage)) { @@ -90,10 +90,10 @@ private IEnumerable SetNotRunMutantsToIgnored(IEnumerable mutant mutant.ResultStatusReason = "Mutant not changed compared to target commit"; } - return new List(); + return new List(); } - private IEnumerable SetMutantStatusForFileChanged(IEnumerable mutants) + private IEnumerable SetMutantStatusForFileChanged(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus != MutantStatus.NoCoverage)) { @@ -104,7 +104,7 @@ private IEnumerable SetMutantStatusForFileChanged(IEnumerable mu return mutants; } - private IEnumerable SetMutantStatusForNonCSharpFileChanged(IEnumerable mutants) + private IEnumerable SetMutantStatusForNonCSharpFileChanged(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus != MutantStatus.NoCoverage)) { @@ -115,9 +115,9 @@ private IEnumerable SetMutantStatusForNonCSharpFileChanged(IEnumerable ResetMutantStatusForChangedTests(IEnumerable mutants) + private IEnumerable ResetMutantStatusForChangedTests(IEnumerable mutants) { - var filteredMutants = new List(); + var filteredMutants = new List(); foreach (var mutant in mutants) { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs index ec316972f6..60fabab130 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/BaseMutantOrchestrator.cs @@ -1,32 +1,32 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using Stryker.Abstractions.Options; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { public abstract class BaseMutantOrchestrator { - public readonly StrykerOptions Options; + public readonly IStrykerOptions Options; public bool MustInjectCoverageLogic => Options != null && Options.OptimizationMode.HasFlag(OptimizationModes.CoverageBasedTest) && !Options.OptimizationMode.HasFlag(OptimizationModes.CaptureCoveragePerTest); - public ICollection Mutants { get; set; } + public ICollection Mutants { get; set; } protected int MutantCount; - protected BaseMutantOrchestrator(StrykerOptions options) => Options = options; + protected BaseMutantOrchestrator(IStrykerOptions options) => Options = options; /// /// Gets the stored mutants and resets the mutant list to an empty collection /// - public virtual IReadOnlyCollection GetLatestMutantBatch() + public virtual IReadOnlyCollection GetLatestMutantBatch() { var tempMutants = Mutants; - Mutants = new Collection(); - return (IReadOnlyCollection)tempMutants; + Mutants = new Collection(); + return (IReadOnlyCollection)tempMutants; } } @@ -38,8 +38,8 @@ public virtual IReadOnlyCollection GetLatestMutantBatch() /// Associated semantic model if any public abstract class BaseMutantOrchestrator : BaseMutantOrchestrator { - protected BaseMutantOrchestrator(StrykerOptions input) : base(input) - {} + protected BaseMutantOrchestrator(IStrykerOptions input) : base(input) + { } public abstract T Mutate(T input, TY semanticModel); } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs index b235a87cb4..65879becb7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpMutantOrchestrator.cs @@ -6,13 +6,16 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Helpers; +using Stryker.Abstractions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; -using Stryker.Abstractions.Mutators; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options; +using Stryker.Core.Mutants.CsharpNodeOrchestrators; +using Stryker.Core.Mutators; +using Stryker.Utilities.Helpers; -namespace Stryker.Abstractions.Mutants; +namespace Stryker.Core.Mutants; /// public class CsharpMutantOrchestrator : BaseMutantOrchestrator @@ -29,11 +32,11 @@ static CsharpMutantOrchestrator() => /// /// The mutators that should be active during the mutation process /// - public CsharpMutantOrchestrator(MutantPlacer placer, IEnumerable mutators = null, StrykerOptions options = null) : base(options) + public CsharpMutantOrchestrator(MutantPlacer placer, IEnumerable mutators = null, IStrykerOptions options = null) : base(options) { Placer = placer; Mutators = mutators ?? DefaultMutatorList(); - Mutants = new Collection(); + Mutants = new Collection(); Logger = ApplicationLogging.LoggerFactory.CreateLogger(); } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs index 8d4186b473..7731009401 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AccessorSyntaxOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutation for Accessors (get/set). Its purpose is to convert arrow expression accessor to body statement form when needed. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs index a3c67d7530..4037133e1b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/AnonymousFunctionExpressionOrchestrator.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; internal class AnonymousFunctionExpressionOrchestrator : BaseFunctionOrchestrator { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs index 61295a3c50..d36a5557ac 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseFunctionOrchestrator.cs @@ -2,11 +2,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; -using Stryker.Abstractions.Instrumentation; +using Stryker.Core.Helpers; +using Stryker.Core.Instrumentation; - -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// This class implements a roslyn type independent orchestrator for method, functions, getters.... @@ -14,7 +13,7 @@ namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// /// SyntaxNode type /// This class is helpful because there is no (useful) shared parent class for those syntax construct -internal abstract class BaseFunctionOrchestrator :MemberDefinitionOrchestrator, IInstrumentCode where T : SyntaxNode +internal abstract class BaseFunctionOrchestrator : MemberDefinitionOrchestrator, IInstrumentCode where T : SyntaxNode { private readonly SeparatedSyntaxList _emptyParameterList; diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs index 94a7f26bcc..ee0fadf409 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BaseMethodDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Handles Methods/properties' accessors/constructors and finalizers. @@ -30,9 +30,9 @@ protected override T SwitchToThisBodies(T node, BlockSyntax blockBody, Expressio { if (expressionBody == null) { - return (T) node.WithBody(blockBody).WithExpressionBody(null).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.None)); + return (T)node.WithBody(blockBody).WithExpressionBody(null).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.None)); } - return (T) node.WithBody(null).WithExpressionBody(SyntaxFactory.ArrowExpressionClause(expressionBody)).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)); + return (T)node.WithBody(null).WithExpressionBody(SyntaxFactory.ArrowExpressionClause(expressionBody)).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)); } } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs index dd05711c58..0ce61dc2fe 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/BlockOrchestrator.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for syntax block diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs index c67af8425d..eb54fb9766 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/CommentParser.cs @@ -6,8 +6,9 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutators; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; internal static class CommentParser { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs index e655dc4685..eb731fc171 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ConditionalExpressionOrchestrator.cs @@ -1,10 +1,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; -internal class ConditionalExpressionOrchestrator :MemberAccessExpressionOrchestrator +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; +internal class ConditionalExpressionOrchestrator : MemberAccessExpressionOrchestrator { - + protected override ExpressionSyntax OrchestrateChildrenMutation(ConditionalAccessExpressionSyntax node, SemanticModel semanticModel, MutationContext context) { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs index 29c650cb66..2d317747b5 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/DoNotMutateOrchestrator.cs @@ -1,7 +1,8 @@ using System; using Microsoft.CodeAnalysis; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Generic class for node types (and their children) that must not be mutated diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs index 661ed04f64..b31dbd2e8f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionBodiedPropertyOrchestrator.cs @@ -1,13 +1,14 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; internal class ExpressionBodiedPropertyOrchestrator : BaseFunctionOrchestrator { - protected override bool CanHandle(PropertyDeclarationSyntax t) => t.ExpressionBody!= null || (t.Initializer!=null && t.IsStatic()); + protected override bool CanHandle(PropertyDeclarationSyntax t) => t.ExpressionBody != null || t.Initializer != null && t.IsStatic(); protected override (BlockSyntax block, ExpressionSyntax expression) GetBodies(PropertyDeclarationSyntax node) => (node.GetAccessor()?.Body, node.ExpressionBody?.Expression); @@ -24,7 +25,7 @@ protected override PropertyDeclarationSyntax SwitchToThisBodies(PropertyDeclarat } return node.WithExpressionBody(null).WithAccessorList( - SyntaxFactory.AccessorList(SyntaxFactory.List(new []{ + SyntaxFactory.AccessorList(SyntaxFactory.List(new[]{ SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, blockBody)}))). WithSemicolonToken(SyntaxFactory.MissingToken(SyntaxKind.SemicolonToken)); } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs index f6d05e6df1..ae009b03f6 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/ExpressionSpecificOrchestrator.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Orchestrate mutations for expressions (and sub expressions). @@ -19,7 +18,7 @@ internal class ExpressionSpecificOrchestrator : NodeSpecificOrchestrator mutations, MutationContext context) => - // if the expression contains a declaration, it must be controlled at the block level. + // if the expression contains a declaration, it must be controlled at the block level. context.AddMutations(mutations, node.ContainsDeclarations() ? MutationControl.Block : MutationControl.Expression); protected override MutationContext PrepareContext(T node, MutationContext context) => base.PrepareContext(node, context.Enter(MutationControl.Expression)); diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs index 8d4913ae2f..a7aafd1bfe 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/INodeOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; -using Stryker.Abstractions.Helpers; +using Stryker.Utilities.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; internal interface INodeOrchestrator : ITypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs index c279689d2c..a4af472757 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/InvocationExpressionOrchestrator.cs @@ -1,17 +1,17 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; -internal class InvocationExpressionOrchestrator: MemberAccessExpressionOrchestrator +internal class InvocationExpressionOrchestrator : MemberAccessExpressionOrchestrator { protected override MutationContext StoreMutations(InvocationExpressionSyntax node, IEnumerable mutations, MutationContext context) => - // if the invocation contains a declaration, it must be controlled at the block level. + // if the invocation contains a declaration, it must be controlled at the block level. context.AddMutations(mutations, node.ArgumentList.ContainsDeclarations() ? MutationControl.Block : MutationControl.Expression); protected override ExpressionSyntax OrchestrateChildrenMutation(InvocationExpressionSyntax node, SemanticModel semanticModel, diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs index 17c4905632..a4398cab3a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalDeclarationOrchestrator.cs @@ -1,7 +1,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Handle const declarations. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs index fc44f00887..540c4eb1d5 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/LocalFunctionStatementOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; internal class LocalFunctionStatementOrchestrator : BaseFunctionOrchestrator { @@ -23,6 +23,6 @@ protected override TypeSyntax ReturnType(LocalFunctionStatementSyntax node) } protected override LocalFunctionStatementSyntax SwitchToThisBodies(LocalFunctionStatementSyntax node, BlockSyntax blockBody, - ExpressionSyntax expressionBody) => node.WithBody(blockBody).WithExpressionBody(expressionBody is null ? null : SyntaxFactory.ArrowExpressionClause(expressionBody)); + ExpressionSyntax expressionBody) => node.WithBody(blockBody).WithExpressionBody(expressionBody is null ? null : SyntaxFactory.ArrowExpressionClause(expressionBody)); } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs index 996a360304..72c05f8aff 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberAccessExpressionOrchestrator.cs @@ -1,10 +1,11 @@ using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; -internal class MemberAccessExpressionOrchestrator : NodeSpecificOrchestrator where T:ExpressionSyntax +internal class MemberAccessExpressionOrchestrator : NodeSpecificOrchestrator where T : ExpressionSyntax { private readonly Func _predicate; @@ -14,13 +15,13 @@ internal class MemberAccessExpressionOrchestrator : NodeSpecificOrchestrator< /// optional predicate to control which nodes can be orchestrated public MemberAccessExpressionOrchestrator(Func predicate = null) => _predicate = predicate; - protected override bool CanHandle(T t) => _predicate==null || _predicate(t); + protected override bool CanHandle(T t) => _predicate == null || _predicate(t); protected override ExpressionSyntax InjectMutations(T sourceNode, ExpressionSyntax targetNode, SemanticModel semanticModel, MutationContext context) => context.InjectMutations(targetNode, sourceNode); protected override MutationContext PrepareContext(T node, MutationContext context) => // we are at expression level, except if we are explicitly already in a member access chain - base.PrepareContext(node, context.Enter(context.CurrentControl != MutationControl.MemberAccess ? MutationControl.Expression : MutationControl.MemberAccess)); + base.PrepareContext(node, context.Enter(context.CurrentControl != MutationControl.MemberAccess ? MutationControl.Expression : MutationControl.MemberAccess)); protected override void RestoreContext(MutationContext context) => base.RestoreContext(context.Leave()); diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs index 641c1d5fdc..d0a5539549 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MemberDefinitionOrchestrator.cs @@ -1,12 +1,13 @@ using Microsoft.CodeAnalysis; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Base class for node types (and their children) that are member definitions /// /// Syntax node type. (not restricted to MemberDefinitionSyntax) -internal class MemberDefinitionOrchestrator:NodeSpecificOrchestrator where T : SyntaxNode +internal class MemberDefinitionOrchestrator : NodeSpecificOrchestrator where T : SyntaxNode { protected override MutationContext PrepareContext(T node, MutationContext context) => base.PrepareContext(node, context.Enter(MutationControl.Member)); diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs index 85a0da7df2..a5ebd9cac0 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/MutateAtStatementLevelOrchestrator.cs @@ -1,13 +1,14 @@ using System; using System.Collections.Generic; using Microsoft.CodeAnalysis; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Generic class to deal with syntax nodes which mutations must be injected at statement level /// -internal class MutateAtStatementLevelOrchestrator: NodeSpecificOrchestrator where T: SyntaxNode +internal class MutateAtStatementLevelOrchestrator : NodeSpecificOrchestrator where T : SyntaxNode { private readonly Predicate _predicate; diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs index 9df5616987..810fdaecdc 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/NodeSpecificOrchestrator.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using Microsoft.CodeAnalysis; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// This purpose of each implementation of this class is to support one specific C# code construct during the mutation process. @@ -15,7 +15,8 @@ namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; /// Type of the node once mutated. In practice, either or a base class of it. /// Those classes are an implementation of the 'Strategy' pattern. They must remain stateless, as the same instance is used for all syntax node of /// the given type. They can still embark some readonly options/parameters, as long as they remain constant during parsing. -internal class NodeSpecificOrchestrator : INodeOrchestrator where TBase : SyntaxNode where TNode : TBase{ +internal class NodeSpecificOrchestrator : INodeOrchestrator where TBase : SyntaxNode where TNode : TBase +{ /// /// Get the Roslyn type handled by this class /// diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs index 153a7f3501..857d174ae8 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StatementSpecificOrchestrator.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// General handler for Statements. Remember to inherit from this class when you wand to create a statement specific logic. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs index a5256c70d9..f224acf556 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticConstructorOrchestrator.cs @@ -1,8 +1,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Supports static constructor. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs index c66644a913..044134d91d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/StaticFieldDeclarationOrchestrator.cs @@ -1,9 +1,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// Ensure static Fields are marked as static diff --git a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs index 17ee655461..473f46bf7b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/CsharpNodeOrchestrators/SyntaxNodeOrchestrator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; +namespace Stryker.Core.Mutants.CsharpNodeOrchestrators; /// /// This is the default orchestrator: it does not mutate the node, but it will orchestrate the mutations of its children. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs index 1f2b5060af..2908157824 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpMutantOrchestrator.cs @@ -4,11 +4,12 @@ using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants.FsharpOrchestrators; -using Stryker.Abstractions.Mutators; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Abstractions.Options; +using Stryker.Core.Mutants.FsharpOrchestrators; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { /// public class FsharpMutantOrchestrator : BaseMutantOrchestrator, object> @@ -20,7 +21,7 @@ public class FsharpMutantOrchestrator : BaseMutantOrchestrator mutators = null, StrykerOptions options = null) : base(options) + public FsharpMutantOrchestrator(IEnumerable mutators = null, IStrykerOptions options = null) : base(options) { _fsharpMutationsSynModuleDecl = new OrchestratorFinder(); _fsharpMutationsSynModuleDecl.Add(typeof(SynModuleDecl.Let), new LetOrchestrator()); @@ -35,7 +36,7 @@ public FsharpMutantOrchestrator(IEnumerable mutators = null, StrykerOp { }; - Mutants = new Collection(); + Mutants = new Collection(); Logger = ApplicationLogging.LoggerFactory.CreateLogger(); } @@ -43,7 +44,7 @@ public override FSharpList Mutate( FSharpList input, object semanticModel) { var list = new List(); - foreach (SynModuleOrNamespace module in input) + foreach (var module in input) { var mutation = Mutate(module.decls); list.Add(SynModuleOrNamespace.NewSynModuleOrNamespace( @@ -63,7 +64,7 @@ public override FSharpList Mutate( public FSharpList Mutate(FSharpList decls) { var list = new List(); - foreach (SynModuleDecl declaration in decls) + foreach (var declaration in decls) { var handler = _fsharpMutationsSynModuleDecl.FindHandler(declaration.GetType()); list.Add(handler.Mutate(declaration, this)); diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs index d445f0785c..69e9ba8e2b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/DefaultOrchestrator.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class DefaultOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs index 4162252a51..9d81044455 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IFsharpTypehandle.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public interface IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs index 2d6544b828..eab823171e 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/IfThenElseOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class IfThenElseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs index 50f221708f..ee8f299d5f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrUseOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class LetOrUseOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs index 579a620f8f..ce1e894f7d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/LetOrchestrator.cs @@ -2,7 +2,7 @@ using FSharp.Compiler.Syntax; using Microsoft.FSharp.Collections; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class LetOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs index 1ab7ee2e69..3614048526 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/MatchOrchestrator.cs @@ -4,7 +4,7 @@ using static FSharp.Compiler.Syntax.SynConst; using static FSharp.Compiler.Syntax.SynPat; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { //this orchestrtor also places a mutation. This is to proof the code works //the mutation should come from a mutator, however mutators are currently not implemented diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs index 838139cb70..bd1984136e 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/NestedModuleOrchestrator.cs @@ -1,6 +1,6 @@ using FSharp.Compiler.Syntax; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class NestedModuleOrchestrator : IFsharpTypeHandler { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs index 40747e29b2..e5e45e118b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/FsharpOrchestrators/OrchestratorFinder.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutants.FsharpOrchestrators +namespace Stryker.Core.Mutants.FsharpOrchestrators { public class OrchestratorFinder { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs index dc2da0c669..3961ce2939 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs @@ -1,6 +1,7 @@ +using Stryker.Abstractions.Mutants; using Stryker.Abstractions.TestRunners; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { /// /// Represents a single mutation on domain level @@ -40,7 +41,7 @@ public void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, IT { ResultStatus = MutantStatus.Timeout; } - else if (resultRanTests.IsEveryTest || (resultRanTests.IsEveryTest is not true && AssessingTests.IsIncludedIn(resultRanTests))) + else if (resultRanTests.IsEveryTest || resultRanTests.IsEveryTest is not true && AssessingTests.IsIncludedIn(resultRanTests)) { ResultStatus = MutantStatus.Survived; } diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs index 69746c6765..c1ea57e7b8 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantInfo.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { /// /// Used to keep track of mutant info. For example during the rollback process. diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs index bc4dc979cf..a432eee2fa 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutantPlacer.cs @@ -4,11 +4,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.InjectedHelpers; -using Stryker.Abstractions.Instrumentation; -using Stryker.Abstractions.Mutants; +using Stryker.Core.InjectedHelpers; +using Stryker.Core.Instrumentation; -namespace Stryker.Abstractions.Mutants; +namespace Stryker.Core.Mutants; /// /// Implements multiple (reversible) patterns for injecting code in the mutated assembly @@ -20,7 +19,7 @@ public class MutantPlacer private const string MutationTypeMarker = "MutationType"; public static readonly string Injector = "Injector"; - private static readonly Dictionary instrumentEngines = new (); + private static readonly Dictionary instrumentEngines = new(); private static readonly HashSet requireRecursiveRemoval = new(); private static readonly StaticInstrumentationEngine StaticEngine = new(); @@ -45,7 +44,7 @@ public class MutantPlacer /// true if inner injections should be removed first. public static SyntaxAnnotation RegisterEngine(IInstrumentCode engine, bool requireRecursive = false) { - lock(instrumentEngines) + lock (instrumentEngines) { if (instrumentEngines.TryGetValue(engine.InstrumentEngineId, out var existing)) { @@ -58,7 +57,7 @@ public static SyntaxAnnotation RegisterEngine(IInstrumentCode engine, bool requi } var syntaxAnnotation = new SyntaxAnnotation(Injector, engine.InstrumentEngineId); - instrumentEngines[engine.InstrumentEngineId] = (engine, syntaxAnnotation) ; + instrumentEngines[engine.InstrumentEngineId] = (engine, syntaxAnnotation); if (requireRecursive) { requireRecursiveRemoval.Add(engine.InstrumentEngineId); @@ -210,7 +209,7 @@ public static MutantInfo FindAnnotations(SyntaxNode node) /// /// /// - private ExpressionSyntax GetBinaryExpression(int mutantId) + private ExpressionSyntax GetBinaryExpression(int mutantId) { if (_binaryExpression == null) { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs index e6b0bdf4dc..82b5f31457 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationContext.cs @@ -2,11 +2,9 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Mutants.CsharpNodeOrchestrators; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions.Mutants; -namespace Stryker.Abstractions.Mutants; +namespace Stryker.Core.Mutants; /// /// Describe the (syntax tree) context during mutation and ensure proper mutation injection. @@ -98,7 +96,7 @@ public IEnumerable GenerateMutantsForNode(SyntaxNode node, SemanticModel public MutationContext Enter(MutationControl control) { _mutation.Enter(control); - return control is MutationControl.Block or MutationControl.Member ? new MutationContext(this): this; + return control is MutationControl.Block or MutationControl.Member ? new MutationContext(this) : this; } /// diff --git a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs index 394e741895..825e64de58 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/MutationStore.cs @@ -4,12 +4,11 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Extensions.Logging; -using RegexParser.Nodes; -using Stryker.Abstractions.Helpers; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutants; +namespace Stryker.Core.Mutants; /// @@ -59,7 +58,7 @@ internal class MutationStore /// Checks if there are pending mutations for the current syntax level /// /// - public bool HasPendingMutations() => _pendingMutations.Count > 0 && _pendingMutations.Peek().Store.Count>0; + public bool HasPendingMutations() => _pendingMutations.Count > 0 && _pendingMutations.Peek().Store.Count > 0; /// /// Returns the current mutation control @@ -87,7 +86,8 @@ public void Enter(MutationControl control) /// If there is none (leaving a member), mutations are flagged as compile errors (and logged). public void Leave() { - if (!_pendingMutations.Peek().Leave()) return; + if (!_pendingMutations.Peek().Leave()) + return; // we need to store pending mutations at the higher level var old = _pendingMutations.Pop(); if (_pendingMutations.Count > 0) @@ -240,7 +240,8 @@ private sealed class PendingMutations public bool Aggregate(MutationControl control) { - if (Store.Count != 0 || Control != control) { + if (Store.Count != 0 || Control != control) + { return false; } _depth++; diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs index d1838d6db7..0295a17b2b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestDescription.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { public sealed class TestDescription { @@ -23,9 +23,11 @@ private bool Equals(TestDescription other) } public override bool Equals(object obj) { - if (obj is null) return false; - if (ReferenceEquals(this, obj)) return true; - return obj.GetType() == GetType() && Equals((TestDescription) obj); + if (obj is null) + return false; + if (ReferenceEquals(this, obj)) + return true; + return obj.GetType() == GetType() && Equals((TestDescription)obj); } public override int GetHashCode() diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs index a51c62a263..2a9922b5c4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestGuidsList.cs @@ -4,7 +4,7 @@ using Stryker.Abstractions.TestRunners; using Stryker.Abstractions.TestRunners; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { public class TestGuidsList : ITestGuids diff --git a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs index 94b2d03ee2..12f7f2af1d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/TestSet.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { public class TestSet { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs index fc45a3fffe..b790aafda4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/WrappedGuidsEnumeration.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions.Mutants; using Stryker.Abstractions.TestRunners; -namespace Stryker.Abstractions.Mutants +namespace Stryker.Core.Mutants { public class WrappedGuidsEnumeration : ITestGuids { @@ -27,7 +28,7 @@ public class WrappedGuidsEnumeration : ITestGuids public WrappedGuidsEnumeration(IEnumerable guids) => _guids = guids; - public ITestGuids Excluding(ISet testsToSkip) => (IsEveryTest || IsEmpty) ? this : new TestGuidsList(_guids.Except(testsToSkip)); + public ITestGuids Excluding(ISet testsToSkip) => IsEveryTest || IsEmpty ? this : new TestGuidsList(_guids.Except(testsToSkip)); public static ITestGuids MergeList(ITestGuids a, ITestGuids b) { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs index 31bf28a6c0..a5a549b1b4 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs @@ -4,21 +4,24 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Compiling; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.MutantFilters; using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; - -namespace Stryker.Abstractions.MutationTest +using Stryker.Core.ProjectComponents.Csharp; +using Stryker.Core.MutantFilters; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.Compiling; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Abstractions.Options; + +namespace Stryker.Core.MutationTest { public class CsharpMutationProcess : IMutationProcess { private readonly ILogger _logger; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IFileSystem _fileSystem; private readonly BaseMutantOrchestrator _orchestrator; private readonly IMutantFilter _mutantFilter; @@ -32,7 +35,7 @@ public class CsharpMutationProcess : IMutationProcess /// public CsharpMutationProcess( IFileSystem fileSystem = null, - StrykerOptions options = null, + IStrykerOptions options = null, IMutantFilter mutantFilter = null, BaseMutantOrchestrator orchestrator = null) { @@ -48,7 +51,7 @@ public CsharpMutationProcess( /// This constructor is used by the initialization logic. /// /// - public CsharpMutationProcess(StrykerOptions options) : this(null, options) + public CsharpMutationProcess(IStrykerOptions options) : this(null, options) { } public void Mutate(MutationTestInput input) @@ -59,9 +62,9 @@ public void Mutate(MutationTestInput input) var semanticModels = compilingProcess.GetSemanticModels(projectInfo.GetAllFiles().Cast().Select(x => x.SyntaxTree)); // Mutate source files - foreach(var file in projectInfo.GetAllFiles().Cast()) + foreach (var file in projectInfo.GetAllFiles().Cast()) { - _logger.LogDebug("Mutating {FilePath}",file.FullPath); + _logger.LogDebug("Mutating {FilePath}", file.FullPath); // Mutate the syntax tree var mutatedSyntaxTree = orchestrator.Mutate(file.SyntaxTree, semanticModels.First(x => x.SyntaxTree == file.SyntaxTree)); // Add the mutated syntax tree for compilation @@ -69,7 +72,7 @@ public void Mutate(MutationTestInput input) if (_options.DevMode) { _logger.LogTrace("Mutated {FullPath}:{NewLine}{MutatedSyntaxTree}", - file.FullPath,Environment.NewLine,mutatedSyntaxTree.GetText()); + file.FullPath, Environment.NewLine, mutatedSyntaxTree.GetText()); } // Filter the mutants file.Mutants = orchestrator.GetLatestMutantBatch(); @@ -83,7 +86,7 @@ public void Mutate(MutationTestInput input) private void CompileMutations(MutationTestInput input, CsharpCompilingProcess compilingProcess) { var info = input.SourceProjectInfo; - var projectInfo = (ProjectComponent) info.ProjectContents; + var projectInfo = (ProjectComponent)info.ProjectContents; using var ms = new MemoryStream(); using var msForSymbols = _options.DevMode ? new MemoryStream() : null; // compile the mutated syntax trees diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs index 1397b2849c..6bad2171c1 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/FsharpMutationProcess.cs @@ -1,24 +1,25 @@ +using System; +using System.IO; +using System.IO.Abstractions; +using System.Linq; using FSharp.Compiler.Syntax; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; using Microsoft.FSharp.Collections; -using Stryker.Abstractions.Compiling; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; -using Stryker.Abstractions.ProjectComponents; -using System; -using System.IO; -using System.IO.Abstractions; -using System.Linq; +using Stryker.Abstractions.Options; +using Stryker.Core.Compiling; +using Stryker.Core.Mutants; +using Stryker.Core.ProjectComponents; +using Stryker.Core.ProjectComponents.Fsharp; -namespace Stryker.Abstractions.MutationTest +namespace Stryker.Core.MutationTest { public class FsharpMutationProcess : IMutationProcess { private readonly ILogger _logger; private readonly IFileSystem _fileSystem; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly BaseMutantOrchestrator, object> _orchestrator; /// @@ -29,7 +30,7 @@ public class FsharpMutationProcess : IMutationProcess /// public FsharpMutationProcess( IFileSystem fileSystem, - StrykerOptions options, + IStrykerOptions options, BaseMutantOrchestrator, object> orchestrator) { _fileSystem = fileSystem; @@ -42,7 +43,7 @@ public FsharpMutationProcess( /// This constructor is used by the initialization logic. /// /// - public FsharpMutationProcess(StrykerOptions options) : this(null, options, null) { } + public FsharpMutationProcess(IStrykerOptions options) : this(null, options, null) { } public void Mutate(MutationTestInput input) { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs index bf87a503b8..f5fe90d47e 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/IMutationProcess.cs @@ -1,4 +1,4 @@ -namespace Stryker.Abstractions.MutationTest +namespace Stryker.Core.MutationTest { public interface IMutationProcess { diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs index e9c0f5df95..ffa4626155 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs @@ -2,12 +2,14 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; +using Stryker.Abstractions; using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.MutationTest +namespace Stryker.Core.MutationTest { /// /// Executes exactly one mutation test and stores the result @@ -16,7 +18,7 @@ public interface IMutationTestExecutor { ITestRunner TestRunner { get; } - void Test(IProjectAndTests project, IList mutantsToTest, ITimeoutValueCalculator timeoutMs, + void Test(IProjectAndTests project, IList mutantsToTest, ITimeoutValueCalculator timeoutMs, TestUpdateHandler updateHandler); } @@ -31,7 +33,7 @@ public MutationTestExecutor(ITestRunner testRunner) Logger = ApplicationLogging.LoggerFactory.CreateLogger(); } - public void Test(IProjectAndTests project, IList mutantsToTest, ITimeoutValueCalculator timeoutMs, + public void Test(IProjectAndTests project, IList mutantsToTest, ITimeoutValueCalculator timeoutMs, TestUpdateHandler updateHandler) { var forceSingle = false; @@ -43,7 +45,7 @@ public void Test(IProjectAndTests project, IList mutantsToTest, ITimeout "Test run for {Mutants} is {Result} ", string.Join(", ", mutantsToTest.Select(x => x.DisplayName)), result.FailingTests.Count == 0 ? "success" : "failed"); - Logger.LogTrace("Test run : {ResultMessage}",result.ResultMessage); + Logger.LogTrace("Test run : {ResultMessage}", result.ResultMessage); if (result.Messages is not null && result.Messages.Any()) { Logger.LogTrace( @@ -60,7 +62,7 @@ public void Test(IProjectAndTests project, IList mutantsToTest, ITimeout if (!result.SessionTimedOut) { // something bad happened. - Logger.LogError("Stryker failed to test {RemainingMutantsCount} mutant(s).",remainingMutants.Count); + Logger.LogError("Stryker failed to test {RemainingMutantsCount} mutant(s).", remainingMutants.Count); return; } @@ -88,11 +90,11 @@ public void Test(IProjectAndTests project, IList mutantsToTest, ITimeout } } - private TestRunResult RunTestSession(IProjectAndTests projectAndTests, ICollection mutantsToTest, + private TestRunResult RunTestSession(IProjectAndTests projectAndTests, ICollection mutantsToTest, ITimeoutValueCalculator timeoutMs, TestUpdateHandler updateHandler, bool forceSingle) { - Logger.LogTrace("Testing {MutantsToTest}.",string.Join(" ,", mutantsToTest.Select(x => x.DisplayName))); + Logger.LogTrace("Testing {MutantsToTest}.", string.Join(" ,", mutantsToTest.Select(x => x.DisplayName))); if (forceSingle) { foreach (var mutant in mutantsToTest) diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs index 9c17a47bd9..05be7a88ef 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestInput.cs @@ -1,10 +1,10 @@ -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.ProjectComponents.SourceProjects; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Initialisation; +using Stryker.Core.ProjectComponents.SourceProjects; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.MutationTest +namespace Stryker.Core.MutationTest { /// /// Represents the state the application under test is in. @@ -19,7 +19,7 @@ public class MutationTestInput /// /// Contains all information about the tests to run /// - public TestProjectsInfo TestProjectsInfo { get; set; } + public ITestProjectsInfo TestProjectsInfo { get; set; } /// /// The testrunner that will be used for the mutation test run diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs index fedbc8ebfe..2d8718154e 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestProcess.cs @@ -3,27 +3,25 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.CoverageAnalysis; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; using Stryker.Abstractions.Reporting; using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.Options; +using Stryker.Core.CoverageAnalysis; +using Stryker.Core.Initialisation; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.MutationTest +namespace Stryker.Core.MutationTest { public interface IMutationTestProcess { MutationTestInput Input { get; } void Mutate(); - StrykerRunResult Test(IEnumerable mutantsToTest); + StrykerRunResult Test(IEnumerable mutantsToTest); void Restore(); void GetCoverage(); void FilterMutants(); @@ -36,9 +34,9 @@ public class MutationTestProcess : IMutationTestProcess private readonly IMutationTestExecutor _mutationTestExecutor; private readonly IReporter _reporter; private readonly ICoverageAnalyser _coverageAnalyser; - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IMutationProcess _mutationProcess; - private static readonly Dictionary> LanguageMap = new(); + private static readonly Dictionary> LanguageMap = new(); static MutationTestProcess() { @@ -48,7 +46,7 @@ static MutationTestProcess() public static void DeclareMutationProcessForLanguage(Language language) where T : IMutationProcess { - var constructor = typeof(T).GetConstructor(new[] { typeof(StrykerOptions) }); + var constructor = typeof(T).GetConstructor(new[] { typeof(IStrykerOptions) }); if (constructor == null) { throw new NotSupportedException( @@ -59,7 +57,7 @@ public static void DeclareMutationProcessForLanguage(Language language) where } public MutationTestProcess(MutationTestInput input, - StrykerOptions options, + IStrykerOptions options, IReporter reporter, IMutationTestExecutor executor, IMutationProcess mutationProcess = null, @@ -95,7 +93,7 @@ public void Mutate() public void FilterMutants() => _mutationProcess.FilterMutants(Input); - public StrykerRunResult Test(IEnumerable mutantsToTest) + public StrykerRunResult Test(IEnumerable mutantsToTest) { if (!MutantsToTest(mutantsToTest)) { @@ -109,7 +107,7 @@ public StrykerRunResult Test(IEnumerable mutantsToTest) public void Restore() => Input.TestProjectsInfo.RestoreOriginalAssembly(Input.SourceProjectInfo.AnalyzerResult); - private void TestMutants(IEnumerable mutantsToTest) + private void TestMutants(IEnumerable mutantsToTest) { var mutantGroups = BuildMutantGroupsForTest(mutantsToTest.ToList()); @@ -117,7 +115,7 @@ private void TestMutants(IEnumerable mutantsToTest) Parallel.ForEach(mutantGroups, parallelOptions, mutants => { - var reportedMutants = new HashSet(); + var reportedMutants = new HashSet(); _mutationTestExecutor.Test(Input.SourceProjectInfo, mutants, Input.InitialTestRun.TimeoutValueCalculator, @@ -128,8 +126,8 @@ private void TestMutants(IEnumerable mutantsToTest) }); } - private bool TestUpdateHandler(IEnumerable testedMutants, ITestGuids failedTests, ITestGuids ranTests, - ITestGuids timedOutTest, ISet reportedMutants) + private bool TestUpdateHandler(IEnumerable testedMutants, ITestGuids failedTests, ITestGuids ranTests, + ITestGuids timedOutTest, ISet reportedMutants) { var testsFailingInitially = Input.InitialTestRun.Result.FailingTests.GetGuids().ToHashSet(); var continueTestRun = _options.OptimizationMode.HasFlag(OptimizationModes.DisableBail); @@ -156,7 +154,7 @@ private bool TestUpdateHandler(IEnumerable testedMutants, ITestGuids fai return continueTestRun; } - private void OnMutantsTested(IEnumerable mutants, ISet reportedMutants) + private void OnMutantsTested(IEnumerable mutants, ISet reportedMutants) { foreach (var mutant in mutants) { @@ -169,7 +167,7 @@ private void OnMutantsTested(IEnumerable mutants, ISet reportedM } } - private void OnMutantTested(Mutant mutant, ISet reportedMutants) + private void OnMutantTested(IMutant mutant, ISet reportedMutants) { if (mutant.ResultStatus == MutantStatus.Pending || reportedMutants.Contains(mutant)) { @@ -181,7 +179,7 @@ private void OnMutantTested(Mutant mutant, ISet reportedMutants) reportedMutants.Add(mutant); } - private static bool MutantsToTest(IEnumerable mutantsToTest) + private static bool MutantsToTest(IEnumerable mutantsToTest) { if (!mutantsToTest.Any()) { @@ -197,19 +195,19 @@ private static bool MutantsToTest(IEnumerable mutantsToTest) return true; } - private IEnumerable> BuildMutantGroupsForTest(IReadOnlyCollection mutantsNotRun) + private IEnumerable> BuildMutantGroupsForTest(IReadOnlyCollection mutantsNotRun) { if (_options.OptimizationMode.HasFlag(OptimizationModes.DisableMixMutants) || !_options.OptimizationMode.HasFlag(OptimizationModes.CoverageBasedTest)) { - return mutantsNotRun.Select(x => new List { x }); + return mutantsNotRun.Select(x => new List { x }); } - var blocks = new List>(mutantsNotRun.Count); + var blocks = new List>(mutantsNotRun.Count); var mutantsToGroup = mutantsNotRun.ToList(); // we deal with mutants needing full testing first blocks.AddRange(mutantsToGroup.Where(m => m.AssessingTests.IsEveryTest) - .Select(m => new List { m })); + .Select(m => new List { m })); mutantsToGroup.RemoveAll(m => m.AssessingTests.IsEveryTest); mutantsToGroup = mutantsToGroup.Where(m => m.ResultStatus == MutantStatus.Pending).ToList(); @@ -220,7 +218,7 @@ private IEnumerable> BuildMutantGroupsForTest(IReadOnlyCollection { mutantsToGroup[0] }; + var nextBlock = new List { mutantsToGroup[0] }; mutantsToGroup.RemoveAt(0); for (var j = 0; j < mutantsToGroup.Count; j++) { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs index 252524460b..ed601be0d3 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ArrayCreationMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class ArrayCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs index 661e1badf8..000d986892 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/AssignmentStatementMutator.cs @@ -2,10 +2,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutators +namespace Stryker.Core.Mutators { public class AssignmentExpressionMutator : MutatorBase { @@ -30,7 +31,7 @@ public override IEnumerable ApplyMutations(AssignmentExpressionSyntax { var assignmentKind = node.Kind(); - if (assignmentKind == SyntaxKind.AddAssignmentExpression + if (assignmentKind == SyntaxKind.AddAssignmentExpression && (node.Left.IsAStringExpression() || node.Right.IsAStringExpression())) { yield break; diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs index fa6952ea2d..dc09b634a7 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BinaryExpressionMutator.cs @@ -1,11 +1,12 @@ +using System.Collections.Generic; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; -using System.Collections.Generic; -using Stryker.Abstractions.Helpers; -using Microsoft.CodeAnalysis; +using Stryker.Abstractions.Mutators; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutators +namespace Stryker.Core.Mutators { public class BinaryExpressionMutator : MutatorBase { @@ -19,7 +20,6 @@ public MutationData(Mutator mutator, params SyntaxKind[] kindsToMutate) Mutator = mutator; KindsToMutate = kindsToMutate; } - } private static readonly Dictionary _kindsToMutate = new Dictionary() diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs index 0dbbd58e05..9e9c7055c1 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BlockMutator.cs @@ -3,10 +3,11 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Stryker.Abstractions.Helpers; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; +using Stryker.Core.Helpers; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; class BlockMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs index d9be84ac12..364a9a0f81 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/BooleanMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class BooleanMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs index 0e93bd651f..f9fdd31640 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/CheckedMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class CheckedMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs index 4509a5f06f..0fd4822309 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ConditionalExpressionMutator.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators +namespace Stryker.Core.Mutators { public class ConditionalExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs index 6c65c40b65..9e7f95976f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InitializerMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class InitializerMutator : MutatorBase { @@ -16,7 +17,7 @@ public override IEnumerable ApplyMutations(InitializerExpressionSyntax { yield break; } - + if (node.Kind() == SyntaxKind.ArrayInitializerExpression) { yield return new Mutation() diff --git a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs index a39785db4f..57fa2ba35f 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/InterpolatedStringMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class InterpolatedStringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs index 5d664b466a..2d20260f55 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/IsPatternExpressionMutator.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Mutator implementation for is expression public class IsPatternExpressionMutator : PatternMutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs index 86c7cbcdb6..886a500d70 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/LinqMutator.cs @@ -3,10 +3,11 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Mutator Implementation for LINQ Mutations public class LinqMutator : MutatorBase @@ -95,7 +96,7 @@ public override IEnumerable ApplyMutations(ExpressionSyntax node, Sema default: yield break; } - + if (Enum.TryParse(memberName, out LinqExpression expression) && KindsToMutate.TryGetValue(expression, out var replacementExpression)) { @@ -130,4 +131,4 @@ private static InvocationExpressionSyntax FindEnclosingInvocation(ExpressionSynt } return null; } - } +} diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs index fd6c4dba8a..81ba3ace4d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MathMutator.cs @@ -5,8 +5,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Mutator Implementation for Math Mutations public class MathMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs index 74036e382d..c38841dece 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/MutatorBase.cs @@ -3,8 +3,9 @@ using Microsoft.CodeAnalysis; using Stryker.Abstractions.Options; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// /// Mutators can implement this class to check the type of the node and cast the node to the expected type. diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs index 73b00f3ad8..ed3c486e2d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NegateConditionMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class NegateConditionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs index 3699252211..2e6ecbe2a4 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs @@ -3,8 +3,9 @@ using Stryker.Abstractions.Mutants; using System.Collections.Generic; using Microsoft.CodeAnalysis; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators +namespace Stryker.Core.Mutators { public class NullCoalescingExpressionMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs index 1181d98ad1..f1b2dcac9e 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/ObjectCreationMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators +namespace Stryker.Core.Mutators { public class ObjectCreationMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs index 50fecacfd1..f5479d4454 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PatternMutatorBase.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Base Mutator implementation for expressions with patterns public abstract class PatternMutatorBase : MutatorBase where T : ExpressionSyntax diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs index 90999ffbda..ce9d650f6b 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PostfixUnaryMutator.cs @@ -2,14 +2,15 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class PostfixUnaryMutator : MutatorBase { public override MutationLevel MutationLevel => MutationLevel.Standard; - + public override IEnumerable ApplyMutations(PostfixUnaryExpressionSyntax node, SemanticModel semanticModel) { var unaryKind = node.Kind(); diff --git a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs index 05b7f95416..a5b72387bb 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/PrefixUnaryMutator.cs @@ -2,9 +2,10 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System.Collections.Generic; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class PrefixUnaryMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs index 6a5116932f..3e33c8feb0 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/RegexMutator.cs @@ -4,13 +4,14 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using Stryker.RegexMutators; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class RegexMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs index b850d3105a..c9d6de0060 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StatementMutator.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class StatementMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs index 9afb0c70d7..14f207a229 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringEmptyMutator.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// /// Mutator that will mutate: diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs index d68701b870..815866082a 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMethodMutator.cs @@ -4,8 +4,9 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Mutator Implementation for String method Mutations public class StringMethodMutator : MutatorBase diff --git a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs index 0a5db90709..bc6c39c24d 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/StringMutator.cs @@ -2,11 +2,12 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Mutators; using System; using System.Collections.Generic; using System.Text.RegularExpressions; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; public class StringMutator : MutatorBase { diff --git a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs index 80530606aa..904ac83382 100644 --- a/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs +++ b/src/Stryker.Core/Stryker.Core/Mutators/SwitchExpressionMutator.cs @@ -4,7 +4,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Stryker.Abstractions.Mutants; -namespace Stryker.Abstractions.Mutators; +namespace Stryker.Core.Mutators; /// Mutator implementation for switch expression public class SwitchExpressionMutator : PatternMutatorBase @@ -13,5 +13,5 @@ public class SwitchExpressionMutator : PatternMutatorBase ApplyMutations(SwitchExpressionSyntax node, SemanticModel semanticModel) => node .DescendantNodes() .OfType() - .SelectMany(x => base.ApplyMutations(x, semanticModel)); + .SelectMany(x => ApplyMutations(x, semanticModel)); } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs index 56f369964e..91c294502d 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFileLeaf.cs @@ -1,8 +1,9 @@ using Microsoft.CodeAnalysis; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; using System.Collections.Generic; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents.Csharp { public class CsharpFileLeaf : ProjectComponent, IFileLeaf { @@ -18,7 +19,7 @@ public class CsharpFileLeaf : ProjectComponent, IFileLeaf public SyntaxTree MutatedSyntaxTree { get; set; } - public override IEnumerable Mutants { get; set; } + public override IEnumerable Mutants { get; set; } public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs index 7a26beca17..1efbb4eeca 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Csharp/CsharpFolderComposite.cs @@ -1,8 +1,9 @@ using Microsoft.CodeAnalysis; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents.Csharp { - public class CsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite + public class CsharpFolderComposite : FolderComposite, IFolderComposite { } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs index a9eebb05fc..f025ab1700 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/FolderComposite.cs @@ -2,23 +2,16 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents { - public interface IProjectComponent : IReadOnlyProjectComponent + public class FolderComposite : ProjectComponent, IFolderComposite { - new string FullPath { get; set; } - new IEnumerable Mutants { get; set; } - new IReadOnlyFolderComposite Parent { get; set; } - new string RelativePath { get; set; } - } - - public class FolderComposite : ProjectComponent, IReadOnlyFolderComposite - { - private readonly List _children = []; + private readonly List _children = []; public readonly List _compilationSyntaxTrees = []; - public IEnumerable Children => _children; + public IEnumerable Children => _children; public override IEnumerable Mutants { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs index 71c1b987d1..b2d9551355 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFileLeaf.cs @@ -1,8 +1,9 @@ using FSharp.Compiler.Syntax; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; using System.Collections.Generic; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents.Fsharp { public class FsharpFileLeaf : ProjectComponent, IFileLeaf { @@ -18,7 +19,7 @@ public class FsharpFileLeaf : ProjectComponent, IFileLeaf public ParsedInput MutatedSyntaxTree { get; set; } - public override IEnumerable Mutants { get; set; } + public override IEnumerable Mutants { get; set; } public override IEnumerable CompilationSyntaxTrees => MutatedSyntaxTrees; diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs index 6eb4a7a9a3..d2c48b7316 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Fsharp/FsharpFolderComposite.cs @@ -1,8 +1,9 @@ using FSharp.Compiler.Syntax; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents.Fsharp { - public class FsharpFolderComposite : FolderComposite, IReadOnlyFolderComposite + public class FsharpFolderComposite : FolderComposite, IFolderComposite { } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs index f6c890d3b5..643a5bb97b 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponent.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Options; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents { public abstract class ProjectComponent : IProjectComponent @@ -14,7 +16,7 @@ public abstract class ProjectComponent : IProjectComponent /// public string RelativePath { get; set; } - public IReadOnlyFolderComposite Parent { get; set; } + public IFolderComposite Parent { get; set; } public Display DisplayFile { get; set; } @@ -65,7 +67,7 @@ public Health CheckHealth(IThresholds threshold) return Health.None; } - return (mutationScore*100) switch + return (mutationScore * 100) switch { var score when score >= threshold.High => Health.Good, var score when score < threshold.High && score >= threshold.Low => Health.Warning, diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs index 3ac800156a..e2821b8cb0 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/ProjectComponentsExtensions.cs @@ -1,40 +1,41 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Abstractions.Helpers; +using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Utilities.Helpers; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents; + +/// +/// Contains extension methods for project components. +/// +public static class IProjectComponentsExtensions { /// - /// Contains extension methods for project components. + /// Checks with the given s whether all parts of the component are excluded. /// - public static class IProjectComponentsExtensions + /// The file to check. + /// The file patters to check with. + /// If any parts of the file are included false; otherwise true. + public static bool IsComponentExcluded(this IReadOnlyProjectComponent projectComponent, IEnumerable filePatterns) { - /// - /// Checks with the given s whether all parts of the component are excluded. - /// - /// The file to check. - /// The file patters to check with. - /// If any parts of the file are included false; otherwise true. - public static bool IsComponentExcluded(this IReadOnlyProjectComponent projectComponent, IEnumerable filePatterns) - { - var includePattern = filePatterns.Where(x => !x.IsExclude).ToList(); - var excludePattern = filePatterns.Where(x => x.IsExclude).ToList(); + var includePattern = filePatterns.Where(x => !x.IsExclude).ToList(); + var excludePattern = filePatterns.Where(x => x.IsExclude).ToList(); - // Get in- and excluded spans - var includedSpans = includePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); - var excludedSpans = excludePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); + // Get in- and excluded spans + var includedSpans = includePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); + var excludedSpans = excludePattern.Where(MatchesFilePattern).SelectMany(x => x.TextSpans).Reduce(); - // If there are only included spans, the file is not excluded. - if ((includedSpans.Any() && !excludedSpans.Any()) || projectComponent.Parent?.Parent == null) - { - return false; - } + // If there are only included spans, the file is not excluded. + if (includedSpans.Any() && !excludedSpans.Any() || projectComponent.Parent?.Parent == null) + { + return false; + } - return !includedSpans.RemoveOverlap(excludedSpans).Any(); + return !includedSpans.RemoveOverlap(excludedSpans).Any(); - bool MatchesFilePattern(FilePattern pattern) => - pattern.Glob.IsMatch(projectComponent.FullPath) || - pattern.Glob.IsMatch(projectComponent.RelativePath); - } + bool MatchesFilePattern(IFilePattern pattern) => + pattern.Glob.IsMatch(projectComponent.FullPath) || + pattern.Glob.IsMatch(projectComponent.RelativePath); } } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs index da645ab4e3..8f9678ef9b 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/Solution.cs @@ -2,16 +2,17 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents +namespace Stryker.Core.ProjectComponents { - public class Solution : ProjectComponent, IReadOnlyFolderComposite + public class Solution : ProjectComponent, IFolderComposite { - private readonly IList _children = new List(); + private readonly IList _children = new List(); - public IEnumerable Children => _children; + public IEnumerable Children => _children; - public override IEnumerable Mutants + public override IEnumerable Mutants { get => Children.SelectMany(x => x.Mutants); set => throw new NotSupportedException("Folders do not contain mutants."); diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs index 9a19806698..c975a25b1c 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/SourceProjects/SourceProjectInfo.cs @@ -2,32 +2,33 @@ using System.Collections.Generic; using Buildalyzer; using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Initialisation.Buildalyzer; -using Stryker.Abstractions.InjectedHelpers; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.InjectedHelpers; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.ProjectComponents.SourceProjects; +namespace Stryker.Core.ProjectComponents.SourceProjects; public class SourceProjectInfo : IProjectAndTests { private readonly List _warnings = []; - public Action OnProjectBuilt {get;set;} + public Action OnProjectBuilt { get; set; } public IAnalyzerResult AnalyzerResult { get; set; } /// /// The Folder/File structure found in the project under test. /// - public IProjectComponent ProjectContents { get; set; } + public IReadOnlyProjectComponent ProjectContents { get; set; } public bool IsFullFramework => AnalyzerResult.TargetsFullFramework(); public string HelperNamespace => CodeInjector.HelperNamespace; - public CodeInjection CodeInjector { get;} = new(); + public CodeInjection CodeInjector { get; } = new(); - public TestProjectsInfo TestProjectsInfo { get; set; } + public ITestProjectsInfo TestProjectsInfo { get; set; } public IReadOnlyCollection Warnings => _warnings; diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs index e734d061d4..fc579edc90 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestCase.cs @@ -1,7 +1,8 @@ using System; using Microsoft.CodeAnalysis; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents.TestProjects +namespace Stryker.Core.ProjectComponents.TestProjects { public sealed class TestCase : IEquatable, ITestCase { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs index 5748e8b754..50aea0f83d 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestFile.cs @@ -2,15 +2,16 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; +using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.ProjectComponents.TestProjects +namespace Stryker.Core.ProjectComponents.TestProjects { - public sealed class TestFile : IEquatable, ITestFile + public sealed class TestFile : IEquatable, ITestFile { public SyntaxTree SyntaxTree { get; init; } public string FilePath { get; init; } public string Source { get; init; } - public IEnumerable Tests { get; private set; } = new List(); + public IList Tests { get; private set; } = new List(); public void AddTest(Guid id, string name, SyntaxNode node) { @@ -19,7 +20,7 @@ public void AddTest(Guid id, string name, SyntaxNode node) return; } - ((IList)Tests).Add(new TestCase + Tests.Add(new TestCase { Id = id, Name = name, @@ -27,7 +28,7 @@ public void AddTest(Guid id, string name, SyntaxNode node) }); } - public bool Equals(TestFile other) => other != null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); + public bool Equals(ITestFile other) => other != null && other.FilePath.Equals(FilePath) && other.Source.Equals(Source); public override bool Equals(object obj) => obj is TestFile file && Equals(file); diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs index e48b821c96..1f9b1e132b 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProject.cs @@ -7,9 +7,10 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.MutantFilters.Extensions; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.MutantFilters; -namespace Stryker.Abstractions.ProjectComponents.TestProjects +namespace Stryker.Core.ProjectComponents.TestProjects { public sealed class TestProject : IEquatable, ITestProject { diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs index c3dc376bfa..01a17a3559 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -4,19 +4,20 @@ using System.Linq; using Buildalyzer; using Microsoft.Extensions.Logging; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Core.Initialisation.Buildalyzer; -namespace Stryker.Abstractions.ProjectComponents.TestProjects; +namespace Stryker.Core.ProjectComponents.TestProjects; public class TestProjectsInfo : ITestProjectsInfo { private readonly IFileSystem _fileSystem; private readonly ILogger _logger; - public IEnumerable TestProjects { get; set; } + public IEnumerable TestProjects { get; set; } - public IEnumerable TestFiles => TestProjects.SelectMany(testProject => testProject.TestFiles).Distinct(); + public IEnumerable TestFiles => TestProjects.SelectMany(testProject => testProject.TestFiles).Distinct(); public IEnumerable AnalyzerResults => TestProjects.Select(testProject => testProject.AnalyzerResult); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs index 6202144d2c..8f22d563cc 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BaselineReporter.cs @@ -1,48 +1,48 @@ using System.Collections.Generic; +using Stryker.Abstractions; using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Baseline.Providers; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; using Stryker.Abstractions.Reporting; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Reporters.Json; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters; + +public class BaselineReporter : IReporter { - public class BaselineReporter : IReporter + private readonly IStrykerOptions _options; + private readonly IBaselineProvider _baselineProvider; + private readonly IGitInfoProvider _gitInfoProvider; + + public BaselineReporter(IStrykerOptions options, IBaselineProvider baselineProvider = null, IGitInfoProvider gitInfoProvider = null) + { + _options = options; + _baselineProvider = baselineProvider ?? BaselineProviderFactory.Create(options); + _gitInfoProvider = gitInfoProvider ?? new GitInfoProvider(options); + } + + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) + { + var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo); + var projectVersion = _gitInfoProvider.GetCurrentBranchName(); + var baselineVersion = $"baseline/{projectVersion}"; + + _baselineProvider.Save(mutationReport, baselineVersion).Wait(); + } + + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) + { + // This reporter does not report during the testrun + } + + public void OnMutantTested(IReadOnlyMutant result) + { + // This reporter does not report during the testrun + } + + public void OnStartMutantTestRun(IEnumerable mutantsToBeTested) { - private readonly StrykerOptions _options; - private readonly IBaselineProvider _baselineProvider; - private readonly IGitInfoProvider _gitInfoProvider; - - public BaselineReporter(StrykerOptions options, IBaselineProvider baselineProvider = null, IGitInfoProvider gitInfoProvider = null) - { - _options = options; - _baselineProvider = baselineProvider ?? BaselineProviderFactory.Create(options); - _gitInfoProvider = gitInfoProvider ?? new GitInfoProvider(options); - } - - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) - { - var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo); - var projectVersion = _gitInfoProvider.GetCurrentBranchName(); - var baselineVersion = $"baseline/{projectVersion}"; - - _baselineProvider.Save(mutationReport, baselineVersion).Wait(); - } - - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) - { - // This reporter does not report during the testrun - } - - public void OnMutantTested(IReadOnlyMutant result) - { - // This reporter does not report during the testrun - } - - public void OnStartMutantTestRun(IEnumerable mutantsToBeTested) - { - // This reporter does not report during the testrun - } + // This reporter does not report during the testrun } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs index 726a0548c0..59d3d969ae 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/BroadcastReporter.cs @@ -2,12 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { /// /// Broadcasts the report calls to all reporters in the list @@ -20,7 +19,7 @@ public class BroadcastReporter : IReporter public BroadcastReporter(IEnumerable reporters) => Reporters = reporters; - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { foreach (var reporter in Reporters) { @@ -52,7 +51,7 @@ public void OnMutantTested(IReadOnlyMutant result) } } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // make sure all other console caches are flushed before writing final reports Thread.Sleep(TimeSpan.FromSeconds(1)); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs index 8beb921c3a..130cde80f6 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextReporter.cs @@ -2,13 +2,14 @@ using System.Linq; using Spectre.Console; using Spectre.Console.Rendering; -using Stryker.Abstractions.Options; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Stryker.Abstractions.Reporting; +using Stryker.Core.ProjectComponents; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { /// /// The clear text reporter, prints a table with results. @@ -24,7 +25,7 @@ public ClearTextReporter(IStrykerOptions strykerOptions, IAnsiConsole console = _console = console ?? AnsiConsole.Console; } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // This reporter does not report during the testrun } @@ -39,7 +40,7 @@ public void OnMutantTested(IReadOnlyMutant result) // This reporter does not report during the testrun } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var files = reportComponent.GetAllFiles(); if (files.Any()) diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs index 6d61d3c254..5ac3cd1cfa 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ClearTextTreeReporter.cs @@ -3,28 +3,31 @@ using System.Linq; using System.Text; using Spectre.Console; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Stryker.Abstractions.Reporting; +using Stryker.Core.ProjectComponents; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { /// /// The clear text tree reporter, prints a tree structure with results. /// public class ClearTextTreeReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IAnsiConsole _console; - public ClearTextTreeReporter(StrykerOptions strykerOptions, IAnsiConsole console = null) + public ClearTextTreeReporter(IStrykerOptions strykerOptions, IAnsiConsole console = null) { _options = strykerOptions; _console = console ?? AnsiConsole.Console; } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // This reporter does not report during the testrun } @@ -39,14 +42,14 @@ public void OnMutantTested(IReadOnlyMutant result) // This reporter does not report during the testrun } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { Tree root = null; var stack = new Stack(); // setup display handlers - reportComponent.DisplayFolder = (IReadOnlyProjectComponent current) => + reportComponent.DisplayFolder = (current) => { var name = Path.GetFileName(current.RelativePath); @@ -61,7 +64,7 @@ public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestPr } }; - reportComponent.DisplayFile = (IReadOnlyProjectComponent current) => + reportComponent.DisplayFile = (current) => { var name = Path.GetFileName(current.RelativePath); @@ -107,7 +110,7 @@ private string DisplayComponent(IReadOnlyProjectComponent inputComponent) var stringBuilder = new StringBuilder(); // Convert the threshold integer values to decimal values - stringBuilder.Append($" [[{ inputComponent.DetectedMutants().Count()}/{ inputComponent.TotalMutants().Count()} "); + stringBuilder.Append($" [[{inputComponent.DetectedMutants().Count()}/{inputComponent.TotalMutants().Count()} "); if (inputComponent.IsComponentExcluded(_options.Mutate)) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs index 1c739107e7..24b42fbc09 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ConsoleDotProgressReporter.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using Spectre.Console; -using Stryker.Abstractions.Reporting; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { /// /// The default reporter, prints a simple progress by printing dots @@ -16,7 +16,7 @@ public class ConsoleDotProgressReporter : IReporter public ConsoleDotProgressReporter(IAnsiConsole console = null) => _console = console ?? AnsiConsole.Console; - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // don't report on mutant creation } @@ -42,6 +42,6 @@ public void OnMutantTested(IReadOnlyMutant result) } } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) => _console.WriteLine(); + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) => _console.WriteLine(); } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs index 75102cb816..80f6dbe198 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs @@ -2,28 +2,27 @@ using System.Linq; using Microsoft.Extensions.Logging; using Spectre.Console; -using Stryker.Abstractions.Clients; +using Stryker.Abstractions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.WebBrowserOpener; -using Stryker.Abstractions.Reporters.Json.SourceFiles; using Stryker.Abstractions.Reporting; +using Stryker.Core.Clients; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.WebBrowserOpener; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { public class DashboardReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IDashboardClient _dashboardClient; private readonly ILogger _logger; private readonly IAnsiConsole _console; private readonly IWebbrowserOpener _browser; - public DashboardReporter(StrykerOptions options, IDashboardClient dashboardClient = null, ILogger logger = null, + public DashboardReporter(IStrykerOptions options, IDashboardClient dashboardClient = null, ILogger logger = null, IAnsiConsole console = null, IWebbrowserOpener browser = null) { _options = options; @@ -33,7 +32,7 @@ public DashboardReporter(StrykerOptions options, IDashboardClient dashboardClien _browser = browser ?? new CrossPlatformBrowserOpener(); } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo); _dashboardClient.PublishReport(mutationReport, _options.ProjectVersion).Wait(); @@ -77,7 +76,7 @@ private void OpenDashboardReport(string reportUri) _console.WriteLine(); } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { if (!ShouldPublishInRealTime()) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs index a79f662f47..2926985123 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/FilteredMutantsLogger.cs @@ -4,7 +4,7 @@ using Stryker.Abstractions.Mutants; using Stryker.Abstractions.ProjectComponents; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { public class FilteredMutantsLogger { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs index 576d6989be..ac015eda4e 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/HtmlReporter.cs @@ -3,27 +3,28 @@ using System.IO.Abstractions; using System.Linq; using Spectre.Console; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.Options.Inputs; +using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Html.RealTime; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.WebBrowserOpener; using Stryker.Abstractions.Reporting; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters.Html.RealTime; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.WebBrowserOpener; +using Stryker.Utilities; -namespace Stryker.Abstractions.Reporters.Html; +namespace Stryker.Core.Reporters.Html; public class HtmlReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IFileSystem _fileSystem; private readonly IAnsiConsole _console; private readonly IWebbrowserOpener _browser; private readonly IRealTimeMutantHandler _mutantHandler; public HtmlReporter( - StrykerOptions options, + IStrykerOptions options, IFileSystem fileSystem = null, IAnsiConsole console = null, IWebbrowserOpener browser = null, @@ -36,7 +37,7 @@ public HtmlReporter( _mutantHandler = mutantHandler ?? new RealTimeMutantHandler(_options); } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var reportPath = BuildReportPath(); WriteHtmlReport(reportPath, reportComponent, testProjectsInfo); @@ -64,7 +65,7 @@ public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestPr _console.WriteLine("You can open it in your browser of choice.", green); } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { if (_options.ReportTypeToOpen == ReportType.Html) { @@ -105,7 +106,7 @@ private string BuildReportPath() return reportPathNormalized; } - private void WriteHtmlReport(string filePath, IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + private void WriteHtmlReport(string filePath, IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo).ToJsonHtmlSafe(); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs index 13e8b122c5..20e9303a3f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEvent.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace Stryker.Abstractions.Reporters.Html.RealTime.Events; +namespace Stryker.Core.Reporters.Html.RealTime.Events; public class SseEvent { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs index 2d7dcb89fa..6b068cdf26 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/Events/SseEventType.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Abstractions.Reporters.Html.RealTime.Events; +namespace Stryker.Core.Reporters.Html.RealTime.Events; public enum SseEventType { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs index b0587284f3..613f92c330 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/IRealTimeMutantHandler.cs @@ -1,6 +1,7 @@ -using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Mutants; -namespace Stryker.Abstractions.Reporters.Html.RealTime; +namespace Stryker.Core.Reporters.Html.RealTime; public interface IRealTimeMutantHandler { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs index 420d9a34dd..cf559a59c4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/ISseServer.cs @@ -1,7 +1,7 @@ using System; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; +using Stryker.Core.Reporters.Html.RealTime.Events; -namespace Stryker.Abstractions.Reporters.Html.RealTime; +namespace Stryker.Core.Reporters.Html.RealTime; public interface ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs index 6e2876672a..6439c3e6db 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/RealTimeMutantHandler.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; -using Stryker.Abstractions.Reporters.Json.SourceFiles; +using Stryker.Abstractions.Options; +using Stryker.Core.Reporters.Html.RealTime.Events; +using Stryker.Core.Reporters.Json.SourceFiles; -namespace Stryker.Abstractions.Reporters.Html.RealTime; +namespace Stryker.Core.Reporters.Html.RealTime; public class RealTimeMutantHandler : IRealTimeMutantHandler { @@ -14,7 +14,7 @@ public class RealTimeMutantHandler : IRealTimeMutantHandler private readonly ISseServer _server; private readonly Queue _delayedEventQueue = new(); - public RealTimeMutantHandler(StrykerOptions options, ISseServer server = null) + public RealTimeMutantHandler(IStrykerOptions options, ISseServer server = null) { _server = server ?? new SseServer(); _server.ClientConnected += ClientConnectedHandler; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs index 5c550c2dc7..d6cd5e4880 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Html/RealTime/SseServer.cs @@ -5,9 +5,9 @@ using System.Net; using System.Net.Sockets; using System.Threading.Tasks; -using Stryker.Abstractions.Reporters.Html.RealTime.Events; +using Stryker.Core.Reporters.Html.RealTime.Events; -namespace Stryker.Abstractions.Reporters.Html.RealTime; +namespace Stryker.Core.Reporters.Html.RealTime; public class SseServer : ISseServer { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs index d63fee22ce..599a0327e4 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; -using Stryker.Abstractions.Reporters.Json.TestFiles; using Stryker.Abstractions.Reporting; -using Stryker.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.Json.TestFiles; -namespace Stryker.Abstractions.Reporters.Json +namespace Stryker.Core.Reporters.Json { public class JsonReport : IJsonReport { @@ -18,7 +18,7 @@ public class JsonReport : IJsonReport public JsonReport() { } - private JsonReport(StrykerOptions options, IReadOnlyProjectComponent mutationReport, TestProjectsInfo testProjectsInfo) + private JsonReport(IStrykerOptions options, IReadOnlyProjectComponent mutationReport, ITestProjectsInfo testProjectsInfo) { Thresholds.Add("high", options.Thresholds.High); Thresholds.Add("low", options.Thresholds.Low); @@ -29,12 +29,12 @@ private JsonReport(StrykerOptions options, IReadOnlyProjectComponent mutationRep AddTestFiles(testProjectsInfo); } - public static IJsonReport Build(StrykerOptions options, IReadOnlyProjectComponent mutationReport, TestProjectsInfo testProjectsInfo) => new JsonReport(options, mutationReport, testProjectsInfo); + public static IJsonReport Build(IStrykerOptions options, IReadOnlyProjectComponent mutationReport, ITestProjectsInfo testProjectsInfo) => new JsonReport(options, mutationReport, testProjectsInfo); private IDictionary GenerateReportComponents(IReadOnlyProjectComponent component) { var files = new Dictionary(); - if (component is IReadOnlyFolderComposite folder) + if (component is IFolderComposite folder) { Merge(files, GenerateFolderReportComponents(folder)); } @@ -46,7 +46,7 @@ private IDictionary GenerateReportComponents(IReadOnlyProje return files; } - private IDictionary GenerateFolderReportComponents(IReadOnlyFolderComposite folderComponent) + private IDictionary GenerateFolderReportComponents(IFolderComposite folderComponent) { var files = new Dictionary(); foreach (var child in folderComponent.Children) @@ -59,11 +59,11 @@ private IDictionary GenerateFolderReportComponents(IReadOnl private static IDictionary GenerateFileReportComponents(IReadOnlyFileLeaf fileComponent) => new Dictionary { { fileComponent.FullPath, new SourceFile(fileComponent) } }; - private void AddTestFiles(TestProjectsInfo testProjectsInfo) + private void AddTestFiles(ITestProjectsInfo testProjectsInfo) { if (testProjectsInfo?.TestFiles is not null) { - TestFiles = new Dictionary(); + TestFiles = new Dictionary(); foreach (var testFile in testProjectsInfo.TestFiles) { if (TestFiles.TryGetValue(testFile.FilePath, out var jsonFile)) diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index e4c61dcbaf..72cffe85e7 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -2,8 +2,9 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json +namespace Stryker.Core.Reporters.Json { internal static class JsonReportSerialization { @@ -14,25 +15,25 @@ internal static class JsonReportSerialization DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; - public static async Task DeserializeJsonReportAsync(this Stream stream) => await JsonSerializer.DeserializeAsync(stream, Options); + public static async Task DeserializeJsonReportAsync(this Stream stream) => await JsonSerializer.DeserializeAsync(stream, Options); - public static async Task SerializeAsync(this JsonReport report, Stream stream) => await JsonSerializer.SerializeAsync(stream, report, Options); + public static async Task SerializeAsync(this IJsonReport report, Stream stream) => await JsonSerializer.SerializeAsync(stream, report, Options); - public static async Task SerializeAsync(this JsonReport report) + public static async Task SerializeAsync(this IJsonReport report) { await using var stream = new MemoryStream(); await report.SerializeAsync(stream); return stream.ToArray(); } - public static void Serialize(this JsonReport report, Stream stream) + public static void Serialize(this IJsonReport report, Stream stream) { using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions { Indented = Options.WriteIndented }); JsonSerializer.Serialize(writer, report, Options); } - public static string ToJson(this JsonReport report) => JsonSerializer.Serialize(report, Options); + public static string ToJson(this IJsonReport report) => JsonSerializer.Serialize(report, Options); - public static string ToJsonHtmlSafe(this JsonReport report) => report.ToJson().Replace("<", "<\" + \""); + public static string ToJsonHtmlSafe(this IJsonReport report) => report.ToJson().Replace("<", "<\" + \""); } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs index d10dccd0e4..a21ca8dd3b 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReporter.cs @@ -2,27 +2,27 @@ using System.IO; using System.IO.Abstractions; using Spectre.Console; -using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json +namespace Stryker.Core.Reporters.Json { public partial class JsonReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IFileSystem _fileSystem; private readonly IAnsiConsole _console; - public JsonReporter(StrykerOptions options, IFileSystem fileSystem = null, IAnsiConsole console = null) + public JsonReporter(IStrykerOptions options, IFileSystem fileSystem = null, IAnsiConsole console = null) { _options = options; _fileSystem = fileSystem ?? new FileSystem(); _console = console ?? AnsiConsole.Console; } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo); var filename = _options.ReportFileName + ".json"; @@ -46,14 +46,14 @@ public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestPr } } - private void WriteReportToJsonFile(string filePath, JsonReport mutationReport) + private void WriteReportToJsonFile(string filePath, IJsonReport mutationReport) { _fileSystem.Directory.CreateDirectory(Path.GetDirectoryName(filePath)); using var file = _fileSystem.File.Create(filePath); mutationReport.Serialize(file); } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // This reporter does not currently report when mutants are created } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs index 9854c629c4..93762bb23b 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json +namespace Stryker.Core.Reporters.Json { public class Location : ILocation { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs index 4818b3680f..158f42f585 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs @@ -1,22 +1,21 @@ using System; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json +namespace Stryker.Core.Reporters.Json; + +public class Position : IPosition { - public class Position : IPosition + private int _line; + public int Line { - private int _line; - public int Line - { - get => _line; - set => _line = value > 0 ? value : throw new ArgumentException("Line number must be higher than 0"); - } + get => _line; + set => _line = value > 0 ? value : throw new ArgumentException("Line number must be higher than 0"); + } - private int _column; - public int Column - { - get => _column; - set => _column = value > 0 ? value : throw new ArgumentException("Column number must be higher than 0"); - } + private int _column; + public int Column + { + get => _column; + set => _column = value > 0 ? value : throw new ArgumentException("Column number must be higher than 0"); } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs index 809f32389c..d239ff6f01 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Abstractions; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json.SourceFiles +namespace Stryker.Core.Reporters.Json.SourceFiles { public class JsonMutant : IJsonMutant { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs index 3285991c06..760ac4b902 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs @@ -2,10 +2,9 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters.Json.SourceFiles; using Stryker.Abstractions.Reporting; -namespace Stryker.Reporters.Json.SourceFiles +namespace Stryker.Core.Reporters.Json.SourceFiles { public class SourceFile : ISourceFile { @@ -35,11 +34,11 @@ public SourceFile(IReadOnlyFileLeaf file, ILogger logger = null) } } - private sealed class UniqueJsonMutantComparer : EqualityComparer + private sealed class UniqueJsonMutantComparer : EqualityComparer { - public override bool Equals(JsonMutant left, JsonMutant right) => left.Id == right.Id; + public override bool Equals(IJsonMutant left, IJsonMutant right) => left.Id == right.Id; - public override int GetHashCode(JsonMutant jsonMutant) => jsonMutant.Id.GetHashCode(); + public override int GetHashCode(IJsonMutant jsonMutant) => jsonMutant.Id.GetHashCode(); } } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs index a37ad14757..c964330798 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs @@ -2,7 +2,7 @@ using System; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Json.TestFiles +namespace Stryker.Core.Reporters.Json.TestFiles { public sealed class JsonTest : IEquatable, IJsonTest { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs index 31f90a857c..09584a7f6f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs @@ -1,29 +1,31 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.ProjectComponents; +using Stryker.Abstractions.Reporting; +using Stryker.Core.ProjectComponents.TestProjects; -namespace Stryker.Abstractions.Reporters.Json.TestFiles +namespace Stryker.Core.Reporters.Json.TestFiles { public class JsonTestFile : IJsonTestFile { public string Language { get; init; } public string Source { get; init; } - public ISet Tests { get; set; } + public ISet Tests { get; set; } public JsonTestFile() { } - public JsonTestFile(TestFile testFile) + public JsonTestFile(ITestFile testFile) { Source = testFile?.Source; Language = "cs"; - Tests = new HashSet(); + Tests = new HashSet(); AddTestFile(testFile); } - public void AddTestFile(TestFile testFile) + public void AddTestFile(ITestFile testFile) { - foreach (var test in testFile?.Tests ?? Enumerable.Empty()) + foreach (var test in testFile?.Tests ?? Enumerable.Empty()) { Tests.Add(new JsonTest(test.Id.ToString()) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs index 335ee82bd0..905917680a 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/MarkdownSummaryReporter.cs @@ -5,23 +5,24 @@ using System.Linq; using Grynwald.MarkdownGenerator; using Spectre.Console; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { /// /// Markdown result table reporter. /// public class MarkdownSummaryReporter : IReporter { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; private readonly IAnsiConsole _console; private readonly IFileSystem _fileSystem; - public MarkdownSummaryReporter(StrykerOptions strykerOptions, IFileSystem fileSystem = null, IAnsiConsole console = null) + public MarkdownSummaryReporter(IStrykerOptions strykerOptions, IFileSystem fileSystem = null, IAnsiConsole console = null) { _options = strykerOptions; _console = console ?? AnsiConsole.Console; @@ -33,7 +34,7 @@ public void OnStartMutantTestRun(IEnumerable mutantsToBeTested) // This reporter does not report during the testrun } - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // This reporter does not report during the testrun } @@ -43,7 +44,7 @@ public void OnMutantTested(IReadOnlyMutant result) // This reporter does not report during the testrun } - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { var files = reportComponent.GetAllFiles(); if (files.Any()) @@ -59,7 +60,7 @@ public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestPr // We must print the report path as the link text because on some terminals links might be supported but not actually clickable: https://github.com/spectreconsole/spectre.console/issues/764 _console.MarkupLineInterpolated(_console.Profile.Capabilities.Links - ? (FormattableString)$"[Green][link={reportUri}]{reportPath}[/][/]" + ? $"[Green][link={reportUri}]{reportPath}[/][/]" : (FormattableString)$"[Green]{reportUri}[/]"); } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs index e6dc72e807..ae730a1c72 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBar.cs @@ -1,7 +1,7 @@ using ShellProgressBar; using System; -namespace Stryker.Abstractions.Reporters.Progress +namespace Stryker.Core.Reporters.Progress { public interface IProgressBar { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs index 367c2bbef2..63fba0b6bc 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressBarReporter.cs @@ -1,8 +1,9 @@ using System; using Spectre.Console; +using Stryker.Abstractions; using Stryker.Abstractions.Mutants; -namespace Stryker.Abstractions.Reporters.Progress +namespace Stryker.Core.Reporters.Progress { public interface IProgressBarReporter { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs index ae79d92472..b0e118fcb3 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/ProgressReporter.cs @@ -1,18 +1,17 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Abstractions.Reporting; -using Stryker.Abstractions.Mutants; +using Stryker.Abstractions; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.ProjectComponents.TestProjects; +using Stryker.Abstractions.Reporting; -namespace Stryker.Abstractions.Reporters.Progress +namespace Stryker.Core.Reporters.Progress { public class ProgressReporter : IReporter { private readonly IProgressBarReporter _progressBarReporter; public ProgressReporter(IProgressBarReporter progressBarReporter) => _progressBarReporter = progressBarReporter; - public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { // we don't track mutant creation } @@ -21,7 +20,7 @@ public void OnMutantsCreated(IReadOnlyProjectComponent reportComponent, TestProj public void OnMutantTested(IReadOnlyMutant result) => _progressBarReporter.ReportRunTest(result); - public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, TestProjectsInfo testProjectsInfo) + public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo) { if (reportComponent.Mutants.Any()) { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs index dff9d2bcb1..c7106e01d3 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Progress/StopWatchProvider.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Abstractions.Reporters.Progress +namespace Stryker.Core.Reporters.Progress { public interface IStopWatchProvider { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs index ab7f2b5c18..8e4d340d1a 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/ReporterFactory.cs @@ -1,27 +1,27 @@ using System.Collections.Generic; using System.Linq; -using Stryker.Abstractions.Baseline.Providers; -using Stryker.Abstractions; -using Stryker.Abstractions.Reporters.Html; -using Stryker.Abstractions.Reporters.Json; -using Stryker.Abstractions.Reporters.Progress; +using Stryker.Abstractions.Options; using Stryker.Abstractions.Reporting; +using Stryker.Core.Baseline.Providers; +using Stryker.Core.Reporters.Html; +using Stryker.Core.Reporters.Json; +using Stryker.Core.Reporters.Progress; -namespace Stryker.Abstractions.Reporters +namespace Stryker.Core.Reporters { public interface IReporterFactory { - IReporter Create(StrykerOptions options, IGitInfoProvider branchProvider = null); + IReporter Create(IStrykerOptions options, IGitInfoProvider branchProvider = null); } public class ReporterFactory : IReporterFactory { - public IReporter Create(StrykerOptions options, IGitInfoProvider branchProvider = null) + public IReporter Create(IStrykerOptions options, IGitInfoProvider branchProvider = null) { return new BroadcastReporter(DetermineEnabledReporters(options.Reporters.ToList(), CreateReporters(options))); } - private IDictionary CreateReporters(StrykerOptions options) + private IDictionary CreateReporters(IStrykerOptions options) { return new Dictionary { diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs index 1a40e57a75..ed4af2f8c1 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/CrossPlatformBrowserOpener.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; -namespace Stryker.Abstractions.Reporters.WebBrowserOpener +namespace Stryker.Core.Reporters.WebBrowserOpener { [ExcludeFromCodeCoverage] public class CrossPlatformBrowserOpener : IWebbrowserOpener diff --git a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs index 30ffdb5da4..ff67b9c3d1 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/WebBrowserOpener/IWebbrowserOpener.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Stryker.Abstractions.Reporters.WebBrowserOpener +namespace Stryker.Core.Reporters.WebBrowserOpener { public interface IWebbrowserOpener { diff --git a/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj b/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj index 9f869b6058..f9f8ddc7a7 100644 --- a/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj +++ b/src/Stryker.Core/Stryker.Core/Stryker.Core.csproj @@ -32,8 +32,6 @@ - - diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs index e61daebe7f..fe63ee4e35 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunResult.cs @@ -1,13 +1,13 @@ -using Stryker.Abstractions; +using Stryker.Abstractions.Options; -namespace Stryker.Abstractions +namespace Stryker.Core { public class StrykerRunResult { - private readonly StrykerOptions _options; + private readonly IStrykerOptions _options; public double MutationScore { get; private set; } - public StrykerRunResult(StrykerOptions options, double mutationScore) + public StrykerRunResult(IStrykerOptions options, double mutationScore) { _options = options; MutationScore = mutationScore; @@ -16,7 +16,7 @@ public StrykerRunResult(StrykerOptions options, double mutationScore) public bool ScoreIsLowerThanThresholdBreak() { // If the mutation score is NaN we don't have a result yet - return !double.IsNaN(MutationScore) && MutationScore < ((double)_options.Thresholds.Break / 100); + return !double.IsNaN(MutationScore) && MutationScore < (double)_options.Thresholds.Break / 100; } } } diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs index 970c3f419f..cc3552b655 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs @@ -5,16 +5,19 @@ using System.Diagnostics; using System.Linq; using Microsoft.Extensions.Logging; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.MutationTest; using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters; +using Stryker.Core.Initialisation; +using Stryker.Core.MutationTest; +using Stryker.Core.ProjectComponents; +using Stryker.Core.ProjectComponents.TestProjects; +using Stryker.Core.Reporters; -namespace Stryker.Abstractions +namespace Stryker.Core { public interface IStrykerRunner { @@ -63,7 +66,7 @@ public StrykerRunResult RunMutationTest(IStrykerInputs inputs, ILoggerFactory lo _mutationTestProcesses = projectOrchestrator.MutateProjects(options, reporters).ToList(); var rootComponent = AddRootFolderIfMultiProject(_mutationTestProcesses.Select(x => x.Input.SourceProjectInfo.ProjectContents).ToList(), options); - var combinedTestProjectsInfo = _mutationTestProcesses.Select(mtp => mtp.Input.TestProjectsInfo).Aggregate((a, b) => a + b); + var combinedTestProjectsInfo = _mutationTestProcesses.Select(mtp => mtp.Input.TestProjectsInfo).Aggregate((a, b) => (TestProjectsInfo)a + (TestProjectsInfo)b); _logger.LogInformation("{MutantsCount} mutants created", rootComponent.Mutants.Count()); @@ -156,11 +159,11 @@ private void SetupLogging(ILoggerFactory loggerFactory) _logger = ApplicationLogging.LoggerFactory.CreateLogger(); } - private void AnalyzeCoverage(StrykerOptions options) + private void AnalyzeCoverage(IStrykerOptions options) { if (options.OptimizationMode.HasFlag(OptimizationModes.SkipUncoveredMutants) || options.OptimizationMode.HasFlag(OptimizationModes.CoverageBasedTest)) { - _logger.LogInformation("Capture mutant coverage using '{OptimizationMode}' mode.",options.OptimizationMode); + _logger.LogInformation("Capture mutant coverage using '{OptimizationMode}' mode.", options.OptimizationMode); foreach (var project in _mutationTestProcesses) { @@ -175,7 +178,7 @@ private void AnalyzeCoverage(StrykerOptions options) /// A list of all project root components /// The current stryker options /// The root folder component - private IProjectComponent AddRootFolderIfMultiProject(IEnumerable projectComponents, StrykerOptions options) + private IReadOnlyProjectComponent AddRootFolderIfMultiProject(IEnumerable projectComponents, IStrykerOptions options) { if (!projectComponents.Any()) { @@ -188,7 +191,7 @@ private IProjectComponent AddRootFolderIfMultiProject(IEnumerable)projectComponents); return rootComponent; } diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs index fd49a1d8e5..5192b321c5 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/CoverageRunResult.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Stryker.Abstractions.TestRunners +namespace Stryker.Core.TestRunners { public enum CoverageConfidence { @@ -57,7 +57,7 @@ public CoverageRunResult(Guid testId, CoverageConfidence confidence, IEnumerable foreach (var leakedMutation in leakedMutations) { - _mutationFlags[leakedMutation] = confidence == CoverageConfidence.Exact ? MutationTestingRequirements.NeedEarlyActivation: MutationTestingRequirements.CoveredOutsideTest; + _mutationFlags[leakedMutation] = confidence == CoverageConfidence.Exact ? MutationTestingRequirements.NeedEarlyActivation : MutationTestingRequirements.CoveredOutsideTest; } Confidence = confidence; diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs index 1f69b84a16..abb86bbf92 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunResult.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Core.TestRunners.VsTest; -namespace Stryker.Abstractions.TestRunners; +namespace Stryker.Core.TestRunners; public interface ITestRunResult { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs index 19657df22c..decbdb1372 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/ITestRunner.cs @@ -4,15 +4,15 @@ using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.TestRunners +namespace Stryker.Core.TestRunners { - public delegate bool TestUpdateHandler(IReadOnlyList testedMutants, + public delegate bool TestUpdateHandler(IReadOnlyList testedMutants, ITestGuids failedTests, ITestGuids ranTests, ITestGuids timedOutTests); - + public interface ITestRunner : IDisposable { bool DiscoverTests(string assembly); @@ -23,6 +23,6 @@ public interface ITestRunner : IDisposable IEnumerable CaptureCoverage(IProjectAndTests project); - TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update); + TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update); } } diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs index b1f128f5b2..46aa167b8e 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestFrameworks.cs @@ -1,6 +1,6 @@ using System; -namespace Stryker.Abstractions.TestRunners +namespace Stryker.Core.TestRunners { [Flags] public enum TestFrameworks diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs index 279796e5b9..8004965a3a 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/TestRunResult.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.TestRunners; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions.TestRunners.VsTest; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners.VsTest; -namespace Stryker.Abstractions.TestRunners +namespace Stryker.Core.TestRunners { public class TestRunResult : ITestRunResult { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs index fbb04cc004..3922c53370 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/DiscoveryEventHandler.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { public class DiscoveryEventHandler : ITestDiscoveryEventsHandler { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs index 4e3870d73b..c565a4f571 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/RunEventHandler.cs @@ -10,7 +10,7 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { public interface IRunResults { @@ -176,7 +176,7 @@ public void HandleTestRunComplete( if (testRunCompleteArgs.Error.GetType() == typeof(TransationLayerException)) { _logger.LogDebug(testRunCompleteArgs.Error, - "{RunnerId}: VsTest may have crashed, triggering VsTest restart!",_runnerId); + "{RunnerId}: VsTest may have crashed, triggering VsTest restart!", _runnerId); Failed = true; } else if (testRunCompleteArgs.Error.InnerException is IOException sock) diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs index 98dc27c786..e0253a0dea 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/StrykerVstestHostLauncher.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Threading; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { public interface IStrykerTestHostLauncher : ITestHostLauncher { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs index d8528bfdb0..b89480412e 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/TestRun.cs @@ -17,7 +17,7 @@ using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { internal class TestRun { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs index 65bc056bc7..83b4d3c9be 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestContextInformation.cs @@ -9,12 +9,13 @@ using Serilog.Events; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; -using Stryker.Abstractions.Mutants; -using Stryker.Abstractions; -using Stryker.Abstractions.ToolHelpers; +using Stryker.Abstractions.Options; +using Stryker.Abstractions.TestRunners; +using Stryker.Core.Helpers; +using Stryker.Core.Mutants; using Stryker.DataCollector; -namespace Stryker.Abstractions.TestRunners.VsTest; +namespace Stryker.Core.TestRunners.VsTest; /// /// Handles VsTest setup and configuration. @@ -31,15 +32,35 @@ public sealed class VsTestContextInformation : IDisposable private TestFrameworks _testFramework; /// - /// Creates an instance. + /// Discovered tests (VsTest format) + /// + public IDictionary VsTests { get; private set; } + + /// + /// Tests in each source (assembly) /// + public IDictionary> TestsPerSource { get; } = new Dictionary>(); + + /// + /// Tests (Stryker format) + /// + public TestSet Tests { get; } = new(); + + public IStrykerOptions Options { get; } + + /// + /// Log folder path + /// + public string LogPath => + Options.OutputPath == null ? "logs" : _fileSystem.Path.Combine(Options.OutputPath, "logs"); + /// Configuration options /// /// /// /// /// - public VsTestContextInformation(StrykerOptions options, + public VsTestContextInformation(IStrykerOptions options, IVsTestHelper helper = null, IFileSystem fileSystem = null, Func builder = null, @@ -56,34 +77,6 @@ public VsTestContextInformation(StrykerOptions options, _logger = logger ?? ApplicationLogging.LoggerFactory.CreateLogger(); } - /// - /// Discovered tests (VsTest format) - /// - public IDictionary VsTests { get; private set; } - - /// - /// Tests in each source (assembly) - /// - public IDictionary> TestsPerSource { get; } = new Dictionary>(); - - - - /// - /// Tests (Stryker format) - /// - public TestSet Tests { get; } = new(); - - /// - /// Stryker options - /// - public StrykerOptions Options { get; } - - /// - /// Log folder path - /// - public string LogPath => - Options.OutputPath == null ? "logs" : _fileSystem.Path.Combine(Options.OutputPath, "logs"); - public void Dispose() { if (_disposed) @@ -256,7 +249,7 @@ private string GenerateCoreSettings(int maxCpu, string frameworkVersion, string ? string.Empty : $"{frameworkVersion}" + Environment.NewLine; // cannot specify AnyCPU or default for VsTest - var platformConfig = (string.IsNullOrWhiteSpace(platform) || platform=="AnyCPU" || platform=="Default") + var platformConfig = string.IsNullOrWhiteSpace(platform) || platform == "AnyCPU" || platform == "Default" ? string.Empty : $"{platform}" + Environment.NewLine; var testCaseFilter = string.IsNullOrWhiteSpace(Options.TestCaseFilter) @@ -269,7 +262,7 @@ private string GenerateCoreSettings(int maxCpu, string frameworkVersion, string true"; } - private string GenerateRunSettingsForDiscovery(string frameworkVersion= null, string platform = null) => + private string GenerateRunSettingsForDiscovery(string frameworkVersion = null, string platform = null) => $@" {GenerateCoreSettings(Options.Concurrency, frameworkVersion, platform)} true diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs index ac4802fcc4..d5c1672121 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestDescription.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Stryker.Abstractions.Mutants; +using Stryker.Core.Mutants; +using Stryker.Core.TestRunners; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { public sealed class VsTestDescription { diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs index 023b84e774..0ae0f181b7 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs @@ -6,16 +6,17 @@ using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Initialisation; -using Stryker.Abstractions.Initialisation.Buildalyzer; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Options; -using Stryker.Abstractions.Mutants; using Stryker.Abstractions.TestRunners; +using Stryker.Core.Initialisation.Buildalyzer; +using Stryker.Core.Mutants; -namespace Stryker.Abstractions.TestRunners.VsTest; +namespace Stryker.Core.TestRunners.VsTest; public sealed class VsTestRunner : IDisposable { @@ -61,9 +62,9 @@ public TestRunResult InitialTest(IProjectAndTests project) var vsTestDescription = new VsTestDescription(result.TestCase); _context.VsTests[result.TestCase.Id] = vsTestDescription; _context.Tests.RegisterTest(vsTestDescription.Description); - _logger.LogWarning( - "{RunnerId}: Initial test run encounter an unexpected test case ({DisplayName}), mutation tests may be inaccurate. Disable coverage analysis if you have doubts.", - RunnerId, result.TestCase.DisplayName); + _logger.LogWarning( + "{RunnerId}: Initial test run encounter an unexpected test case ({DisplayName}), mutation tests may be inaccurate. Disable coverage analysis if you have doubts.", + RunnerId, result.TestCase.DisplayName); } _context.VsTests[result.TestCase.Id].RegisterInitialTestResult(result); @@ -71,10 +72,10 @@ public TestRunResult InitialTest(IProjectAndTests project) var totalCountOfTests = _context.GetTestsForSources(project.GetTestAssemblies()).Count; // get the test results, but prevent compression of 'all tests' - return BuildTestRunResult(testResults, totalCountOfTests, totalCountOfTests,false); + return BuildTestRunResult(testResults, totalCountOfTests, totalCountOfTests, false); } - public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update) + public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update) { var mutantTestsMap = new Dictionary(); @@ -82,9 +83,9 @@ public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValue if (testCases?.Count == 0) { - return new TestRunResult(_context.VsTests.Values, TestGuidsList.NoTest(), TestGuidsList.NoTest(), - TestGuidsList.NoTest(), "Mutants are not covered by any test!", Enumerable.Empty(), - TimeSpan.Zero); + return new TestRunResult(_context.VsTests.Values, TestGuidsList.NoTest(), TestGuidsList.NoTest(), + TestGuidsList.NoTest(), "Mutants are not covered by any test!", Enumerable.Empty(), + TimeSpan.Zero); } var totalCountOfTests = _context.GetTestsForSources(project.GetTestAssemblies()).Count; @@ -109,12 +110,12 @@ public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValue void HandleUpdate(IRunResults handler) { var handlerTestResults = handler.TestResults; - var tests = handlerTestResults.Select(p =>p.TestCase.Id).Distinct().Count()>= totalCountOfTests + var tests = handlerTestResults.Select(p => p.TestCase.Id).Distinct().Count() >= totalCountOfTests ? (ITestGuids)TestGuidsList.EveryTest() : new WrappedGuidsEnumeration(handlerTestResults.Select(t => t.TestCase.Id)); - var failedTest = new WrappedGuidsEnumeration(handlerTestResults - .Where(tr => tr.Outcome == TestOutcome.Failed) - .Select(t => t.TestCase.Id)); + var failedTest = new WrappedGuidsEnumeration(handlerTestResults + .Where(tr => tr.Outcome == TestOutcome.Failed) + .Select(t => t.TestCase.Id)); var timedOutTest = new WrappedGuidsEnumeration(handler.TestsInTimeout?.Select(t => t.Id)); var remainingMutants = update?.Invoke(mutants, failedTest, tests, timedOutTest); @@ -127,13 +128,13 @@ void HandleUpdate(IRunResults handler) } // all mutants status have been resolved, we can stop - _logger.LogDebug("{RunnerId}: Each mutant's fate has been established, we can stop.", RunnerId); + _logger.LogDebug("{RunnerId}: Each mutant's fate has been established, we can stop.", RunnerId); _vsTestConsole.CancelTestRun(); _currentSessionCancelled = true; } } - private ICollection TestCases(IReadOnlyList mutants, Dictionary mutantTestsMap) + private ICollection TestCases(IReadOnlyList mutants, Dictionary mutantTestsMap) { ICollection testCases; // if we optimize the number of tests to run @@ -148,11 +149,11 @@ private ICollection TestCases(IReadOnlyList mutants, Dictionary m.AssessingTests.GetGuids()).ToList(); - _logger.LogDebug("{RunnerId}: Testing [{Mutants}]", RunnerId, - string.Join(',', mutants.Select(m => m.DisplayName))); - _logger.LogTrace( - "{RunnerId}: against {TestCases}.", RunnerId, - testCases == null ? "all tests." : string.Join(", ", testCases)); + _logger.LogDebug("{RunnerId}: Testing [{Mutants}]", RunnerId, + string.Join(',', mutants.Select(m => m.DisplayName))); + _logger.LogTrace( + "{RunnerId}: against {TestCases}.", RunnerId, + testCases == null ? "all tests." : string.Join(", ", testCases)); } else { @@ -169,8 +170,8 @@ private ICollection TestCases(IReadOnlyList mutants, Dictionary t.TestCase.Id).ToHashSet(); @@ -180,14 +181,14 @@ private TestRunResult BuildTestRunResult(IRunResults testResults, int expectedTe // this is needed when the tests list is not stable (mutations can generate variation for theories) and also helps for performance // so we assume that if executed at least as much test as have been detected, it means all tests have been executed // EXCEPT when no test have been found. Otherwise, an empty test project would transform non covered mutants to survivors. - var ranTests = compressAll && totalCountOfTests > 0 && ranTestsCount >= totalCountOfTests - ? (ITestGuids)TestGuidsList.EveryTest() - : new WrappedGuidsEnumeration(testCases); + var ranTests = compressAll && totalCountOfTests > 0 && ranTestsCount >= totalCountOfTests + ? (ITestGuids)TestGuidsList.EveryTest() + : new WrappedGuidsEnumeration(testCases); var failedTests = resultAsArray.Where(tr => tr.Outcome == TestOutcome.Failed).Select(t => t.TestCase.Id); if (ranTests.IsEmpty && (testResults.TestsInTimeout == null || testResults.TestsInTimeout.Count == 0)) { - _logger.LogTrace("{RunnerId}: Test session reports 0 result and 0 stuck test.", RunnerId); + _logger.LogTrace("{RunnerId}: Test session reports 0 result and 0 stuck test.", RunnerId); } var duration = TimeSpan.FromTicks(_context.VsTests.Values.Sum(t => t.InitialRunTime.Ticks)); @@ -195,8 +196,8 @@ private TestRunResult BuildTestRunResult(IRunResults testResults, int expectedTe var message = string.Join(Environment.NewLine, resultAsArray.Where(tr => !string.IsNullOrWhiteSpace(tr.ErrorMessage)) .Select(tr => $"{tr.DisplayName}{Environment.NewLine}{Environment.NewLine}{tr.ErrorMessage}")); - var messages = resultAsArray.Select(tr => - $"{tr.DisplayName}{Environment.NewLine}{Environment.NewLine}{string.Join(Environment.NewLine, tr.Messages.Select(tm => tm.Text))}"); + var messages = resultAsArray.Select(tr => + $"{tr.DisplayName}{Environment.NewLine}{Environment.NewLine}{string.Join(Environment.NewLine, tr.Messages.Select(tm => tm.Text))}"); var failedTestsDescription = new WrappedGuidsEnumeration(failedTests); var timedOutTests = new WrappedGuidsEnumeration(testResults.TestsInTimeout?.Select(t => t.Id)); return timeout @@ -206,11 +207,11 @@ private TestRunResult BuildTestRunResult(IRunResults testResults, int expectedTe messages, duration); } - public IRunResults RunTestSession(ITestGuids testsToRun, IProjectAndTests project, int? timeout = null, Dictionary mutantTestsMap= null, Action updateHandler = null) => + public IRunResults RunTestSession(ITestGuids testsToRun, IProjectAndTests project, int? timeout = null, Dictionary mutantTestsMap = null, Action updateHandler = null) => RunTestSession(testsToRun, project, false, timeout, updateHandler, mutantTestsMap).normal; public IRunResults RunCoverageSession(ITestGuids testsToRun, IProjectAndTests project) => - RunTestSession(testsToRun, project, true).raw; + RunTestSession(testsToRun, project, true).raw; private (IRunResults normal, IRunResults raw) RunTestSession(ITestGuids tests, IProjectAndTests projectAndTests, bool forCoverage, int? timeOut = null, Action updateHandler = null, @@ -266,8 +267,8 @@ void HandlerUpdate(object sender, EventArgs e) } } - private void RunVsTest(ITestGuids tests, string source, string runSettings, TestPlatformOptions options, - int? timeOut, RunEventHandler eventHandler) + private void RunVsTest(ITestGuids tests, string source, string runSettings, TestPlatformOptions options, + int? timeOut, RunEventHandler eventHandler) { for (var attempt = 0; attempt < MaxAttempts; attempt++) { @@ -275,7 +276,7 @@ private void RunVsTest(ITestGuids tests, string source, string runSettings, Test eventHandler.StartSession(); _currentSessionCancelled = false; - var session = Task.Run(()=> + var session = Task.Run(() => { if (tests.IsEveryTest) { @@ -389,7 +390,7 @@ private void Dispose(bool disposing) } catch (Exception e) { - _logger.LogError(e, "Exception when disposing {RunnerId}", RunnerId); + _logger.LogError(e, "Exception when disposing {RunnerId}", RunnerId); } } diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs index 6bf30b6d95..fe950f44dd 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs @@ -8,14 +8,15 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Stryker.Abstractions; using Stryker.Abstractions.Initialisation; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Options; -using Stryker.Abstractions.TestRunners; +using Stryker.Core.Mutants; using Stryker.DataCollector; -namespace Stryker.Abstractions.TestRunners.VsTest +namespace Stryker.Core.TestRunners.VsTest { public sealed class VsTestRunnerPool : ITestRunner { @@ -43,7 +44,7 @@ public VsTestRunnerPool(VsTestContextInformation vsTestContext, } [ExcludeFromCodeCoverage(Justification = "It depends on the deployment of VsTest.")] - public VsTestRunnerPool(StrykerOptions options, IFileSystem fileSystem = null) + public VsTestRunnerPool(IStrykerOptions options, IFileSystem fileSystem = null) { Context = new VsTestContextInformation(options, fileSystem: fileSystem); _countOfRunners = Math.Max(1, options.Concurrency); @@ -55,7 +56,7 @@ public VsTestRunnerPool(StrykerOptions options, IFileSystem fileSystem = null) public TestSet GetTests(IProjectAndTests project) => Context.GetTestsForSources(project.GetTestAssemblies()); - public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update) + public TestRunResult TestMultipleMutants(IProjectAndTests project, ITimeoutValueCalculator timeoutCalc, IReadOnlyList mutants, TestUpdateHandler update) => RunThis(runner => runner.TestMultipleMutants(project, timeoutCalc, mutants, update)); public TestRunResult InitialTest(IProjectAndTests project) @@ -178,14 +179,14 @@ private bool ConvertSingleResult(TestResult testResult, ISet seenTestCases { // this is an extra result. Coverage data is already present in the already parsed result _logger.LogDebug( - "VsTestRunner: Extra result for test {TestCase}, so no coverage data for it.",testResult.TestCase.DisplayName); + "VsTestRunner: Extra result for test {TestCase}, so no coverage data for it.", testResult.TestCase.DisplayName); coverageRunResult = null; return true; } // the coverage collector was not able to report anything ==> it has not been tracked by it, so we do not have coverage data // ==> we need it to use this test against every mutation - _logger.LogDebug("VsTestRunner: No coverage data for {TestCase}.",testResult.TestCase.DisplayName); + _logger.LogDebug("VsTestRunner: No coverage data for {TestCase}.", testResult.TestCase.DisplayName); seenTestCases.Add(testDescription.Id); coverageRunResult = new CoverageRunResult(testCaseId, CoverageConfidence.Dubious, Enumerable.Empty(), Enumerable.Empty(), Enumerable.Empty()); @@ -213,7 +214,7 @@ private CoverageRunResult BuildCoverageRunResultFromCoverageInfo(string property if (string.IsNullOrWhiteSpace(propertyPairValue)) { // do not attempt to parse empty strings - _logger.LogDebug("VsTestRunner: Test {TestCase} does not cover any mutation.",testResult.TestCase.DisplayName); + _logger.LogDebug("VsTestRunner: Test {TestCase} does not cover any mutation.", testResult.TestCase.DisplayName); coveredMutants = Enumerable.Empty(); staticMutants = Enumerable.Empty(); } @@ -241,7 +242,7 @@ private CoverageRunResult BuildCoverageRunResultFromCoverageInfo(string property ? Enumerable.Empty() : propertyPairValue.Split(',').Select(int.Parse); _logger.LogDebug( - "VsTestRunner: Some mutations were executed outside any test (mutation ids: {MutationIds}).",propertyPairValue); + "VsTestRunner: Some mutations were executed outside any test (mutation ids: {MutationIds}).", propertyPairValue); } else { diff --git a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs index 82c508b998..25384eca97 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/Buildalyzer.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Buildalyzer; -namespace Stryker.Abstractions.Testing +namespace Stryker.Core.Testing { /// /// This is an interface to mock buildalyzer classes diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs index 00ea899e2d..6e2b220344 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExecutor.cs @@ -4,8 +4,9 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; +using Stryker.Utilities; -namespace Stryker.Abstractions.Testing +namespace Stryker.Core.Testing { /// /// Used for mocking System.Process diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs index 32189bb8c2..8878f2aa35 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs @@ -8,8 +8,9 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.InteropServices; +using Stryker.Core; -namespace Stryker.Abstractions.Testing +namespace Stryker.Core.Testing { // integration with OS [ExcludeFromCodeCoverage] diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs index b438905232..89eb5fb8e6 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessResult.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Stryker.Abstractions.Testing +namespace Stryker.Core.Testing { [ExcludeFromCodeCoverage] public class ProcessResult diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/packages.lock.json b/src/Stryker.Core/Stryker.Core/ToolHelpers/packages.lock.json deleted file mode 100644 index 7c8b40ed83..0000000000 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/packages.lock.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "DotNet.ReproducibleBuilds": { - "type": "Direct", - "requested": "[1.2.4, )", - "resolved": "1.2.4", - "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" - }, - "Microsoft.TestPlatform.Portable": { - "type": "Direct", - "requested": "[17.10.0, )", - "resolved": "17.10.0", - "contentHash": "lBzvhSA6hQ6T8ML1ld1E9fdi1EvXu4X/0d3fxNxST/D1SSNBPMq02gj3K3GyGru1JDs+ggOv8FMt7Cg6Cy9oWw==" - } - } - } -} \ No newline at end of file diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj b/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj deleted file mode 100644 index cb9ddb3927..0000000000 --- a/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - - - - - - diff --git a/src/Stryker.Core/Stryker.Core/packages.lock.json b/src/Stryker.Core/Stryker.Core/packages.lock.json index 001554fdae..d22056a117 100644 --- a/src/Stryker.Core/Stryker.Core/packages.lock.json +++ b/src/Stryker.Core/Stryker.Core/packages.lock.json @@ -390,14 +390,6 @@ "resolved": "8.0.0", "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, "Microsoft.Extensions.Options": { "type": "Transitive", "resolved": "8.0.0", @@ -1596,7 +1588,12 @@ } }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } }, "Microsoft.CodeAnalysis.VisualBasic": { "type": "CentralTransitive", @@ -1607,6 +1604,15 @@ "Microsoft.CodeAnalysis.Common": "[4.0.0]" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "RegexParser": { "type": "CentralTransitive", "requested": "[0.5.1, )", diff --git a/src/Stryker.Options/FilePattern.cs b/src/Stryker.Options/FilePattern.cs index 257e0f5ef1..c187da6a24 100644 --- a/src/Stryker.Options/FilePattern.cs +++ b/src/Stryker.Options/FilePattern.cs @@ -1,8 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; using DotNet.Globbing; using Microsoft.CodeAnalysis.Text; using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; using Stryker.Utilities; +using Stryker.Utilities.Helpers; namespace Stryker.Abstractions { diff --git a/src/Stryker.Options/Options/InputDefinition.cs b/src/Stryker.Options/Options/InputDefinition.cs index adfb315d4f..bb7e18d45d 100644 --- a/src/Stryker.Options/Options/InputDefinition.cs +++ b/src/Stryker.Options/Options/InputDefinition.cs @@ -1,3 +1,6 @@ +using System; +using System.Collections.Generic; +using System.Linq; using System.Text; namespace Stryker.Abstractions.Options diff --git a/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs index d0326855db..00f44dbd8d 100644 --- a/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs +++ b/src/Stryker.Options/Options/Inputs/BaselineProviderInput.cs @@ -1,6 +1,7 @@ +using System.Collections.Generic; +using System.Linq; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Reporters; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs index d8314efa1a..b1093fe866 100644 --- a/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs +++ b/src/Stryker.Options/Options/Inputs/DashboardApiKeyInput.cs @@ -3,7 +3,6 @@ using System.Linq; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Reporters; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs index 4a62446480..e976d88ad8 100644 --- a/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs +++ b/src/Stryker.Options/Options/Inputs/DiffIgnoreChangesInput.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Stryker.Utilities; namespace Stryker.Abstractions.Options.Inputs { @@ -14,11 +15,11 @@ Any non-excluded files will trigger all mutants to be tested because we cannot d Use glob syntax for wildcards: https://en.wikipedia.org/wiki/Glob_(programming) Example: ['**/*Assets.json','**/favicon.ico']"; - public IEnumerable Validate() + public IEnumerable Validate() { if (SuppliedInput is { }) { - var diffIgnoreStrings = new List(); + var diffIgnoreStrings = new List(); foreach (var pattern in SuppliedInput) { diffIgnoreStrings.Add(new ExclusionPattern(FilePathUtils.NormalizePathSeparators(pattern))); @@ -26,7 +27,7 @@ public IEnumerable Validate() return diffIgnoreStrings; } - return Enumerable.Empty(); + return Enumerable.Empty(); } } } diff --git a/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs index 3b0d4699db..82e9eb83f9 100644 --- a/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs +++ b/src/Stryker.Options/Options/Inputs/IgnoreMutationsInput.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Mutators; +using Stryker.Utilities; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/Inputs/OpenReportInput.cs b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs index 90cf2caae6..00208c70d8 100644 --- a/src/Stryker.Options/Options/Inputs/OpenReportInput.cs +++ b/src/Stryker.Options/Options/Inputs/OpenReportInput.cs @@ -5,12 +5,6 @@ namespace Stryker.Abstractions.Options.Inputs { - public enum ReportType - { - Html, - Dashboard - } - public class OpenReportInput : Input { public override string Default => "Html"; diff --git a/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs index e8ec039220..ec138eaaa4 100644 --- a/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs +++ b/src/Stryker.Options/Options/Inputs/ProjectVersionInput.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Reporters; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/Inputs/ReportersInput.cs b/src/Stryker.Options/Options/Inputs/ReportersInput.cs index 11c485beba..5b64920917 100644 --- a/src/Stryker.Options/Options/Inputs/ReportersInput.cs +++ b/src/Stryker.Options/Options/Inputs/ReportersInput.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using Stryker.Abstractions.Exceptions; -using Stryker.Abstractions.Reporters; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs index 342ee4937e..3934736b59 100644 --- a/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs +++ b/src/Stryker.Options/Options/Inputs/TestProjectsInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Stryker.Utilities; namespace Stryker.Abstractions.Options.Inputs { diff --git a/src/Stryker.Options/Options/StrykerInputs.cs b/src/Stryker.Options/Options/StrykerInputs.cs index eb74dc6c7a..d45c2c4b9b 100644 --- a/src/Stryker.Options/Options/StrykerInputs.cs +++ b/src/Stryker.Options/Options/StrykerInputs.cs @@ -50,12 +50,12 @@ public interface IStrykerInputs OpenReportEnabledInput OpenReportEnabledInput { get; init; } BreakOnInitialTestFailureInput BreakOnInitialTestFailureInput { get; init; } - StrykerOptions ValidateAll(); + IStrykerOptions ValidateAll(); } public class StrykerInputs : IStrykerInputs { - private StrykerOptions _strykerOptionsCache; + private IStrykerOptions _strykerOptionsCache; private readonly IFileSystem _fileSystem; public StrykerInputs(IFileSystem fileSystem = null) @@ -107,7 +107,7 @@ public StrykerInputs(IFileSystem fileSystem = null) public OpenReportEnabledInput OpenReportEnabledInput { get; init; } = new(); public BreakOnInitialTestFailureInput BreakOnInitialTestFailureInput { get; init; } = new(); - public StrykerOptions ValidateAll() + public IStrykerOptions ValidateAll() { var basePath = BasePathInput.Validate(_fileSystem); var outputPath = OutputPathInput.Validate(_fileSystem); diff --git a/src/Stryker.Options/Options/StrykerOptions.cs b/src/Stryker.Options/Options/StrykerOptions.cs index 913a310728..d2a6fd33a1 100644 --- a/src/Stryker.Options/Options/StrykerOptions.cs +++ b/src/Stryker.Options/Options/StrykerOptions.cs @@ -1,13 +1,13 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Text.RegularExpressions; using Microsoft.CodeAnalysis.CSharp; using Stryker.Abstractions.Baseline; -using Stryker.Abstractions.Options; -using Stryker.Abstractions.Reporting; using Stryker.Abstractions.Mutators; -using Stryker.Abstractions.Options.Inputs; -using Stryker.Utilities; +using Stryker.Abstractions.Options; using Stryker.Abstractions.ProjectComponents; -using Stryker.Abstractions.Reporters; +using Stryker.Utilities; namespace Stryker.Abstractions; @@ -85,7 +85,7 @@ public class StrykerOptions : IStrykerOptions /// /// Used to set colors in the reports and fail stryker if the mutation score is lower than the break value. /// - public Thresholds Thresholds { get; init; } = new Thresholds() { Break = 0, Low = 60, High = 80 }; + public IThresholds Thresholds { get; init; } = new Thresholds() { Break = 0, Low = 60, High = 80 }; /// /// The ammount of milliseconds that should be added to the timeout period when testing mutants. diff --git a/src/Stryker.Options/Stryker.Configuration.csproj b/src/Stryker.Options/Stryker.Configuration.csproj index 2dfac21d34..f41f1fb49e 100644 --- a/src/Stryker.Options/Stryker.Configuration.csproj +++ b/src/Stryker.Options/Stryker.Configuration.csproj @@ -1,8 +1,7 @@ - + net8.0 - enable enable diff --git a/src/Stryker.Options/packages.lock.json b/src/Stryker.Options/packages.lock.json index 8ca4a25ae2..fa88316bf2 100644 --- a/src/Stryker.Options/packages.lock.json +++ b/src/Stryker.Options/packages.lock.json @@ -48,6 +48,11 @@ "resolved": "7.0.2", "contentHash": "awL4TbcBjWAgmeWbi7G6OkUIr0OEPwZASC09Frd6A84LmKSZWOICgZ9vUTCtwlVtepr6FJNTVHxWR6HopfbwLQ==" }, + "FSharp.Core": { + "type": "Transitive", + "resolved": "7.0.0-beta.22427.1", + "contentHash": "gN1fbULC6ji7IEUCIF4V8yta3Np/8av9H0SfanhACbmsNq9e0He9NOj8Dx0M9xsgYlwviCa0qV2P4B6qAjPOBA==" + }, "Microsoft.Build": { "type": "Transitive", "resolved": "17.0.1", @@ -67,19 +72,20 @@ }, "Microsoft.Build.Framework": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "znFg/TGxwtXISkNMWstaCcl7l2zM4p7vYsXWL9HyJw2w9/F1cpq50H76xksXo/dH2ZKTgc3uG4jkLboL4rZfbg==", + "resolved": "17.1.0", + "contentHash": "7PPEbjuL/lKQ8ftblxwBZKf5alZCA4GDvBTiO3UAVxtRe52a2jL3mc8TpKNiJZzytGz7fKdR5ClDCs7+Uw4hMg==", "dependencies": { + "Microsoft.Win32.Registry": "4.3.0", "System.Security.Permissions": "4.7.0" } }, "Microsoft.Build.Tasks.Core": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "+AGJSLh9RCkgq3G9VpiXBD+GeTmw5VAgYfcOPud4zk1FeMSctAUXVDJzenDIYKe2aawjFHMZUjUfji0Qd5SCBQ==", + "resolved": "17.1.0", + "contentHash": "obCL4Tb2wpc684sCTlS4hriNhI+6MBqlVWOQoajo9zYv/aqAN53YdIZ3Lnw5XszoYCCQexy2sT/MNElMgoSN9g==", "dependencies": { - "Microsoft.Build.Framework": "17.0.1", - "Microsoft.Build.Utilities.Core": "17.0.1", + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", "Microsoft.NET.StringTools": "1.0.0", "Microsoft.Win32.Registry": "4.3.0", "System.CodeDom": "4.4.0", @@ -89,15 +95,15 @@ "System.Security.Cryptography.Pkcs": "4.7.0", "System.Security.Cryptography.Xml": "4.7.0", "System.Security.Permissions": "4.7.0", - "System.Threading.Tasks.Dataflow": "4.9.0" + "System.Threading.Tasks.Dataflow": "6.0.0" } }, "Microsoft.Build.Utilities.Core": { "type": "Transitive", - "resolved": "17.0.1", - "contentHash": "Ot9B3GOVthAMs903+dyvpcAwimxPkGs7QVGqZ49KjmgIB51VrcJXt/L9l6BpssIRuwf4wOWZOuGTkgFJtmwgVg==", + "resolved": "17.1.0", + "contentHash": "JqhQ4q6L4IyA0Wh3PrDrxHHYMVHyOLIusyC4imAnhcnZiOC4+CwgVRSdo8fLsQmvz0Jab8FFrU1NPZFbDoxRng==", "dependencies": { - "Microsoft.Build.Framework": "17.0.1", + "Microsoft.Build.Framework": "17.1.0", "Microsoft.NET.StringTools": "1.0.0", "Microsoft.Win32.Registry": "4.3.0", "System.Collections.Immutable": "5.0.0", @@ -117,13 +123,8 @@ }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -161,6 +162,16 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "Microsoft.Win32.Registry": { "type": "Transitive", "resolved": "4.3.0", @@ -201,6 +212,118 @@ "Microsoft.Build": "15.3.409" } }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "M2nN92ePS8BgQ2oi6Jj3PlTUzadYSIWLdZrHY1n1ZcW9o4wAQQ6W+aQ2lfq1ysZQfVCgDwY58alUdowrzezztg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" + }, "System.CodeDom": { "type": "Transitive", "resolved": "4.4.0", @@ -216,6 +339,23 @@ "System.Runtime": "4.3.0" } }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, "System.Collections.Immutable": { "type": "Transitive", "resolved": "8.0.0", @@ -230,6 +370,16 @@ "System.Security.Permissions": "4.7.0" } }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", "resolved": "6.0.0", @@ -238,6 +388,60 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "System.Diagnostics.Process": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "J0wOX07+QASQblsfxmIMFc9Iq7KTXYL3zs2G/Xc704Ylv3NpuVdo6gij6V3PGiptTxqsK0K7CdXenRvKUnkA2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.TraceSource": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VnYp1NxGx8Ww731y2LJ1vpfb/DKVNKEZ8Jsh5SgQTZREL/YpWRArgh9pI8CDLmgHspZmLL697CaLvH85qQpRiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, "System.Drawing.Common": { "type": "Transitive", "resolved": "4.7.0", @@ -257,6 +461,30 @@ "System.Runtime": "4.3.0" } }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, "System.IO": { "type": "Transitive", "resolved": "4.3.0", @@ -269,10 +497,206 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Linq.Queryable": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "In1Bmmvl/j52yPu3xgakQSI0YIckPUr870w4K5+Lak3JCCa8hl+my65lABOuKfYs4ugmZy25ScFerC4nz8+b6g==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Memory": { "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Requests": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OZNUuAs0kDXUzm7U5NZ1ojVta5YFZmgT2yxBqsQ7Eseq5Ahz88LInGRuNLJ/NP2F8W1q7tse1pKDthj3reF5QA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.WebHeaderCollection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.1", + "contentHash": "qYnDntmrrHXUAhA+v2Kve8onMjJ2ZryQvx7kjGhW88c0IgA9B+q2M8b3l76HFBeotufDbAJfOvLEP32PS4XIKA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Security": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.WebHeaderCollection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "XZrXYG3c7QV/GpWeoaRC02rM6LH2JJetfVYskf35wdC/w2fFDFMphec4gmVH2dkll6abtW14u9Rt96pxd9YH2A==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } }, "System.Reflection": { "type": "Transitive", @@ -286,6 +710,50 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Reflection.Metadata": { "type": "Transitive", "resolved": "8.0.0", @@ -304,6 +772,15 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, "System.Resources.Extensions": { "type": "Transitive", "resolved": "4.6.0", @@ -368,6 +845,27 @@ "System.Runtime.Handles": "4.3.0" } }, + "System.Runtime.Loader": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, "System.Security.AccessControl": { "type": "Transitive", "resolved": "4.7.0", @@ -377,11 +875,105 @@ "System.Security.Principal.Windows": "4.7.0" } }, + "System.Security.Claims": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P/+BR/2lnc4PNDHt/TPBAWHVMLMRHsyYZbU1NphW4HIWzCggz8mJbTQQ3MKljFE7LS3WagmVFuBgoLcFzYXlkA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Security.Principal": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Cng": { "type": "Transitive", "resolved": "4.7.0", "contentHash": "4WQjFuypWtxb/bl/YwEE7LYGn4fgpsikFfBU6xwEm4YBYiRAhXAEJ62lILBu2JJSFbClIAntFTGfDZafn8yZTg==" }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Pkcs": { "type": "Transitive", "resolved": "4.7.0", @@ -390,11 +982,57 @@ "System.Security.Cryptography.Cng": "4.7.0" } }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, "System.Security.Cryptography.ProtectedData": { "type": "Transitive", "resolved": "4.7.0", "contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ==" }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, "System.Security.Cryptography.Xml": { "type": "Transitive", "resolved": "4.7.0", @@ -413,6 +1051,14 @@ "System.Windows.Extensions": "4.7.0" } }, + "System.Security.Principal": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I1tkfQlAoMM2URscUtpcRo/hX0jinXx6a/KUtEQoz3owaYwl3qwsO8cbzYVVnjxrzxjHo3nJC+62uolgeGIS9A==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, "System.Security.Principal.Windows": { "type": "Transitive", "resolved": "4.7.0", @@ -447,6 +1093,17 @@ "System.Threading": "4.0.11" } }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, "System.Text.Json": { "type": "Transitive", "resolved": "5.0.2", @@ -454,11 +1111,11 @@ }, "System.Threading": { "type": "Transitive", - "resolved": "4.0.11", - "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", "dependencies": { - "System.Runtime": "4.1.0", - "System.Threading.Tasks": "4.0.11" + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" } }, "System.Threading.Tasks": { @@ -473,8 +1130,40 @@ }, "System.Threading.Tasks.Dataflow": { "type": "Transitive", - "resolved": "4.9.0", - "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" + "resolved": "6.0.0", + "contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA==" + }, + "System.Threading.Tasks.Parallel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbjBNZHf/vQCfcdhzx7knsiygoCKgxL8mZOeocXZn5gWhCdzHIq6bYNKWX0LAJCWYP7bds4yBK8p06YkP0oa0g==", + "dependencies": { + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Thread": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading.ThreadPool": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } }, "System.Windows.Extensions": { "type": "Transitive", @@ -503,7 +1192,12 @@ } }, "stryker.utilities": { - "type": "Project" + "type": "Project", + "dependencies": { + "FSharp.Compiler.Service": "[42.7.100-preview.22427.1, )", + "Microsoft.CodeAnalysis.CSharp": "[4.10.0, )", + "Microsoft.Extensions.Logging.Abstractions": "[8.0.0, )" + } }, "Buildalyzer": { "type": "CentralTransitive", @@ -522,6 +1216,40 @@ "NuGet.Frameworks": "6.9.1" } }, + "FSharp.Compiler.Service": { + "type": "CentralTransitive", + "requested": "[42.7.100-preview.22427.1, )", + "resolved": "42.7.100-preview.22427.1", + "contentHash": "YFUc1NLxo/RI1LbJVxpa/bgsHTGsvLWakJkDeoR5CnBdgw6jDte9TElrWy7SKr2q5YLjuUFWtQ42TgEVn1hScw==", + "dependencies": { + "FSharp.Core": "[7.0.0-beta.22427.1]", + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Tasks.Core": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", + "System.Buffers": "4.5.1", + "System.Collections.Immutable": "5.0.0", + "System.Diagnostics.Process": "4.3.0", + "System.Diagnostics.TraceSource": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Linq.Queryable": "4.3.0", + "System.Memory": "4.5.5", + "System.Net.Requests": "4.3.0", + "System.Net.Security": "4.3.1", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Metadata": "5.0.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Loader": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Threading.Tasks.Parallel": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0" + } + }, "Microsoft.CodeAnalysis.Analyzers": { "type": "CentralTransitive", "requested": "[3.3.4, )", @@ -550,6 +1278,15 @@ "System.Diagnostics.DiagnosticSource": "6.0.0" } }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "Microsoft.TestPlatform.ObjectModel": { "type": "CentralTransitive", "requested": "[17.10.0, )", diff --git a/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs b/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs index 41c22fd795..7b2f63c248 100644 --- a/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs +++ b/src/Stryker.Utilities/Attributes/MutatorDescriptionAttribute.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics.CodeAnalysis; namespace Stryker.Utilities.Attributes diff --git a/src/Stryker.Utilities/EnumExtension.cs b/src/Stryker.Utilities/EnumExtension.cs index 6e006aac71..01fe9ab852 100644 --- a/src/Stryker.Utilities/EnumExtension.cs +++ b/src/Stryker.Utilities/EnumExtension.cs @@ -1,4 +1,7 @@ +using System; +using System.Collections.Generic; using System.Globalization; +using System.Linq; using System.Reflection; using Stryker.Utilities.Attributes; diff --git a/src/Stryker.Utilities/FilePathUtils.cs b/src/Stryker.Utilities/FilePathUtils.cs index 3ec564ddc9..9cb0b41934 100644 --- a/src/Stryker.Utilities/FilePathUtils.cs +++ b/src/Stryker.Utilities/FilePathUtils.cs @@ -1,3 +1,5 @@ +using System.IO; + namespace Stryker.Utilities { public static class FilePathUtils diff --git a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs b/src/Stryker.Utilities/Helpers/ITypeHandler.cs similarity index 73% rename from src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs rename to src/Stryker.Utilities/Helpers/ITypeHandler.cs index 0f3469cf38..905041fc08 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/ITypeHandler.cs +++ b/src/Stryker.Utilities/Helpers/ITypeHandler.cs @@ -1,14 +1,14 @@ -using System; +using System; -namespace Stryker.Abstractions.Helpers +namespace Stryker.Utilities.Helpers { // describe a strategy that is specialized in a given type // and support sub-specialization - internal interface ITypeHandler + public interface ITypeHandler { // supported type Type ManagedType { get; } // return true to confirm it can handle the give instance bool CanHandle(T t); } -} \ No newline at end of file +} diff --git a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs b/src/Stryker.Utilities/Helpers/RangeHelper.cs similarity index 99% rename from src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs rename to src/Stryker.Utilities/Helpers/RangeHelper.cs index 9fa4c82a3d..2d9a0c8507 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/RangeHelper.cs +++ b/src/Stryker.Utilities/Helpers/RangeHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using FSharp.Compiler.Text; -namespace Stryker.Abstractions.Helpers; +namespace Stryker.Utilities.Helpers; public static class RangeHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs b/src/Stryker.Utilities/Helpers/TextSpanHelper.cs similarity index 99% rename from src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs rename to src/Stryker.Utilities/Helpers/TextSpanHelper.cs index c6a9663a98..5f26899457 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TextSpanHelper.cs +++ b/src/Stryker.Utilities/Helpers/TextSpanHelper.cs @@ -3,7 +3,7 @@ using System.Linq; using Microsoft.CodeAnalysis.Text; -namespace Stryker.Abstractions.Helpers +namespace Stryker.Utilities.Helpers { public static class TextSpanHelper { diff --git a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs b/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs similarity index 92% rename from src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs rename to src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs index cf87f05c54..16323cb532 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/TypeBasedStrategy.cs +++ b/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; -namespace Stryker.Abstractions.Helpers +namespace Stryker.Utilities.Helpers { // type based strategy pattern implementation: finds the proper implementation according the type of a given object // keeping a cache for faster resolution - internal class TypeBasedStrategy where THandler : class, ITypeHandler + public class TypeBasedStrategy where THandler : class, ITypeHandler { private readonly IDictionary> _handlerMapping = new Dictionary>(); diff --git a/src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs b/src/Stryker.Utilities/Logging/ApplicationLogging.cs similarity index 100% rename from src/Stryker.Core/Stryker.Core/Logging/ApplicationLogging.cs rename to src/Stryker.Utilities/Logging/ApplicationLogging.cs diff --git a/src/Stryker.Utilities/Stryker.Utilities.csproj b/src/Stryker.Utilities/Stryker.Utilities.csproj index fa71b7ae6a..fc04672363 100644 --- a/src/Stryker.Utilities/Stryker.Utilities.csproj +++ b/src/Stryker.Utilities/Stryker.Utilities.csproj @@ -1,9 +1,14 @@ - + net8.0 - enable enable + + + + + + diff --git a/src/Stryker.Utilities/packages.lock.json b/src/Stryker.Utilities/packages.lock.json index e807381602..4282404429 100644 --- a/src/Stryker.Utilities/packages.lock.json +++ b/src/Stryker.Utilities/packages.lock.json @@ -7,6 +7,1142 @@ "requested": "[1.2.4, )", "resolved": "1.2.4", "contentHash": "Ch9U74tQA2fQH+U0hcYH7WyIFUfAq7jrjgSHVu2FAcYiMBtbrCMyq2nGA/ZZnB2jSaUeOOYiCjxeaDVB7Ssbdw==" + }, + "FSharp.Compiler.Service": { + "type": "Direct", + "requested": "[42.7.100-preview.22427.1, )", + "resolved": "42.7.100-preview.22427.1", + "contentHash": "YFUc1NLxo/RI1LbJVxpa/bgsHTGsvLWakJkDeoR5CnBdgw6jDte9TElrWy7SKr2q5YLjuUFWtQ42TgEVn1hScw==", + "dependencies": { + "FSharp.Core": "[7.0.0-beta.22427.1]", + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Tasks.Core": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", + "System.Buffers": "4.5.1", + "System.Collections.Immutable": "5.0.0", + "System.Diagnostics.Process": "4.3.0", + "System.Diagnostics.TraceSource": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Linq.Queryable": "4.3.0", + "System.Memory": "4.5.5", + "System.Net.Requests": "4.3.0", + "System.Net.Security": "4.3.1", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Metadata": "5.0.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Loader": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Threading.Tasks.Parallel": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Direct", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "iifqKy3KvCgPABHFbFlSxjEoE+OItZGuZ191NM/TWV750m1jMypr7BtrP65ET+OK2KNVupO8S8xCtxbNqw056A==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "Microsoft.CodeAnalysis.Common": "[4.10.0]", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "FSharp.Core": { + "type": "Transitive", + "resolved": "7.0.0-beta.22427.1", + "contentHash": "gN1fbULC6ji7IEUCIF4V8yta3Np/8av9H0SfanhACbmsNq9e0He9NOj8Dx0M9xsgYlwviCa0qV2P4B6qAjPOBA==" + }, + "Microsoft.Build.Framework": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "7PPEbjuL/lKQ8ftblxwBZKf5alZCA4GDvBTiO3UAVxtRe52a2jL3mc8TpKNiJZzytGz7fKdR5ClDCs7+Uw4hMg==", + "dependencies": { + "Microsoft.Win32.Registry": "4.3.0", + "System.Security.Permissions": "4.7.0" + } + }, + "Microsoft.Build.Tasks.Core": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "obCL4Tb2wpc684sCTlS4hriNhI+6MBqlVWOQoajo9zYv/aqAN53YdIZ3Lnw5XszoYCCQexy2sT/MNElMgoSN9g==", + "dependencies": { + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.Build.Utilities.Core": "17.1.0", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.CodeDom": "4.4.0", + "System.Collections.Immutable": "5.0.0", + "System.Reflection.Metadata": "1.6.0", + "System.Resources.Extensions": "4.6.0", + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Cryptography.Xml": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Threading.Tasks.Dataflow": "6.0.0" + } + }, + "Microsoft.Build.Utilities.Core": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "JqhQ4q6L4IyA0Wh3PrDrxHHYMVHyOLIusyC4imAnhcnZiOC4+CwgVRSdo8fLsQmvz0Jab8FFrU1NPZFbDoxRng==", + "dependencies": { + "Microsoft.Build.Framework": "17.1.0", + "Microsoft.NET.StringTools": "1.0.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections.Immutable": "5.0.0", + "System.Configuration.ConfigurationManager": "4.7.0", + "System.Security.Permissions": "4.7.0", + "System.Text.Encoding.CodePages": "4.0.1" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" + }, + "Microsoft.NET.StringTools": { + "type": "Transitive", + "resolved": "1.0.0", + "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", + "dependencies": { + "System.Memory": "4.5.4", + "System.Runtime.CompilerServices.Unsafe": "5.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "3.1.0", + "contentHash": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "Microsoft.Win32.SystemEvents": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0" + } + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "M2nN92ePS8BgQ2oi6Jj3PlTUzadYSIWLdZrHY1n1ZcW9o4wAQQ6W+aQ2lfq1ysZQfVCgDwY58alUdowrzezztg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "4.4.0", + "contentHash": "2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==" + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + }, + "System.Configuration.ConfigurationManager": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "/anOTeSZCNNI2zDilogWrZ8pNqCmYbzGNexUnNhjW8k0sHqEZ2nHJBp147jBV3hGYswu5lINpNg1vxR7bnqvVA==", + "dependencies": { + "System.Security.Cryptography.ProtectedData": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "tD6kosZnTAGdrEa0tZSuFyunMbt/5KYDnHdndJYGqZoNy00XVXyACd5d6KnE1YgYv3ne2CjtAfNXo/fwEhnKUA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Diagnostics.Process": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "J0wOX07+QASQblsfxmIMFc9Iq7KTXYL3zs2G/Xc704Ylv3NpuVdo6gij6V3PGiptTxqsK0K7CdXenRvKUnkA2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "Microsoft.Win32.Registry": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Thread": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.TraceSource": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VnYp1NxGx8Ww731y2LJ1vpfb/DKVNKEZ8Jsh5SgQTZREL/YpWRArgh9pI8CDLmgHspZmLL697CaLvH85qQpRiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Drawing.Common": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "Microsoft.Win32.SystemEvents": "4.7.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Linq.Queryable": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "In1Bmmvl/j52yPu3xgakQSI0YIckPUr870w4K5+Lak3JCCa8hl+my65lABOuKfYs4ugmZy25ScFerC4nz8+b6g==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.5", + "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Requests": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OZNUuAs0kDXUzm7U5NZ1ojVta5YFZmgT2yxBqsQ7Eseq5Ahz88LInGRuNLJ/NP2F8W1q7tse1pKDthj3reF5QA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.WebHeaderCollection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Net.Security": { + "type": "Transitive", + "resolved": "4.3.1", + "contentHash": "qYnDntmrrHXUAhA+v2Kve8onMjJ2ZryQvx7kjGhW88c0IgA9B+q2M8b3l76HFBeotufDbAJfOvLEP32PS4XIKA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Claims": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Security.Principal": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.ThreadPool": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Security": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.WebHeaderCollection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "XZrXYG3c7QV/GpWeoaRC02rM6LH2JJetfVYskf35wdC/w2fFDFMphec4gmVH2dkll6abtW14u9Rt96pxd9YH2A==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.Extensions": { + "type": "Transitive", + "resolved": "4.6.0", + "contentHash": "6aVCk8oTFZNT3Tx1jjiPi6+aipiJ3qMZYttAREKTRJidP50YvNeOn4PXrqzfA5qC23fLReq2JYp+nJwzj62HGw==" + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.Loader": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "3.1.0", + "System.Security.Principal.Windows": "4.7.0" + } + }, + "System.Security.Claims": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P/+BR/2lnc4PNDHt/TPBAWHVMLMRHsyYZbU1NphW4HIWzCggz8mJbTQQ3MKljFE7LS3WagmVFuBgoLcFzYXlkA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Security.Principal": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "4WQjFuypWtxb/bl/YwEE7LYGn4fgpsikFfBU6xwEm4YBYiRAhXAEJ62lILBu2JJSFbClIAntFTGfDZafn8yZTg==" + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Pkcs": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "0Srzh6YlhjuMxaqMyeCCdZs22cucaUAG6SKDd3gNHBJmre0VZ71ekzWu9rvLD4YXPetyNdPvV6Qst+8C++9v3Q==", + "dependencies": { + "System.Security.Cryptography.Cng": "4.7.0" + } + }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Security.Cryptography.ProtectedData": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ==" + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Xml": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "B6pAyxMvXGbZemb+ER877KSr6OKis+qAdxhhKKK36I6sgj2js8mbcEVviZEHYV8XRTWjbKsAq8Z/zoaegA30dA==", + "dependencies": { + "System.Security.Cryptography.Pkcs": "4.7.0", + "System.Security.Permissions": "4.7.0" + } + }, + "System.Security.Permissions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "dkOV6YYVBnYRa15/yv004eCGRBVADXw8qRbbNiCn/XpdJSUXkkUeIvdvFHkvnko4CdKMqG8yRHC4ox83LSlMsQ==", + "dependencies": { + "System.Security.AccessControl": "4.7.0", + "System.Windows.Extensions": "4.7.0" + } + }, + "System.Security.Principal": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I1tkfQlAoMM2URscUtpcRo/hX0jinXx6a/KUtEQoz3owaYwl3qwsO8cbzYVVnjxrzxjHo3nJC+62uolgeGIS9A==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==" + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "h4z6rrA/hxWf4655D18IIZ0eaLRa3tQC/j+e26W+VinIHY0l07iEXaAvO0YSYq3MvCjMYy8Zs5AdC1sxNQOB7Q==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Dataflow": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA==" + }, + "System.Threading.Tasks.Parallel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbjBNZHf/vQCfcdhzx7knsiygoCKgxL8mZOeocXZn5gWhCdzHIq6bYNKWX0LAJCWYP7bds4yBK8p06YkP0oa0g==", + "dependencies": { + "System.Collections.Concurrent": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Thread": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading.ThreadPool": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Windows.Extensions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "CeWTdRNfRaSh0pm2gDTJFwVaXfTq6Xwv/sA887iwPTneW7oMtMlpvDIO+U60+3GWTB7Aom6oQwv5VZVUhQRdPQ==", + "dependencies": { + "System.Drawing.Common": "4.7.0" + } + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "CentralTransitive", + "requested": "[3.3.4, )", + "resolved": "3.3.4", + "contentHash": "AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "CentralTransitive", + "requested": "[4.10.0, )", + "resolved": "4.10.0", + "contentHash": "7O4+dn0fNKykPpEB1i8/5EKzwD3fuu/shdbbnnsBmdiHMaBz6telOubDFwPwLQQ/PvOAWTFIWWTyAOmWvXRD2g==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.3.4", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0" + } } } } From 3dddc743f14d0134f92f102eedfc3eaa27b1cdb8 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 27 Sep 2024 17:51:58 +0200 Subject: [PATCH 04/13] Fix some tests --- .../Reporting/ISourceFile.cs | 1 + .../AzureFileShareBaselineProviderTests.cs | 3 ++- .../Providers/DiskBaselineProviderTests.cs | 3 ++- .../BaselineMutantFilterTests.cs | 12 ++++++------ .../MutationTest/FullRunScenario.cs | 4 ++-- .../MutationTest/MutationTestExecutor.cs | 3 +-- .../Reporters/Json/JsonReportSerialization.cs | 2 ++ .../Reporters/Json/SourceFiles/JsonMutant.cs | 19 +++++++++++++++++++ .../Reporters/Json/SourceFiles/SourceFile.cs | 19 +++++++++++++++++++ 9 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/Stryker.Abstractions/Reporting/ISourceFile.cs b/src/Stryker.Abstractions/Reporting/ISourceFile.cs index 768bdfdad9..feb409a136 100644 --- a/src/Stryker.Abstractions/Reporting/ISourceFile.cs +++ b/src/Stryker.Abstractions/Reporting/ISourceFile.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Text.Json.Serialization; namespace Stryker.Abstractions.Reporting; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs index 36a84de7bb..e58e0c05af 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/AzureFileShareBaselineProviderTests.cs @@ -10,6 +10,7 @@ using Moq; using Shouldly; using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using Stryker.Core.Baseline.Providers; using Stryker.Core.ProjectComponents.TestProjects; using Stryker.Core.Reporters.Json; @@ -142,7 +143,7 @@ public async Task Load_Report_Returns_Report() Mock.Get(fileClient).Setup(f => f.ExistsAsync(default)).Returns(Task.FromResult(Response.FromValue(true, default))); // report file content download - var json = JsonReport.Build(new StrykerOptions(), ReportTestHelper.CreateProjectWith(), It.IsAny()).ToJson(); + var json = JsonReport.Build(new StrykerOptions(), ReportTestHelper.CreateProjectWith(), It.IsAny()).ToJson(); var file = FilesModelFactory.StorageFileDownloadInfo(content: new MemoryStream(Encoding.Default.GetBytes(json))); Mock.Get(fileClient).Setup(f => f.Download(null, default)).Returns(Response.FromValue(file, default)); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs index 78b84f4061..8ad1056f43 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Baseline/Providers/DiskBaselineProviderTests.cs @@ -4,6 +4,7 @@ using Moq; using Shouldly; using Stryker.Abstractions; +using Stryker.Abstractions.ProjectComponents; using Stryker.Core.Baseline.Providers; using Stryker.Core.ProjectComponents.TestProjects; using Stryker.Core.Reporters.Json; @@ -59,7 +60,7 @@ public async Task ShouldLoadReportFromDiskAsync() { ProjectPath = @"C:/Users/JohnDoe/Project/TestFolder" }; - var report = JsonReport.Build(options, ReportTestHelper.CreateProjectWith(), It.IsAny()); + var report = JsonReport.Build(options, ReportTestHelper.CreateProjectWith(), It.IsAny()); fileSystemMock.AddFile("C:/Users/JohnDoe/Project/TestFolder/StrykerOutput/baseline/version/stryker-report.json", report.ToJson()); diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs index dbeb79bbca..c253b081e4 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutantFilters/BaselineMutantFilterTests.cs @@ -281,10 +281,10 @@ public void FilterMutants_WhenMutantMatchesSourceCode_StatusIsSetToJsonMutant() baselineProvider.Setup(mock => mock.Load(It.IsAny())) .Returns(Task.FromResult(baseline as IJsonReport)); - baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); + baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); baselineMutantHelper.Setup(mock => mock.GetMutantMatchingSourceCode( - It.IsAny>(), - It.Is(m => m == jsonMutants.First()), + It.IsAny>(), + It.Is(m => m == jsonMutants.First()), It.Is(source => source == "var foo = \"bar\";"))).Returns(mutants).Verifiable(); // Act @@ -348,10 +348,10 @@ public void FilterMutants_WhenMultipleMatchingMutants_ResultIsSetToNotRun() baselineProvider.Setup(mock => mock.Load(It.IsAny())) .Returns(Task.FromResult(baseline as IJsonReport)); - baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); + baselineMutantHelper.Setup(mock => mock.GetMutantSourceCode(It.IsAny(), It.IsAny())).Returns("var foo = \"bar\";"); baselineMutantHelper.Setup(mock => mock.GetMutantMatchingSourceCode( - It.IsAny>(), - It.Is(m => m == jsonMutants.First()), + It.IsAny>(), + It.Is(m => m == jsonMutants.First()), It.Is(source => source == "var foo = \"bar\";"))).Returns(mutants).Verifiable(); // Act diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs index 1b1f0eb16b..6ea42cf6ae 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/MutationTest/FullRunScenario.cs @@ -186,8 +186,8 @@ public Mock GetTestRunnerMock() return result; }); runnerMock.Setup(x => x.TestMultipleMutants(It.IsAny(), It.IsAny(), - It.IsAny>(), It.IsAny())). - Callback((Action, TestUpdateHandler>)((_, test1, list, + It.IsAny>(), It.IsAny())). + Callback((Action, TestUpdateHandler>)((_, test1, list, update) => { foreach (var m in list) diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs index ffa4626155..6c48d302fc 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/MutationTestExecutor.cs @@ -113,8 +113,7 @@ private TestRunResult RunTestSession(IProjectAndTests projectAndTests, ICollecti return new TestRunResult(true); } - var result = - TestRunner.TestMultipleMutants(projectAndTests, timeoutMs, mutantsToTest.ToList(), updateHandler); + var result = TestRunner.TestMultipleMutants(projectAndTests, timeoutMs, mutantsToTest.ToList(), updateHandler); if (updateHandler != null && !result.SessionTimedOut) { return result; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index 72cffe85e7..bd0bf83a94 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -3,6 +3,7 @@ using System.Text.Json.Serialization; using System.Threading.Tasks; using Stryker.Abstractions.Reporting; +using Stryker.Core.Reporters.Json.SourceFiles; namespace Stryker.Core.Reporters.Json { @@ -11,6 +12,7 @@ internal static class JsonReportSerialization public static readonly JsonSerializerOptions Options = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + Converters = { new SourceFileConverter(), new JsonMutantConverter() }, WriteIndented = false, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs index d239ff6f01..ae67d40bb6 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/JsonMutant.cs @@ -1,7 +1,10 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; +using System.Text.Json; using Stryker.Abstractions; using Stryker.Abstractions.Reporting; +using System; namespace Stryker.Core.Reporters.Json.SourceFiles { @@ -44,4 +47,20 @@ public JsonMutant(IReadOnlyMutant mutant) KilledBy = mutant.KillingTests.GetGuids()?.Select(g => g.ToString()); } } + + public class JsonMutantConverter : JsonConverter + { + public override IJsonMutant Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var sourceFile = JsonSerializer.Deserialize(ref reader, options); + return sourceFile; + } + + public override void Write(Utf8JsonWriter writer, IJsonMutant value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (JsonMutant)value, options); + } + } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs index 760ac4b902..a947797c65 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/SourceFiles/SourceFile.cs @@ -1,8 +1,11 @@ using System.Collections.Generic; +using System.Text.Json.Serialization; +using System.Text.Json; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; using Stryker.Abstractions.ProjectComponents; using Stryker.Abstractions.Reporting; +using System; namespace Stryker.Core.Reporters.Json.SourceFiles { @@ -41,4 +44,20 @@ private sealed class UniqueJsonMutantComparer : EqualityComparer public override int GetHashCode(IJsonMutant jsonMutant) => jsonMutant.Id.GetHashCode(); } } + + public class SourceFileConverter : JsonConverter + { + public override ISourceFile Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var sourceFile = JsonSerializer.Deserialize(ref reader, options); + return sourceFile; + } + + public override void Write(Utf8JsonWriter writer, ISourceFile value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (SourceFile)value, options); + } + } } From 85d58c0de1f1e65d851bac34d887d79fbbf6e227 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 11 Oct 2024 11:38:57 +0200 Subject: [PATCH 05/13] Fix unit tests --- .../Library.FSharp.XUnit/packages.lock.json | 8 +------- .../NetCore/Library.FSharp/packages.lock.json | 9 +-------- .../Reporters/Json/JsonReporterTests.cs | 10 ++++++---- .../Reporters/Json/JsonReportSerialization.cs | 3 ++- .../Stryker.Core/Reporters/Json/Location.cs | 19 +++++++++++++++++++ .../Stryker.Core/Reporters/Json/Position.cs | 18 ++++++++++++++++++ .../Reporters/Json/TestFiles/JsonTest.cs | 18 ++++++++++++++++++ .../Reporters/Json/TestFiles/JsonTestFile.cs | 19 +++++++++++++++++++ 8 files changed, 84 insertions(+), 20 deletions(-) diff --git a/integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/packages.lock.json b/integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/packages.lock.json index 8fd5f8b7cb..4ad799285e 100644 --- a/integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/packages.lock.json +++ b/integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/packages.lock.json @@ -2,12 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "FSharp.Core": { - "type": "Direct", - "requested": "[8.0.301, )", - "resolved": "8.0.301", - "contentHash": "I94+2zfAhWMJwPzVDFSlsutZvjPkaRvLVipf8b2O4AyzxKUBmevDkUBzcJBqSQNB1Ikig8xdphswoeKrObqx7Q==" - }, "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[17.10.0, )", @@ -110,7 +104,7 @@ "library.fsharp": { "type": "Project", "dependencies": { - "FSharp.Core": "[8.0.301, )" + "FSharp.Core": "[8.0.400, )" } } } diff --git a/integrationtest/TargetProjects/NetCore/Library.FSharp/packages.lock.json b/integrationtest/TargetProjects/NetCore/Library.FSharp/packages.lock.json index 1692696b4e..2fca7fd98a 100644 --- a/integrationtest/TargetProjects/NetCore/Library.FSharp/packages.lock.json +++ b/integrationtest/TargetProjects/NetCore/Library.FSharp/packages.lock.json @@ -1,13 +1,6 @@ { "version": 1, "dependencies": { - "net6.0": { - "FSharp.Core": { - "type": "Direct", - "requested": "[8.0.301, )", - "resolved": "8.0.301", - "contentHash": "I94+2zfAhWMJwPzVDFSlsutZvjPkaRvLVipf8b2O4AyzxKUBmevDkUBzcJBqSQNB1Ikig8xdphswoeKrObqx7Q==" - } - } + "net6.0": {} } } \ No newline at end of file diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs index 3ee77c6333..2f2584509f 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Json/JsonReporterTests.cs @@ -5,6 +5,7 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Runtime.InteropServices; +using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -19,6 +20,7 @@ using Stryker.Core.ProjectComponents.TestProjects; using Stryker.Core.Reporters.Json; using Stryker.Core.Reporters.Json.SourceFiles; +using static FSharp.Compiler.AbstractIL.IL.ILType; namespace Stryker.Core.UnitTest.Reporters.Json { @@ -194,9 +196,9 @@ public void JsonReporter_OnAllMutantsTestedShouldWriteJsonToFile() // assert var reportPath = Path.Combine(options.ReportPath, "mutation-report.json"); mockFileSystem.FileExists(reportPath).ShouldBeTrue($"Path {reportPath} should exist but it does not."); - var fileContents = mockFileSystem.File.ReadAllText(reportPath); + var fileContents = mockFileSystem.File.OpenRead(reportPath); - var report = JsonConvert.DeserializeObject(fileContents); + var report = JsonReportSerialization.DeserializeJsonReportAsync(fileContents).Result; report.ShouldNotBeNull(); report.Thresholds.ShouldContainKeyAndValue("high", 80); @@ -249,9 +251,9 @@ public void JsonReporter_ShouldSupportDuplicateTestFiles() // assert var reportPath = Path.Combine(options.ReportPath, "mutation-report.json"); mockFileSystem.FileExists(reportPath).ShouldBeTrue($"Path {reportPath} should exist but it does not."); - var fileContents = mockFileSystem.File.ReadAllText(reportPath); + var fileContents = mockFileSystem.File.OpenRead(reportPath); - var report = JsonConvert.DeserializeObject(fileContents); + var report = JsonReportSerialization.DeserializeJsonReportAsync(fileContents).Result; var testFile = report.TestFiles.ShouldHaveSingleItem(); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index bd0bf83a94..51e6fc5114 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Stryker.Abstractions.Reporting; using Stryker.Core.Reporters.Json.SourceFiles; +using Stryker.Core.Reporters.Json.TestFiles; namespace Stryker.Core.Reporters.Json { @@ -12,7 +13,7 @@ internal static class JsonReportSerialization public static readonly JsonSerializerOptions Options = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - Converters = { new SourceFileConverter(), new JsonMutantConverter() }, + Converters = { new SourceFileConverter(), new JsonMutantConverter(), new LocationConverter(), new PositionConverter(), new JsonTestFileConverter(), new JsonTestConverter() }, WriteIndented = false, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs index 93762bb23b..1748db351b 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Location.cs @@ -1,5 +1,8 @@ +using System.Text.Json.Serialization; +using System.Text.Json; using Microsoft.CodeAnalysis; using Stryker.Abstractions.Reporting; +using System; namespace Stryker.Core.Reporters.Json { @@ -26,4 +29,20 @@ public Location(FileLinePositionSpan location) }; } } + + public class LocationConverter : JsonConverter + { + public override ILocation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var location = JsonSerializer.Deserialize(ref reader, options); + return location; + } + + public override void Write(Utf8JsonWriter writer, ILocation value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (Location)value, options); + } + } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs index 158f42f585..7bb5dcabc3 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/Position.cs @@ -1,4 +1,6 @@ using System; +using System.Text.Json.Serialization; +using System.Text.Json; using Stryker.Abstractions.Reporting; namespace Stryker.Core.Reporters.Json; @@ -19,3 +21,19 @@ public int Column set => _column = value > 0 ? value : throw new ArgumentException("Column number must be higher than 0"); } } + +public class PositionConverter : JsonConverter +{ + public override IPosition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var position = JsonSerializer.Deserialize(ref reader, options); + return position; + } + + public override void Write(Utf8JsonWriter writer, IPosition value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (Position)value, options); + } +} diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs index c964330798..698875cd14 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTest.cs @@ -1,5 +1,7 @@ using System; +using System.Text.Json.Serialization; +using System.Text.Json; using Stryker.Abstractions.Reporting; namespace Stryker.Core.Reporters.Json.TestFiles @@ -37,4 +39,20 @@ public override bool Equals(object obj) public static bool operator !=(JsonTest left, JsonTest right) => !Equals(left, right); } + + public class JsonTestConverter : JsonConverter + { + public override IJsonTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var jsonTest = JsonSerializer.Deserialize(ref reader, options); + return jsonTest; + } + + public override void Write(Utf8JsonWriter writer, IJsonTest value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (JsonTest)value, options); + } + } } diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs index 09584a7f6f..593b65892f 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/TestFiles/JsonTestFile.cs @@ -1,8 +1,11 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; +using System.Text.Json; using Stryker.Abstractions.ProjectComponents; using Stryker.Abstractions.Reporting; using Stryker.Core.ProjectComponents.TestProjects; +using System; namespace Stryker.Core.Reporters.Json.TestFiles { @@ -35,4 +38,20 @@ public void AddTestFile(ITestFile testFile) } } } + + public class JsonTestFileConverter : JsonConverter + { + public override IJsonTestFile Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + // Deserialize the JSON into the concrete type + var jsonTestFile = JsonSerializer.Deserialize(ref reader, options); + return jsonTestFile; + } + + public override void Write(Utf8JsonWriter writer, IJsonTestFile value, JsonSerializerOptions options) + { + // Serialize the concrete type + JsonSerializer.Serialize(writer, (JsonTestFile)value, options); + } + } } From 123c8b782b22881c300a6d0500f0fc0d115c7c61 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 11 Oct 2024 16:25:56 +0200 Subject: [PATCH 06/13] Fix build --- .../TargetProjects/NetCore/Library/packages.lock.json | 2 +- .../NetCore/TargetProject/packages.lock.json | 2 +- src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs | 9 +++++---- src/Stryker.CLI/Stryker.CLI/Program.cs | 2 +- src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs | 1 + .../Reporters/Html/RealTime/SseServerTest.cs | 9 ++++----- src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs | 1 + .../Stryker.Core/Initialisation/InitialBuildProcess.cs | 1 + .../Stryker.Core/Initialisation/NugetRestoreProcess.cs | 1 + .../Stryker.Core/Testing/ProcessExtensions.cs | 2 +- .../Stryker.Core => Stryker.Options}/ExitCodes.cs | 2 +- 11 files changed, 18 insertions(+), 14 deletions(-) rename src/{Stryker.Core/Stryker.Core => Stryker.Options}/ExitCodes.cs (94%) diff --git a/integrationtest/TargetProjects/NetCore/Library/packages.lock.json b/integrationtest/TargetProjects/NetCore/Library/packages.lock.json index 807ab822b6..2712a54fd9 100644 --- a/integrationtest/TargetProjects/NetCore/Library/packages.lock.json +++ b/integrationtest/TargetProjects/NetCore/Library/packages.lock.json @@ -1,6 +1,6 @@ { "version": 1, "dependencies": { - "net8.0": {} + "net7.0": {} } } \ No newline at end of file diff --git a/integrationtest/TargetProjects/NetCore/TargetProject/packages.lock.json b/integrationtest/TargetProjects/NetCore/TargetProject/packages.lock.json index d7e738c321..43849f2140 100644 --- a/integrationtest/TargetProjects/NetCore/TargetProject/packages.lock.json +++ b/integrationtest/TargetProjects/NetCore/TargetProject/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net8.0": { + "net7.0": { "Microsoft.CodeAnalysis.Common": { "type": "Direct", "requested": "[4.11.0, )", diff --git a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs index 0012a0dfad..eeb1b159f9 100644 --- a/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs +++ b/src/Stryker.CLI/Stryker.CLI.UnitTest/StrykerCLITests.cs @@ -3,19 +3,20 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using NuGet.Versioning; using Serilog.Events; using Shouldly; using Spectre.Console.Testing; -using Stryker.CLI.Clients; -using Stryker.CLI.Logging; using Stryker.Abstractions; using Stryker.Abstractions.Mutators; -using Microsoft.VisualStudio.TestTools.UnitTesting; using Stryker.Abstractions.Options; -using Stryker.Core.Initialisation; +using Stryker.CLI.Clients; +using Stryker.CLI.Logging; +using Stryker.Configuration; using Stryker.Core; +using Stryker.Core.Initialisation; namespace Stryker.CLI.UnitTest; diff --git a/src/Stryker.CLI/Stryker.CLI/Program.cs b/src/Stryker.CLI/Stryker.CLI/Program.cs index 89bf2329f2..3e3d42cc3b 100644 --- a/src/Stryker.CLI/Stryker.CLI/Program.cs +++ b/src/Stryker.CLI/Stryker.CLI/Program.cs @@ -1,6 +1,6 @@ using Spectre.Console; using Stryker.Abstractions.Exceptions; -using Stryker.Core; +using Stryker.Configuration; namespace Stryker.CLI { diff --git a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs index bd5f5df380..fe22f8d5a0 100644 --- a/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs +++ b/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs @@ -12,6 +12,7 @@ using Stryker.CLI.Clients; using Stryker.CLI.CommandLineConfig; using Stryker.CLI.Logging; +using Stryker.Configuration; using Stryker.Core; namespace Stryker.CLI; diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs index ad5e57620e..668b5f96f9 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/Reporters/Html/RealTime/SseServerTest.cs @@ -3,11 +3,10 @@ using System.Threading; using System.Threading.Tasks; using LaunchDarkly.EventSource; -using Shouldly; using Microsoft.VisualStudio.TestTools.UnitTesting; -using Stryker.Core.Reporters.Html.RealTime.Events; +using Shouldly; using Stryker.Core.Reporters.Html.RealTime; -using Stryker.Core.UnitTest; +using Stryker.Core.Reporters.Html.RealTime.Events; namespace Stryker.Core.UnitTest.Reporters.Html.RealTime; @@ -54,13 +53,13 @@ private bool WaitForDisConnection(int timeout) watch.Start(); lock (_lock) { - while (_sut.ConnectedClients>0 && watch.ElapsedMilliseconds < timeout) + while (_sut.HasConnectedClients && watch.ElapsedMilliseconds < timeout) { Monitor.Wait(_lock, Math.Max(Math.Min( timeout - (int)watch.ElapsedMilliseconds, 100), 1)); } } - return _sut.ConnectedClients==0; + return !_sut.HasConnectedClients; } [TestMethod] diff --git a/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs index e56db83010..0dc6b9997d 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs @@ -3,6 +3,7 @@ using System.IO.Abstractions; using Microsoft.Extensions.Logging; using Stryker.Abstractions.Logging; +using Stryker.Configuration; using Stryker.Core.Testing; namespace Stryker.Core.Helpers; diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs index bec4c0a519..549d9d732b 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs @@ -2,6 +2,7 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; +using Stryker.Configuration; using Stryker.Core.Helpers; using Stryker.Core.Testing; diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs index 32a3031185..92661ff01d 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/NugetRestoreProcess.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Logging; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; +using Stryker.Configuration; using Stryker.Core.Helpers; using Stryker.Core.Testing; diff --git a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs index 8878f2aa35..577360eabc 100644 --- a/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs +++ b/src/Stryker.Core/Stryker.Core/Testing/ProcessExtensions.cs @@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.InteropServices; -using Stryker.Core; +using Stryker.Configuration; namespace Stryker.Core.Testing { diff --git a/src/Stryker.Core/Stryker.Core/ExitCodes.cs b/src/Stryker.Options/ExitCodes.cs similarity index 94% rename from src/Stryker.Core/Stryker.Core/ExitCodes.cs rename to src/Stryker.Options/ExitCodes.cs index d754ae5174..16271ba3ce 100644 --- a/src/Stryker.Core/Stryker.Core/ExitCodes.cs +++ b/src/Stryker.Options/ExitCodes.cs @@ -1,4 +1,4 @@ -namespace Stryker.Core +namespace Stryker.Configuration { /// /// Known Stryker exit codes. From 1d7e6113036cf4ace0698230d7c706bed9471487 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 11 Oct 2024 16:38:41 +0200 Subject: [PATCH 07/13] Fix build --- .../Stryker.Core/ToolHelpers/vstest.fakeproject.csproj | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj diff --git a/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj b/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj new file mode 100644 index 0000000000..fc1b62bd52 --- /dev/null +++ b/src/Stryker.Core/Stryker.Core/ToolHelpers/vstest.fakeproject.csproj @@ -0,0 +1,10 @@ + + + false + false + + + + + + From a286d33504db06fecd58b24591c067aa68e71f10 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 11 Oct 2024 17:07:27 +0200 Subject: [PATCH 08/13] Fix integration test --- .../Validation/ValidationProject/ValidateStrykerResults.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs index 63b211c6ab..74451fb224 100644 --- a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs +++ b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs @@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis.Text; using Newtonsoft.Json; using Shouldly; -using Stryker.Core.Mutants; +using Stryker.Abstractions.Mutants; using Stryker.Core.Reporters.Json; using Xunit; From 4a727ccba225cc58ae886f5a5e879fff68fd8c41 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Fri, 11 Oct 2024 17:51:57 +0200 Subject: [PATCH 09/13] Fix integration test --- .../ValidateStrykerResults.cs | 20 ++++++++++--------- .../Reporters/Json/JsonReportSerialization.cs | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs index 74451fb224..21badde028 100644 --- a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs +++ b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs @@ -2,11 +2,13 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; using Newtonsoft.Json; using Shouldly; using Stryker.Abstractions.Mutants; +using Stryker.Abstractions.Reporting; using Stryker.Core.Reporters.Json; using Xunit; @@ -108,7 +110,7 @@ public void FSharp_SingleTestProject() [Fact] [Trait("Category", "MultipleTestProjects")] - public void CSharp_NetCore_WithTwoTestProjects() + public async Task CSharp_NetCore_WithTwoTestProjects() { var directory = new DirectoryInfo("../../../../../TargetProjects/NetCore/Targetproject/StrykerOutput"); directory.GetFiles("*.json", SearchOption.AllDirectories).ShouldNotBeEmpty("No reports available to assert"); @@ -117,9 +119,9 @@ public void CSharp_NetCore_WithTwoTestProjects() .OrderByDescending(f => f.LastWriteTime) .First(); - var strykerRunOutput = File.ReadAllText(latestReport.FullName); + using var strykerRunOutput = File.OpenRead(latestReport.FullName); - var report = JsonConvert.DeserializeObject(strykerRunOutput); + var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput); CheckReportMutants(report, total: 589, ignored: 105, survived: 5, killed: 11, timeout: 2, nocoverage: 435); CheckReportTestCounts(report, total: 21); @@ -127,7 +129,7 @@ public void CSharp_NetCore_WithTwoTestProjects() [Fact] [Trait("Category", "Solution")] - public void CSharp_NetCore_SolutionRun() + public async Task CSharp_NetCore_SolutionRun() { var directory = new DirectoryInfo("../../../../../TargetProjects/NetCore/StrykerOutput"); directory.GetFiles("*.json", SearchOption.AllDirectories).ShouldNotBeEmpty("No reports available to assert"); @@ -136,15 +138,15 @@ public void CSharp_NetCore_SolutionRun() .OrderByDescending(f => f.LastWriteTime) .First(); - var strykerRunOutput = File.ReadAllText(latestReport.FullName); + using var strykerRunOutput = File.OpenRead(latestReport.FullName); - var report = JsonConvert.DeserializeObject(strykerRunOutput); + var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput); CheckReportMutants(report, total: 589, ignored: 246, survived: 4, killed: 9, timeout: 2, nocoverage: 297); CheckReportTestCounts(report, total: 23); } - private void CheckMutationKindsValidity(JsonReport report) + private void CheckMutationKindsValidity(IJsonReport report) { foreach (var file in report.Files) { @@ -164,7 +166,7 @@ private void CheckMutationKindsValidity(JsonReport report) } } - private void CheckReportMutants(JsonReport report, int total, int ignored, int survived, int killed, int timeout, int nocoverage) + private void CheckReportMutants(IJsonReport report, int total, int ignored, int survived, int killed, int timeout, int nocoverage) { var actualTotal = report.Files.Select(f => f.Value.Mutants.Count()).Sum(); var actualIgnored = report.Files.Select(f => f.Value.Mutants.Count(m => m.Status == MutantStatus.Ignored.ToString())).Sum(); @@ -185,7 +187,7 @@ private void CheckReportMutants(JsonReport report, int total, int ignored, int s CheckMutationKindsValidity(report); } - private void CheckReportTestCounts(JsonReport report, int total) + private void CheckReportTestCounts(IJsonReport report, int total) { var actualTotal = report.TestFiles.Sum(tf => tf.Value.Tests.Count); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index 51e6fc5114..0ce6844dd1 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -8,7 +8,7 @@ namespace Stryker.Core.Reporters.Json { - internal static class JsonReportSerialization + public static class JsonReportSerialization { public static readonly JsonSerializerOptions Options = new() { From 93e4a582e61351fb2bb97a781825b681cdd50714 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Sat, 12 Oct 2024 20:57:31 +0200 Subject: [PATCH 10/13] Fix integration test --- .../ValidateStrykerResults.cs | 21 +++++++++---------- .../Reporters/Json/JsonReportSerialization.cs | 9 +++++++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs index 21badde028..fa2f062aaa 100644 --- a/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs +++ b/integrationtest/Validation/ValidationProject/ValidateStrykerResults.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -using Newtonsoft.Json; using Shouldly; using Stryker.Abstractions.Mutants; using Stryker.Abstractions.Reporting; @@ -50,7 +49,7 @@ public class ValidateStrykerResults [Fact] [Trait("Category", "SingleTestProject")] - public void CSharp_NetFramework_SingleTestProject() + public async Task CSharp_NetFramework_SingleTestProject() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { @@ -61,9 +60,9 @@ public void CSharp_NetFramework_SingleTestProject() .OrderByDescending(f => f.LastWriteTime) .First(); - var strykerRunOutput = File.ReadAllText(latestReport.FullName); + using var strykerRunOutput = File.OpenRead(latestReport.FullName); - var report = JsonConvert.DeserializeObject(strykerRunOutput); + var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput); CheckReportMutants(report, total: 29, ignored: 7, survived: 3, killed: 7, timeout: 0, nocoverage: 11); } @@ -71,7 +70,7 @@ public void CSharp_NetFramework_SingleTestProject() [Fact] [Trait("Category", "SingleTestProject")] - public void CSharp_NetCore_SingleTestProject() + public async Task CSharp_NetCore_SingleTestProject() { var directory = new DirectoryInfo("../../../../../TargetProjects/NetCore/NetCoreTestProject.XUnit/StrykerOutput"); directory.GetFiles("*.json", SearchOption.AllDirectories).ShouldNotBeEmpty("No reports available to assert"); @@ -79,10 +78,10 @@ public void CSharp_NetCore_SingleTestProject() var latestReport = directory.GetFiles(MutationReportJson, SearchOption.AllDirectories) .OrderByDescending(f => f.LastWriteTime) .First(); - - var strykerRunOutput = File.ReadAllText(latestReport.FullName); - var report = JsonConvert.DeserializeObject(strykerRunOutput); + using var strykerRunOutput = File.OpenRead(latestReport.FullName); + + var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput); CheckReportMutants(report, total: 589, ignored: 246, survived: 4, killed: 9, timeout: 2, nocoverage: 297); CheckReportTestCounts(report, total: 11); @@ -90,7 +89,7 @@ public void CSharp_NetCore_SingleTestProject() [Fact] [Trait("Category", "FSharp")] - public void FSharp_SingleTestProject() + public async Task FSharp_SingleTestProject() { var directory = new DirectoryInfo("../../../../../TargetProjects/NetCore/Library.FSharp.XUnit/StrykerOutput"); directory.GetFiles("*.json", SearchOption.AllDirectories).ShouldNotBeEmpty("No reports available to assert"); @@ -100,9 +99,9 @@ public void FSharp_SingleTestProject() .OrderByDescending(f => f.LastWriteTime) .First(); - var strykerRunOutput = File.ReadAllText(latestReport.FullName); + using var strykerRunOutput = File.OpenRead(latestReport.FullName); - var report = JsonConvert.DeserializeObject(strykerRunOutput); + var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput); CheckReportMutants(report, total: 0, ignored: 0, survived: 0, killed: 0, timeout: 0, nocoverage: 0); CheckReportTestCounts(report, total: 0); diff --git a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs index 0ce6844dd1..6f8d22e022 100644 --- a/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs +++ b/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReportSerialization.cs @@ -13,7 +13,14 @@ public static class JsonReportSerialization public static readonly JsonSerializerOptions Options = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - Converters = { new SourceFileConverter(), new JsonMutantConverter(), new LocationConverter(), new PositionConverter(), new JsonTestFileConverter(), new JsonTestConverter() }, + Converters = { + new SourceFileConverter(), + new JsonMutantConverter(), + new LocationConverter(), + new PositionConverter(), + new JsonTestFileConverter(), + new JsonTestConverter() + }, WriteIndented = false, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; From a700bf4bd038f6fb38a1851223982938325d77c9 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Sat, 12 Oct 2024 21:22:51 +0200 Subject: [PATCH 11/13] Fix sonar issues --- .../TestRunners/VsTestMockingHelper.cs | 4 ++-- src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs | 8 ++++---- .../Stryker.Core/MutantFilters/BaselineMutantFilter.cs | 4 +--- .../Stryker.Core/MutantFilters/SinceMutantFilter.cs | 6 +++--- src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs | 2 +- .../ProjectComponents/TestProjects/TestProjectsInfo.cs | 2 +- src/Stryker.Options/Options/InputDefinition.cs | 2 +- src/Stryker.Options/Options/Inputs/MutateInput.cs | 2 +- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs index 9767e9170f..c171703f1a 100644 --- a/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs +++ b/src/Stryker.Core/Stryker.Core.UnitTest/TestRunners/VsTestMockingHelper.cs @@ -99,7 +99,7 @@ public VsTestMockingHelper() TestCases = new List { firstTest, secondTest }; } - protected SourceProjectInfo BuildSourceProjectInfo(IEnumerable mutants = null) + internal SourceProjectInfo BuildSourceProjectInfo(IEnumerable mutants = null) { var content = new CsharpFolderComposite(); content.Add(new CsharpFileLeaf { Mutants = mutants ?? new[] { Mutant, OtherMutant } }); @@ -117,7 +117,7 @@ protected SourceProjectInfo BuildSourceProjectInfo(IEnumerable mutants = }; } - protected TestProjectsInfo BuildTestProjectsInfo() => + internal TestProjectsInfo BuildTestProjectsInfo() => new(_fileSystem) { TestProjects = new List { new(_fileSystem, TestHelper.SetupProjectAnalyzerResult( diff --git a/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs b/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs index fa22a93451..137672712a 100644 --- a/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs +++ b/src/Stryker.Core/Stryker.Core/Helpers/VsTestHelper.cs @@ -240,18 +240,18 @@ public void Cleanup(int tries = 5) } } } - catch (Exception) + catch (Exception ex) { if (tries > 0) { - _logger.LogDebug( - $"Tried cleaning up used vstest resources but we weren't ready to clean. Trying {tries} more times.", + _logger.LogDebug(ex, + "Tried cleaning up used vstest resources but we weren't ready to clean. Trying {tries} more times.", tries); Cleanup(tries - 1); } else { - _logger.LogDebug( + _logger.LogWarning(ex, "Tried cleaning up used vstest resources but we weren't ready to clean. Out of tries, we're giving up sorry."); } } diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs index cead9da75b..e8a426294d 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/BaselineMutantFilter.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; -using Stryker.Abstractions; using Stryker.Abstractions.Baseline; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; @@ -13,7 +12,6 @@ using Stryker.Abstractions.Reporting; using Stryker.Core.Baseline.Providers; using Stryker.Core.Baseline.Utils; -using Stryker.Core.Mutants; using Stryker.Utilities; namespace Stryker.Core.MutantFilters @@ -100,7 +98,7 @@ private void UpdateMutantsWithBaselineStatus(IEnumerable mutants, IRead } } - private void SetMutantStatusToBaselineMutantStatus(IJsonMutant baselineMutant, + private static void SetMutantStatusToBaselineMutantStatus(IJsonMutant baselineMutant, IEnumerable matchingMutants) { if (matchingMutants.Count() == 1) diff --git a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs index a0bdb98709..4ba369b46f 100644 --- a/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs +++ b/src/Stryker.Core/Stryker.Core/MutantFilters/SinceMutantFilter.cs @@ -82,7 +82,7 @@ public IEnumerable FilterMutants(IEnumerable mutants, IReadOnl return filteredMutants; } - private IEnumerable SetNotRunMutantsToIgnored(IEnumerable mutants) + private static IEnumerable SetNotRunMutantsToIgnored(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus == MutantStatus.Pending || m.ResultStatus == MutantStatus.NoCoverage)) { @@ -93,7 +93,7 @@ private IEnumerable SetNotRunMutantsToIgnored(IEnumerable muta return new List(); } - private IEnumerable SetMutantStatusForFileChanged(IEnumerable mutants) + private static IEnumerable SetMutantStatusForFileChanged(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus != MutantStatus.NoCoverage)) { @@ -104,7 +104,7 @@ private IEnumerable SetMutantStatusForFileChanged(IEnumerable return mutants; } - private IEnumerable SetMutantStatusForNonCSharpFileChanged(IEnumerable mutants) + private static IEnumerable SetMutantStatusForNonCSharpFileChanged(IEnumerable mutants) { foreach (var mutant in mutants.Where(m => m.ResultStatus != MutantStatus.NoCoverage)) { diff --git a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs index 3961ce2939..dba79a8b63 100644 --- a/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs +++ b/src/Stryker.Core/Stryker.Core/Mutants/Mutant.cs @@ -41,7 +41,7 @@ public void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, IT { ResultStatus = MutantStatus.Timeout; } - else if (resultRanTests.IsEveryTest || resultRanTests.IsEveryTest is not true && AssessingTests.IsIncludedIn(resultRanTests)) + else if (resultRanTests.IsEveryTest || !resultRanTests.IsEveryTest && AssessingTests.IsIncludedIn(resultRanTests)) { ResultStatus = MutantStatus.Survived; } diff --git a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs index 01a17a3559..e986deb040 100644 --- a/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs +++ b/src/Stryker.Core/Stryker.Core/ProjectComponents/TestProjects/TestProjectsInfo.cs @@ -10,7 +10,7 @@ namespace Stryker.Core.ProjectComponents.TestProjects; -public class TestProjectsInfo : ITestProjectsInfo +internal class TestProjectsInfo : ITestProjectsInfo { private readonly IFileSystem _fileSystem; private readonly ILogger _logger; diff --git a/src/Stryker.Options/Options/InputDefinition.cs b/src/Stryker.Options/Options/InputDefinition.cs index bb7e18d45d..2ea4fe04e0 100644 --- a/src/Stryker.Options/Options/InputDefinition.cs +++ b/src/Stryker.Options/Options/InputDefinition.cs @@ -44,7 +44,7 @@ public abstract class Input : IInput /// public TInput SuppliedInput { get; set; } = default; - protected IEnumerable EnumToStrings(Type enumType) => Enum.GetNames(enumType).Select(e => e.ToString()); + protected static IEnumerable EnumToStrings(Type enumType) => Enum.GetNames(enumType).Select(e => e.ToString()); private string FormatAllowedInputText() { diff --git a/src/Stryker.Options/Options/Inputs/MutateInput.cs b/src/Stryker.Options/Options/Inputs/MutateInput.cs index 3d2ee05bf1..acdadaf25d 100644 --- a/src/Stryker.Options/Options/Inputs/MutateInput.cs +++ b/src/Stryker.Options/Options/Inputs/MutateInput.cs @@ -27,7 +27,7 @@ public IEnumerable Validate() filesToInclude.Add(FilePattern.Parse(FilePathUtils.NormalizePathSeparators(pattern))); } - if (filesToInclude.All(f => f.IsExclude)) + if (filesToInclude.TrueForAll(f => f.IsExclude)) { // If there are only exclude patterns, we add a pattern that matches every file. filesToInclude.Add(FilePattern.Parse(_defaultInput)); From a04407e1054a499d0addf0d56fb911174a67aa61 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Sat, 12 Oct 2024 21:37:35 +0200 Subject: [PATCH 12/13] Fix sonar issue --- src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs b/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs index 16323cb532..5e6c259c28 100644 --- a/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs +++ b/src/Stryker.Utilities/Helpers/TypeBasedStrategy.cs @@ -6,7 +6,7 @@ namespace Stryker.Utilities.Helpers { // type based strategy pattern implementation: finds the proper implementation according the type of a given object // keeping a cache for faster resolution - public class TypeBasedStrategy where THandler : class, ITypeHandler + public class TypeBasedStrategy where T : class where THandler : class, ITypeHandler { private readonly IDictionary> _handlerMapping = new Dictionary>(); From 928f03305336e818193fec04f7e224529d3969e9 Mon Sep 17 00:00:00 2001 From: Richard Werkman Date: Sat, 12 Oct 2024 22:06:34 +0200 Subject: [PATCH 13/13] Fix casting issue --- src/Stryker.Core/Stryker.Core/StrykerRunner.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs index cc3552b655..a66214a265 100644 --- a/src/Stryker.Core/Stryker.Core/StrykerRunner.cs +++ b/src/Stryker.Core/Stryker.Core/StrykerRunner.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Linq; using Microsoft.Extensions.Logging; -using Stryker.Abstractions; using Stryker.Abstractions.Exceptions; using Stryker.Abstractions.Logging; using Stryker.Abstractions.Mutants; @@ -191,7 +190,7 @@ private IReadOnlyProjectComponent AddRootFolderIfMultiProject(IEnumerable)projectComponents); + rootComponent.AddRange(projectComponents.Cast()); return rootComponent; }