diff --git a/BreakingChanges.md b/BreakingChanges.md index d65217ba..2f696601 100644 --- a/BreakingChanges.md +++ b/BreakingChanges.md @@ -5,6 +5,7 @@ * Obsolete api is removed * CompatArg is marked as obsolete * Nullability is enabled for public api for .NET 8+. Workaround: you can disable nullability `disable` on project if you don't want to use it. more info https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references +* Move some core type into NSubstitute.Internal namespace. Types from internal namespace could be removed\changed without notification in next version. Try to avoid using them directly. 5.0.0 Release ================ diff --git a/CHANGELOG.md b/CHANGELOG.md index afa8dcea..bd563ef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * [NEW] Added .NET 9 to test matrix * [UPDATE] Migrate documentation to docfx platform. https://github.com/dotnet/docfx * [UPDATE][BREAKING] Nullability is enabled for public api for .NET Core TFMs +* [UPDATE][BREAKING] Move some core type into NSubstitute.Internal namespace. Types from internal namespace could be removed\changed without notification in next version. Try to avoid using them directly. ### 5.3.0 (October 2024) diff --git a/NSubstitute.sln b/NSubstitute.sln deleted file mode 100644 index eae31164..00000000 --- a/NSubstitute.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.8.34309.116 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute", "src\NSubstitute\NSubstitute.csproj", "{F59BF5FC-52D8-492E-BDE8-244C183B4C92}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CFB6BF4B-381D-4884-A8E8-D1FA71315BDE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0E2B9095-7548-462F-9BCC-CD6765B3ED60}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A8AF7D01-6CE4-47B2-9E23-689A53991C3D}" - ProjectSection(SolutionItems) = preProject - build\build.fs = build\build.fs - build\ExtractDocs.fs = build\ExtractDocs.fs - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CA2DD4AA-8DCD-42FB-8081-243281AD2956}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - BreakingChanges.md = BreakingChanges.md - CHANGELOG.md = CHANGELOG.md - Directory.Build.props = Directory.Build.props - README.md = README.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute.Acceptance.Specs", "tests\NSubstitute.Acceptance.Specs\NSubstitute.Acceptance.Specs.csproj", "{8C2300AA-F94C-4005-A359-257C5EAD338E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute.Benchmarks", "tests\NSubstitute.Benchmarks\NSubstitute.Benchmarks.csproj", "{D2D162D4-EF1D-4B40-8736-9228C2FEA16C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F59BF5FC-52D8-492E-BDE8-244C183B4C92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F59BF5FC-52D8-492E-BDE8-244C183B4C92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F59BF5FC-52D8-492E-BDE8-244C183B4C92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F59BF5FC-52D8-492E-BDE8-244C183B4C92}.Release|Any CPU.Build.0 = Release|Any CPU - {8C2300AA-F94C-4005-A359-257C5EAD338E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C2300AA-F94C-4005-A359-257C5EAD338E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C2300AA-F94C-4005-A359-257C5EAD338E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C2300AA-F94C-4005-A359-257C5EAD338E}.Release|Any CPU.Build.0 = Release|Any CPU - {D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F59BF5FC-52D8-492E-BDE8-244C183B4C92} = {CFB6BF4B-381D-4884-A8E8-D1FA71315BDE} - {8C2300AA-F94C-4005-A359-257C5EAD338E} = {0E2B9095-7548-462F-9BCC-CD6765B3ED60} - {D2D162D4-EF1D-4B40-8736-9228C2FEA16C} = {0E2B9095-7548-462F-9BCC-CD6765B3ED60} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {230E97F1-5246-4D49-8ED9-065F2B154E93} - EndGlobalSection -EndGlobal diff --git a/NSubstitute.slnx b/NSubstitute.slnx new file mode 100644 index 00000000..f4a719ad --- /dev/null +++ b/NSubstitute.slnx @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index a3210e00..29cfad4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ NSubstitute ======== -[![Build, Test, and Format verification](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml/badge.svg)](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml) +[![Build, Test, and Format verification](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/nsubstitute/NSubstitute/actions/workflows/test.yml) [![Nuget](https://img.shields.io/nuget/v/NSubstitute.svg)](https://www.nuget.org/packages/NSubstitute) Visit the [NSubstitute website](https://nsubstitute.github.io) for more information. diff --git a/build/ExtractDocs.fs b/build/ExtractDocs.fs index bc4ad516..1425b9d0 100644 --- a/build/ExtractDocs.fs +++ b/build/ExtractDocs.fs @@ -36,7 +36,6 @@ using System.Collections.Generic; using System.ComponentModel; using NSubstitute.Extensions; using NSubstitute.Compatibility; -using NSubstitute.ExceptionExtensions; namespace NSubstitute.Samples { public class Tests_%s { diff --git a/docs/docs/2010-05-02-throwing-exceptions.md b/docs/docs/2010-05-02-throwing-exceptions.md index c19f1ca7..0b061e3b 100644 --- a/docs/docs/2010-05-02-throwing-exceptions.md +++ b/docs/docs/2010-05-02-throwing-exceptions.md @@ -10,7 +10,7 @@ ICalculator calculator; ``` --> -The `Throws` and `ThrowsAsync` helpers in the `NSubstitute.ExceptionExtensions` namespace can be used to throw exceptions when a member is called. +The `Throws` and `ThrowsAsync` helpers in the `NSubstitute.Extensions` namespace can be used to throw exceptions when a member is called. ```csharp //For non-voids: diff --git a/src/NSubstitute/Arg.cs b/src/NSubstitute/Arg.cs index 83f36933..449ade04 100644 --- a/src/NSubstitute/Arg.cs +++ b/src/NSubstitute/Arg.cs @@ -1,4 +1,5 @@ using NSubstitute.Core.Arguments; +using NSubstitute.Internal.Core.Arguments; using System.Linq.Expressions; namespace NSubstitute; diff --git a/src/NSubstitute/Core/Arguments/ArgumentMatcher.cs b/src/NSubstitute/Core/Arguments/ArgumentMatcher.cs index 1b62dea7..5d1fa83e 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentMatcher.cs +++ b/src/NSubstitute/Core/Arguments/ArgumentMatcher.cs @@ -1,4 +1,5 @@ using NSubstitute.Exceptions; +using NSubstitute.Internal.Core.Arguments; namespace NSubstitute.Core.Arguments; diff --git a/src/NSubstitute/Core/Arguments/IArgumentSpecificationsFactory.cs b/src/NSubstitute/Core/Arguments/IArgumentSpecificationsFactory.cs index a174ee0f..977a9309 100644 --- a/src/NSubstitute/Core/Arguments/IArgumentSpecificationsFactory.cs +++ b/src/NSubstitute/Core/Arguments/IArgumentSpecificationsFactory.cs @@ -1,3 +1,4 @@ +using NSubstitute.Internal.Core; using System.Reflection; namespace NSubstitute.Core.Arguments; diff --git a/src/NSubstitute/Core/CallInfo.cs b/src/NSubstitute/Core/CallInfo.cs index d21e4d2a..f993ba50 100644 --- a/src/NSubstitute/Core/CallInfo.cs +++ b/src/NSubstitute/Core/CallInfo.cs @@ -1,5 +1,5 @@ -using System.Diagnostics.CodeAnalysis; using NSubstitute.Exceptions; +using System.Diagnostics.CodeAnalysis; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/DependencyInjection/NSubContainer.cs b/src/NSubstitute/Core/DependencyInjection/NSubContainer.cs index db90cccf..35351983 100644 --- a/src/NSubstitute/Core/DependencyInjection/NSubContainer.cs +++ b/src/NSubstitute/Core/DependencyInjection/NSubContainer.cs @@ -137,7 +137,7 @@ private void SetRegistration(Type type, Registration registration) } } - private class Registration(Func factory, NSubLifetime lifetime) + private class Registration(Func factory, NSubLifetime lifetime) { private object? _singletonValue; public NSubLifetime Lifetime { get; } = lifetime; diff --git a/src/NSubstitute/Core/DependencyInjection/NSubstituteDefaultFactory.cs b/src/NSubstitute/Core/DependencyInjection/NSubstituteDefaultFactory.cs index c532475e..b0f77d64 100644 --- a/src/NSubstitute/Core/DependencyInjection/NSubstituteDefaultFactory.cs +++ b/src/NSubstitute/Core/DependencyInjection/NSubstituteDefaultFactory.cs @@ -1,7 +1,9 @@ using NSubstitute.Core.Arguments; -using NSubstitute.Proxies.CastleDynamicProxy; -using NSubstitute.Routing; -using NSubstitute.Routing.AutoValues; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Core.Arguments; +using NSubstitute.Internal.Proxies.CastleDynamicProxy; +using NSubstitute.Internal.Routing; +using NSubstitute.Internal.Routing.AutoValues; namespace NSubstitute.Core.DependencyInjection; diff --git a/src/NSubstitute/Core/ICall.cs b/src/NSubstitute/Core/ICall.cs index fb2fbc22..3baae6e3 100644 --- a/src/NSubstitute/Core/ICall.cs +++ b/src/NSubstitute/Core/ICall.cs @@ -1,5 +1,6 @@ using System.Reflection; using NSubstitute.Core.Arguments; +using NSubstitute.Internal.Core; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/ICallRouter.cs b/src/NSubstitute/Core/ICallRouter.cs index df061f88..714904a0 100644 --- a/src/NSubstitute/Core/ICallRouter.cs +++ b/src/NSubstitute/Core/ICallRouter.cs @@ -1,3 +1,5 @@ +using NSubstitute.Internal.Core; + namespace NSubstitute.Core; public interface ICallRouter diff --git a/src/NSubstitute/Core/ICallSpecification.cs b/src/NSubstitute/Core/ICallSpecification.cs index 64375ce1..154637c6 100644 --- a/src/NSubstitute/Core/ICallSpecification.cs +++ b/src/NSubstitute/Core/ICallSpecification.cs @@ -1,5 +1,5 @@ using System.Reflection; -using NSubstitute.Core.Arguments; +using NSubstitute.Internal.Core.Arguments; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/ICallSpecificationFactory.cs b/src/NSubstitute/Core/ICallSpecificationFactory.cs index 252bebef..3f73f20d 100644 --- a/src/NSubstitute/Core/ICallSpecificationFactory.cs +++ b/src/NSubstitute/Core/ICallSpecificationFactory.cs @@ -1,3 +1,5 @@ +using NSubstitute.Internal.Core; + namespace NSubstitute.Core; public interface ICallSpecificationFactory diff --git a/src/NSubstitute/Core/IConfigureCall.cs b/src/NSubstitute/Core/IConfigureCall.cs index bcd5d3c9..f3dc122a 100644 --- a/src/NSubstitute/Core/IConfigureCall.cs +++ b/src/NSubstitute/Core/IConfigureCall.cs @@ -1,3 +1,5 @@ +using NSubstitute.Internal.Core; + namespace NSubstitute.Core; public interface IConfigureCall diff --git a/src/NSubstitute/Core/IDescribeNonMatches.cs b/src/NSubstitute/Core/IDescribeNonMatches.cs index 94814ce6..9c088e89 100644 --- a/src/NSubstitute/Core/IDescribeNonMatches.cs +++ b/src/NSubstitute/Core/IDescribeNonMatches.cs @@ -2,7 +2,7 @@ namespace NSubstitute.Core; /// /// A type that can describe how an argument does not match a required condition. -/// Use in conjunction with to provide information about +/// Use in conjunction with to provide information about /// non-matches. /// public interface IDescribeNonMatches diff --git a/src/NSubstitute/Core/IDescribeSpecification.cs b/src/NSubstitute/Core/IDescribeSpecification.cs index b6d30765..0d91bae4 100644 --- a/src/NSubstitute/Core/IDescribeSpecification.cs +++ b/src/NSubstitute/Core/IDescribeSpecification.cs @@ -2,7 +2,7 @@ namespace NSubstitute.Core; /// /// A type that can describe the required conditions to meet a specification. -/// Use in conjunction with to provide information about +/// Use in conjunction with to provide information about /// what it requires to match an argument. /// public interface IDescribeSpecification diff --git a/src/NSubstitute/Core/IGetCallSpec.cs b/src/NSubstitute/Core/IGetCallSpec.cs index 7253546c..654f696b 100644 --- a/src/NSubstitute/Core/IGetCallSpec.cs +++ b/src/NSubstitute/Core/IGetCallSpec.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Internal.Core; + +namespace NSubstitute.Core; public interface IGetCallSpec { diff --git a/src/NSubstitute/Core/IPendingSpecification.cs b/src/NSubstitute/Core/IPendingSpecification.cs index c10c5bc0..ca08a76e 100644 --- a/src/NSubstitute/Core/IPendingSpecification.cs +++ b/src/NSubstitute/Core/IPendingSpecification.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Internal.Core; + +namespace NSubstitute.Core; public interface IPendingSpecification { diff --git a/src/NSubstitute/Core/IQueryResults.cs b/src/NSubstitute/Core/IQueryResults.cs index 5ecce207..1c9e6f84 100644 --- a/src/NSubstitute/Core/IQueryResults.cs +++ b/src/NSubstitute/Core/IQueryResults.cs @@ -1,3 +1,5 @@ +using NSubstitute.Internal.Core; + namespace NSubstitute.Core; public interface IQueryResults diff --git a/src/NSubstitute/Core/IReceivedCallsExceptionThrower.cs b/src/NSubstitute/Core/IReceivedCallsExceptionThrower.cs index a712907f..5e5c3d45 100644 --- a/src/NSubstitute/Core/IReceivedCallsExceptionThrower.cs +++ b/src/NSubstitute/Core/IReceivedCallsExceptionThrower.cs @@ -1,4 +1,4 @@ -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/IReturn.cs b/src/NSubstitute/Core/IReturn.cs index 92cfd56b..dbdc36d9 100644 --- a/src/NSubstitute/Core/IReturn.cs +++ b/src/NSubstitute/Core/IReturn.cs @@ -1,6 +1,7 @@ using System.Collections.Concurrent; using System.Reflection; using NSubstitute.Exceptions; +using NSubstitute.Internal.Core; namespace NSubstitute.Core; @@ -38,7 +39,7 @@ public class ReturnValueFromFunc(Func? funcToReturnValue) : IRe private static Func ReturnNull() { if (typeof(T).GetTypeInfo().IsValueType) throw new CannotReturnNullForValueType(typeof(T)); - return x => default(T); + return x => default; } } diff --git a/src/NSubstitute/Core/ISubstituteState.cs b/src/NSubstitute/Core/ISubstituteState.cs index 4910bb5b..1c5d662f 100644 --- a/src/NSubstitute/Core/ISubstituteState.cs +++ b/src/NSubstitute/Core/ISubstituteState.cs @@ -1,4 +1,4 @@ -using NSubstitute.Routing.AutoValues; +using NSubstitute.Internal.Routing.AutoValues; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/ISubstitutionContext.cs b/src/NSubstitute/Core/ISubstitutionContext.cs index fb349c68..63c668ab 100644 --- a/src/NSubstitute/Core/ISubstitutionContext.cs +++ b/src/NSubstitute/Core/ISubstitutionContext.cs @@ -1,4 +1,4 @@ -using NSubstitute.Routing; +using NSubstitute.Internal.Routing; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/IThreadLocalContext.cs b/src/NSubstitute/Core/IThreadLocalContext.cs index 209eac16..f3adf55d 100644 --- a/src/NSubstitute/Core/IThreadLocalContext.cs +++ b/src/NSubstitute/Core/IThreadLocalContext.cs @@ -1,5 +1,6 @@ using NSubstitute.Core.Arguments; -using NSubstitute.Routing; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Routing; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Core/SubstitutionContext.cs b/src/NSubstitute/Core/SubstitutionContext.cs index 09e9bc92..44aaf259 100644 --- a/src/NSubstitute/Core/SubstitutionContext.cs +++ b/src/NSubstitute/Core/SubstitutionContext.cs @@ -1,5 +1,5 @@ using NSubstitute.Core.DependencyInjection; -using NSubstitute.Routing; +using NSubstitute.Internal.Routing; namespace NSubstitute.Core; diff --git a/src/NSubstitute/Exceptions/AmbiguousArgumentsException.cs b/src/NSubstitute/Exceptions/AmbiguousArgumentsException.cs index 51625d85..a126ea72 100644 --- a/src/NSubstitute/Exceptions/AmbiguousArgumentsException.cs +++ b/src/NSubstitute/Exceptions/AmbiguousArgumentsException.cs @@ -1,8 +1,9 @@ using System.Collections; using System.Reflection; using System.Text; -using NSubstitute.Core; using NSubstitute.Core.Arguments; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Core.Arguments; using static System.Environment; namespace NSubstitute.Exceptions; diff --git a/src/NSubstitute/Extensions/ClearExtensions.cs b/src/NSubstitute/Extensions/ClearExtensions.cs index 9842be1d..4ba43c55 100644 --- a/src/NSubstitute/Extensions/ClearExtensions.cs +++ b/src/NSubstitute/Extensions/ClearExtensions.cs @@ -1,7 +1,7 @@ -using NSubstitute.Core; -using NSubstitute.Exceptions; +using NSubstitute.Exceptions; +using NSubstitute.Core; -namespace NSubstitute.ClearExtensions; +namespace NSubstitute.Extensions; public static class ClearExtensions { diff --git a/src/NSubstitute/Extensions/ConfigurationExtensions.cs b/src/NSubstitute/Extensions/ConfigurationExtensions.cs index de225007..5b660391 100644 --- a/src/NSubstitute/Extensions/ConfigurationExtensions.cs +++ b/src/NSubstitute/Extensions/ConfigurationExtensions.cs @@ -1,5 +1,5 @@ -using NSubstitute.Core; -using NSubstitute.Exceptions; +using NSubstitute.Exceptions; +using NSubstitute.Core; namespace NSubstitute.Extensions; diff --git a/src/NSubstitute/Extensions/ExceptionExtensions.cs b/src/NSubstitute/Extensions/ExceptionExtensions.cs index 43636b67..12bede33 100644 --- a/src/NSubstitute/Extensions/ExceptionExtensions.cs +++ b/src/NSubstitute/Extensions/ExceptionExtensions.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; using System.Reflection; -namespace NSubstitute.ExceptionExtensions; +namespace NSubstitute.Extensions; public static class ExceptionExtensions { diff --git a/src/NSubstitute/Extensions/ProtectedExtensions.cs b/src/NSubstitute/Extensions/ProtectedExtensions.cs index af57b29c..88635ffc 100644 --- a/src/NSubstitute/Extensions/ProtectedExtensions.cs +++ b/src/NSubstitute/Extensions/ProtectedExtensions.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Internal.Core; +using NSubstitute.Exceptions; using NSubstitute.Core; using NSubstitute.Core.Arguments; -using NSubstitute.Exceptions; // Disable nullability for client API, so it does not affect clients. #nullable disable annotations diff --git a/src/NSubstitute/Extensions/ReceivedExtensions.cs b/src/NSubstitute/Extensions/ReceivedExtensions.cs index 9825a46a..fd5c2a41 100644 --- a/src/NSubstitute/Extensions/ReceivedExtensions.cs +++ b/src/NSubstitute/Extensions/ReceivedExtensions.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; using NSubstitute.Exceptions; +using NSubstitute.Internal.Core; -namespace NSubstitute.ReceivedExtensions; +namespace NSubstitute.Extensions; public static class ReceivedExtensions { @@ -143,7 +144,7 @@ public RangeQuantity(int minInclusive, int maxInclusive) this.maxInclusive = maxInclusive; } public override string Describe(string singularNoun, string pluralNoun) => - $"between {minInclusive} and {maxInclusive} (inclusive) {((maxInclusive == 1) ? singularNoun : pluralNoun)}"; + $"between {minInclusive} and {maxInclusive} (inclusive) {(maxInclusive == 1 ? singularNoun : pluralNoun)}"; public override bool Matches(IEnumerable items) { diff --git a/src/NSubstitute/Extensions/ReturnsExtensions.cs b/src/NSubstitute/Extensions/ReturnsExtensions.cs index 29457d98..2a37b8ce 100644 --- a/src/NSubstitute/Extensions/ReturnsExtensions.cs +++ b/src/NSubstitute/Extensions/ReturnsExtensions.cs @@ -1,7 +1,7 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.ReturnsExtensions; +namespace NSubstitute.Extensions; public static class ReturnsExtensions { diff --git a/src/NSubstitute/Core/ArgumentSpecificationDequeue.cs b/src/NSubstitute/Internal/Core/ArgumentSpecificationDequeue.cs similarity index 89% rename from src/NSubstitute/Core/ArgumentSpecificationDequeue.cs rename to src/NSubstitute/Internal/Core/ArgumentSpecificationDequeue.cs index 87d719a0..963bad2d 100644 --- a/src/NSubstitute/Core/ArgumentSpecificationDequeue.cs +++ b/src/NSubstitute/Internal/Core/ArgumentSpecificationDequeue.cs @@ -1,6 +1,7 @@ -using NSubstitute.Core.Arguments; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class ArgumentSpecificationDequeue(Func> dequeueAllQueuedArgSpecs) : IArgumentSpecificationDequeue { diff --git a/src/NSubstitute/Core/Arguments/AnyArgumentMatcher.cs b/src/NSubstitute/Internal/Core/Arguments/AnyArgumentMatcher.cs similarity index 78% rename from src/NSubstitute/Core/Arguments/AnyArgumentMatcher.cs rename to src/NSubstitute/Internal/Core/Arguments/AnyArgumentMatcher.cs index 82b083d0..3cef1acd 100644 --- a/src/NSubstitute/Core/Arguments/AnyArgumentMatcher.cs +++ b/src/NSubstitute/Internal/Core/Arguments/AnyArgumentMatcher.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class AnyArgumentMatcher(Type typeArgMustBeCompatibleWith) : IArgumentMatcher { diff --git a/src/NSubstitute/Core/Arguments/ArgumentFormatter.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentFormatter.cs similarity index 90% rename from src/NSubstitute/Core/Arguments/ArgumentFormatter.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentFormatter.cs index 1bfb5ff7..6ae7827a 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentFormatter.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentFormatter.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class ArgumentFormatter : IArgumentFormatter { diff --git a/src/NSubstitute/Core/Arguments/ArgumentMatchInfo.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentMatchInfo.cs similarity index 90% rename from src/NSubstitute/Core/Arguments/ArgumentMatchInfo.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentMatchInfo.cs index 817f5f7a..5db22e84 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentMatchInfo.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentMatchInfo.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public record ArgumentMatchInfo { diff --git a/src/NSubstitute/Core/Arguments/ArgumentSpecification.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecification.cs similarity index 96% rename from src/NSubstitute/Core/Arguments/ArgumentSpecification.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentSpecification.cs index a4fc82ec..fca84e23 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentSpecification.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecification.cs @@ -1,4 +1,7 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class ArgumentSpecification(Type forType, IArgumentMatcher matcher, Action action) : IArgumentSpecification { diff --git a/src/NSubstitute/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs similarity index 92% rename from src/NSubstitute/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs index 866b09c7..29fdd2e0 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationCompatibilityTester.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class ArgumentSpecificationCompatibilityTester(IDefaultChecker defaultChecker) : IArgumentSpecificationCompatibilityTester { diff --git a/src/NSubstitute/Core/Arguments/ArgumentSpecificationFactory.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationFactory.cs similarity index 97% rename from src/NSubstitute/Core/Arguments/ArgumentSpecificationFactory.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationFactory.cs index a415f906..6dd5dc13 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentSpecificationFactory.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationFactory.cs @@ -1,6 +1,8 @@ +using NSubstitute.Core; +using NSubstitute.Core.Arguments; using NSubstitute.Exceptions; -namespace NSubstitute.Core.Arguments; +namespace NSubstitute.Internal.Core.Arguments; public class ArgumentSpecificationFactory : IArgumentSpecificationFactory { diff --git a/src/NSubstitute/Core/Arguments/ArgumentSpecificationsFactory.cs b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationsFactory.cs similarity index 93% rename from src/NSubstitute/Core/Arguments/ArgumentSpecificationsFactory.cs rename to src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationsFactory.cs index 98c2a630..c10682b8 100644 --- a/src/NSubstitute/Core/Arguments/ArgumentSpecificationsFactory.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArgumentSpecificationsFactory.cs @@ -1,7 +1,9 @@ -using NSubstitute.Exceptions; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; +using NSubstitute.Exceptions; using System.Reflection; -namespace NSubstitute.Core.Arguments; +namespace NSubstitute.Internal.Core.Arguments; public class ArgumentSpecificationsFactory( IArgumentSpecificationFactory argumentSpecificationFactory, diff --git a/src/NSubstitute/Core/Arguments/ArrayContentsArgumentMatcher.cs b/src/NSubstitute/Internal/Core/Arguments/ArrayContentsArgumentMatcher.cs similarity index 93% rename from src/NSubstitute/Core/Arguments/ArrayContentsArgumentMatcher.cs rename to src/NSubstitute/Internal/Core/Arguments/ArrayContentsArgumentMatcher.cs index 623351fc..435ad425 100644 --- a/src/NSubstitute/Core/Arguments/ArrayContentsArgumentMatcher.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ArrayContentsArgumentMatcher.cs @@ -1,6 +1,7 @@ -using System.Collections; +using NSubstitute.Core.Arguments; +using System.Collections; -namespace NSubstitute.Core.Arguments; +namespace NSubstitute.Internal.Core.Arguments; public class ArrayContentsArgumentMatcher(IEnumerable argumentSpecifications) : IArgumentMatcher, IArgumentFormatter { diff --git a/src/NSubstitute/Core/Arguments/DefaultChecker.cs b/src/NSubstitute/Internal/Core/Arguments/DefaultChecker.cs similarity index 69% rename from src/NSubstitute/Core/Arguments/DefaultChecker.cs rename to src/NSubstitute/Internal/Core/Arguments/DefaultChecker.cs index 30fd3b92..1f849789 100644 --- a/src/NSubstitute/Core/Arguments/DefaultChecker.cs +++ b/src/NSubstitute/Internal/Core/Arguments/DefaultChecker.cs @@ -1,4 +1,7 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class DefaultChecker(IDefaultForType defaultForType) : IDefaultChecker { diff --git a/src/NSubstitute/Core/Arguments/EqualsArgumentMatcher.cs b/src/NSubstitute/Internal/Core/Arguments/EqualsArgumentMatcher.cs similarity index 76% rename from src/NSubstitute/Core/Arguments/EqualsArgumentMatcher.cs rename to src/NSubstitute/Internal/Core/Arguments/EqualsArgumentMatcher.cs index ef6ed4a5..e5efa703 100644 --- a/src/NSubstitute/Core/Arguments/EqualsArgumentMatcher.cs +++ b/src/NSubstitute/Internal/Core/Arguments/EqualsArgumentMatcher.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class EqualsArgumentMatcher(object? value) : IArgumentMatcher { diff --git a/src/NSubstitute/Core/Arguments/ExpressionArgumentMatcher.cs b/src/NSubstitute/Internal/Core/Arguments/ExpressionArgumentMatcher.cs similarity index 83% rename from src/NSubstitute/Core/Arguments/ExpressionArgumentMatcher.cs rename to src/NSubstitute/Internal/Core/Arguments/ExpressionArgumentMatcher.cs index dd20d8d2..541e4fb4 100644 --- a/src/NSubstitute/Core/Arguments/ExpressionArgumentMatcher.cs +++ b/src/NSubstitute/Internal/Core/Arguments/ExpressionArgumentMatcher.cs @@ -1,6 +1,7 @@ +using NSubstitute.Core.Arguments; using System.Linq.Expressions; -namespace NSubstitute.Core.Arguments; +namespace NSubstitute.Internal.Core.Arguments; public class ExpressionArgumentMatcher(Expression> predicate) : IArgumentMatcher { diff --git a/src/NSubstitute/Core/Arguments/SuppliedArgumentSpecifications.cs b/src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecifications.cs similarity index 94% rename from src/NSubstitute/Core/Arguments/SuppliedArgumentSpecifications.cs rename to src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecifications.cs index 085b472d..f46ffc14 100644 --- a/src/NSubstitute/Core/Arguments/SuppliedArgumentSpecifications.cs +++ b/src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecifications.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class SuppliedArgumentSpecifications : ISuppliedArgumentSpecifications { diff --git a/src/NSubstitute/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs b/src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs similarity index 82% rename from src/NSubstitute/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs rename to src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs index c4b0145b..6003fffa 100644 --- a/src/NSubstitute/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs +++ b/src/NSubstitute/Internal/Core/Arguments/SuppliedArgumentSpecificationsFactory.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Arguments; +using NSubstitute.Core.Arguments; + +namespace NSubstitute.Internal.Core.Arguments; public class SuppliedArgumentSpecificationsFactory(IArgumentSpecificationCompatibilityTester argumentSpecificationCompatTester) : ISuppliedArgumentSpecificationsFactory { diff --git a/src/NSubstitute/Core/Call.cs b/src/NSubstitute/Internal/Core/Call.cs similarity index 98% rename from src/NSubstitute/Core/Call.cs rename to src/NSubstitute/Internal/Core/Call.cs index 9ff95e10..553222c9 100644 --- a/src/NSubstitute/Core/Call.cs +++ b/src/NSubstitute/Internal/Core/Call.cs @@ -1,8 +1,9 @@ -using NSubstitute.Core.Arguments; using NSubstitute.Exceptions; using System.Reflection; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class Call : ICall, /* Performance optimization */ CallCollection.IReceivedCallEntry { diff --git a/src/NSubstitute/Core/CallActions.cs b/src/NSubstitute/Internal/Core/CallActions.cs similarity index 96% rename from src/NSubstitute/Core/CallActions.cs rename to src/NSubstitute/Internal/Core/CallActions.cs index 1888df5a..a2c6ad42 100644 --- a/src/NSubstitute/Core/CallActions.cs +++ b/src/NSubstitute/Internal/Core/CallActions.cs @@ -1,6 +1,7 @@ -using System.Collections.Concurrent; +using NSubstitute.Core; +using System.Collections.Concurrent; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallActions(ICallInfoFactory callInfoFactory) : ICallActions { diff --git a/src/NSubstitute/Core/CallBaseConfiguration.cs b/src/NSubstitute/Internal/Core/CallBaseConfiguration.cs similarity index 94% rename from src/NSubstitute/Core/CallBaseConfiguration.cs rename to src/NSubstitute/Internal/Core/CallBaseConfiguration.cs index b96d3328..7b27969a 100644 --- a/src/NSubstitute/Core/CallBaseConfiguration.cs +++ b/src/NSubstitute/Internal/Core/CallBaseConfiguration.cs @@ -1,6 +1,7 @@ -using System.Collections.Concurrent; +using NSubstitute.Core; +using System.Collections.Concurrent; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallBaseConfiguration : ICallBaseConfiguration { diff --git a/src/NSubstitute/Core/CallCollection.cs b/src/NSubstitute/Internal/Core/CallCollection.cs similarity index 97% rename from src/NSubstitute/Core/CallCollection.cs rename to src/NSubstitute/Internal/Core/CallCollection.cs index 786f296a..e8af0eae 100644 --- a/src/NSubstitute/Core/CallCollection.cs +++ b/src/NSubstitute/Internal/Core/CallCollection.cs @@ -1,8 +1,9 @@ using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallCollection : ICallCollection { diff --git a/src/NSubstitute/Core/CallFactory.cs b/src/NSubstitute/Internal/Core/CallFactory.cs similarity index 91% rename from src/NSubstitute/Core/CallFactory.cs rename to src/NSubstitute/Internal/Core/CallFactory.cs index f7c3bb2c..4c6ebfc1 100644 --- a/src/NSubstitute/Core/CallFactory.cs +++ b/src/NSubstitute/Internal/Core/CallFactory.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallFactory : ICallFactory { diff --git a/src/NSubstitute/Core/CallFormatter.cs b/src/NSubstitute/Internal/Core/CallFormatter.cs similarity index 90% rename from src/NSubstitute/Core/CallFormatter.cs rename to src/NSubstitute/Internal/Core/CallFormatter.cs index 246ab541..1c414697 100644 --- a/src/NSubstitute/Core/CallFormatter.cs +++ b/src/NSubstitute/Internal/Core/CallFormatter.cs @@ -1,6 +1,7 @@ -using System.Reflection; +using NSubstitute.Core; +using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallFormatter : IMethodInfoFormatter { diff --git a/src/NSubstitute/Core/CallInfoFactory.cs b/src/NSubstitute/Internal/Core/CallInfoFactory.cs similarity index 89% rename from src/NSubstitute/Core/CallInfoFactory.cs rename to src/NSubstitute/Internal/Core/CallInfoFactory.cs index 49506498..f828dc2f 100644 --- a/src/NSubstitute/Core/CallInfoFactory.cs +++ b/src/NSubstitute/Internal/Core/CallInfoFactory.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class CallInfoFactory : ICallInfoFactory { diff --git a/src/NSubstitute/Core/CallResults.cs b/src/NSubstitute/Internal/Core/CallResults.cs similarity index 97% rename from src/NSubstitute/Core/CallResults.cs rename to src/NSubstitute/Internal/Core/CallResults.cs index a13ed1dc..29eea832 100644 --- a/src/NSubstitute/Core/CallResults.cs +++ b/src/NSubstitute/Internal/Core/CallResults.cs @@ -1,6 +1,7 @@ +using NSubstitute.Core; using System.Collections.Concurrent; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallResults(ICallInfoFactory callInfoFactory) : ICallResults { diff --git a/src/NSubstitute/Core/CallRouter.cs b/src/NSubstitute/Internal/Core/CallRouter.cs similarity index 97% rename from src/NSubstitute/Core/CallRouter.cs rename to src/NSubstitute/Internal/Core/CallRouter.cs index 0b2480c5..475eb085 100644 --- a/src/NSubstitute/Core/CallRouter.cs +++ b/src/NSubstitute/Internal/Core/CallRouter.cs @@ -1,7 +1,8 @@ +using NSubstitute.Core; using NSubstitute.Exceptions; -using NSubstitute.Routing; +using NSubstitute.Internal.Routing; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallRouter( ISubstituteState substituteState, diff --git a/src/NSubstitute/Core/CallRouterFactory.cs b/src/NSubstitute/Internal/Core/CallRouterFactory.cs similarity index 84% rename from src/NSubstitute/Core/CallRouterFactory.cs rename to src/NSubstitute/Internal/Core/CallRouterFactory.cs index 1c16fa00..fb3bcfb1 100644 --- a/src/NSubstitute/Core/CallRouterFactory.cs +++ b/src/NSubstitute/Internal/Core/CallRouterFactory.cs @@ -1,6 +1,7 @@ -using NSubstitute.Routing; +using NSubstitute.Core; +using NSubstitute.Internal.Routing; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallRouterFactory(IThreadLocalContext threadLocalContext, IRouteFactory routeFactory) : ICallRouterFactory { diff --git a/src/NSubstitute/Core/CallRouterResolver.cs b/src/NSubstitute/Internal/Core/CallRouterResolver.cs similarity index 82% rename from src/NSubstitute/Core/CallRouterResolver.cs rename to src/NSubstitute/Internal/Core/CallRouterResolver.cs index 0a6d61f4..c073450e 100644 --- a/src/NSubstitute/Core/CallRouterResolver.cs +++ b/src/NSubstitute/Internal/Core/CallRouterResolver.cs @@ -1,6 +1,7 @@ -using NSubstitute.Exceptions; +using NSubstitute.Core; +using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallRouterResolver : ICallRouterResolver { diff --git a/src/NSubstitute/Core/CallSpecAndTarget.cs b/src/NSubstitute/Internal/Core/CallSpecAndTarget.cs similarity index 77% rename from src/NSubstitute/Core/CallSpecAndTarget.cs rename to src/NSubstitute/Internal/Core/CallSpecAndTarget.cs index e38381d7..4db5a6a7 100644 --- a/src/NSubstitute/Core/CallSpecAndTarget.cs +++ b/src/NSubstitute/Internal/Core/CallSpecAndTarget.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class CallSpecAndTarget(ICallSpecification callSpecification, object target) { diff --git a/src/NSubstitute/Core/CallSpecification.cs b/src/NSubstitute/Internal/Core/CallSpecification.cs similarity index 98% rename from src/NSubstitute/Core/CallSpecification.cs rename to src/NSubstitute/Internal/Core/CallSpecification.cs index e0d1ff15..6f96c993 100644 --- a/src/NSubstitute/Core/CallSpecification.cs +++ b/src/NSubstitute/Internal/Core/CallSpecification.cs @@ -1,7 +1,9 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Core.Arguments; +using NSubstitute.Internal.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallSpecification(MethodInfo methodInfo, IEnumerable argumentSpecifications) : ICallSpecification { diff --git a/src/NSubstitute/Core/CallSpecificationFactory.cs b/src/NSubstitute/Internal/Core/CallSpecificationFactory.cs similarity index 91% rename from src/NSubstitute/Core/CallSpecificationFactory.cs rename to src/NSubstitute/Internal/Core/CallSpecificationFactory.cs index 7f213859..a6d84c10 100644 --- a/src/NSubstitute/Core/CallSpecificationFactory.cs +++ b/src/NSubstitute/Internal/Core/CallSpecificationFactory.cs @@ -1,6 +1,7 @@ +using NSubstitute.Core; using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class CallSpecificationFactory(IArgumentSpecificationsFactory argumentSpecificationsFactory) : ICallSpecificationFactory { diff --git a/src/NSubstitute/Core/ConfigureCall.cs b/src/NSubstitute/Internal/Core/ConfigureCall.cs similarity index 95% rename from src/NSubstitute/Core/ConfigureCall.cs rename to src/NSubstitute/Internal/Core/ConfigureCall.cs index 0e7152b1..5db4cbc7 100644 --- a/src/NSubstitute/Core/ConfigureCall.cs +++ b/src/NSubstitute/Internal/Core/ConfigureCall.cs @@ -1,6 +1,7 @@ +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class ConfigureCall(ICallResults configuredResults, ICallActions callActions, IGetCallSpec getCallSpec) : IConfigureCall { diff --git a/src/NSubstitute/Core/ConfiguredCall.cs b/src/NSubstitute/Internal/Core/ConfiguredCall.cs similarity index 84% rename from src/NSubstitute/Core/ConfiguredCall.cs rename to src/NSubstitute/Internal/Core/ConfiguredCall.cs index 95c395d7..e1b2e34d 100644 --- a/src/NSubstitute/Core/ConfiguredCall.cs +++ b/src/NSubstitute/Internal/Core/ConfiguredCall.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class ConfiguredCall(Action> addAction) { diff --git a/src/NSubstitute/Core/CustomHandlers.cs b/src/NSubstitute/Internal/Core/CustomHandlers.cs similarity index 84% rename from src/NSubstitute/Core/CustomHandlers.cs rename to src/NSubstitute/Internal/Core/CustomHandlers.cs index 617a05b8..6fea2b37 100644 --- a/src/NSubstitute/Core/CustomHandlers.cs +++ b/src/NSubstitute/Internal/Core/CustomHandlers.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class CustomHandlers(ISubstituteState substituteState) : ICustomHandlers { diff --git a/src/NSubstitute/Core/DefaultForType.cs b/src/NSubstitute/Internal/Core/DefaultForType.cs similarity index 93% rename from src/NSubstitute/Core/DefaultForType.cs rename to src/NSubstitute/Internal/Core/DefaultForType.cs index f1fde93a..1638efb1 100644 --- a/src/NSubstitute/Core/DefaultForType.cs +++ b/src/NSubstitute/Internal/Core/DefaultForType.cs @@ -1,6 +1,7 @@ -using System.Reflection; +using NSubstitute.Core; +using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class DefaultForType : IDefaultForType { diff --git a/src/NSubstitute/Core/EventCallFormatter.cs b/src/NSubstitute/Internal/Core/EventCallFormatter.cs similarity index 92% rename from src/NSubstitute/Core/EventCallFormatter.cs rename to src/NSubstitute/Internal/Core/EventCallFormatter.cs index 572ac431..4c11567e 100644 --- a/src/NSubstitute/Core/EventCallFormatter.cs +++ b/src/NSubstitute/Internal/Core/EventCallFormatter.cs @@ -1,6 +1,7 @@ -using System.Reflection; +using NSubstitute.Core; +using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class EventCallFormatter(Func> eventsToFormat) : IMethodInfoFormatter { diff --git a/src/NSubstitute/Core/EventHandlerRegistry.cs b/src/NSubstitute/Internal/Core/EventHandlerRegistry.cs similarity index 96% rename from src/NSubstitute/Core/EventHandlerRegistry.cs rename to src/NSubstitute/Internal/Core/EventHandlerRegistry.cs index 1309f912..5a8f0daf 100644 --- a/src/NSubstitute/Core/EventHandlerRegistry.cs +++ b/src/NSubstitute/Internal/Core/EventHandlerRegistry.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class EventHandlerRegistry : IEventHandlerRegistry { diff --git a/src/NSubstitute/Core/Events/DelegateEventWrapper.cs b/src/NSubstitute/Internal/Core/Events/DelegateEventWrapper.cs similarity index 97% rename from src/NSubstitute/Core/Events/DelegateEventWrapper.cs rename to src/NSubstitute/Internal/Core/Events/DelegateEventWrapper.cs index f66b73af..36101b2a 100644 --- a/src/NSubstitute/Core/Events/DelegateEventWrapper.cs +++ b/src/NSubstitute/Internal/Core/Events/DelegateEventWrapper.cs @@ -1,6 +1,7 @@ +using NSubstitute.Core; using System.Reflection; -namespace NSubstitute.Core.Events; +namespace NSubstitute.Internal.Core.Events; public class DelegateEventWrapper(params object?[] arguments) : RaiseEventWrapper { diff --git a/src/NSubstitute/Core/Events/EventHandlerWrapper.cs b/src/NSubstitute/Internal/Core/Events/EventHandlerWrapper.cs similarity index 93% rename from src/NSubstitute/Core/Events/EventHandlerWrapper.cs rename to src/NSubstitute/Internal/Core/Events/EventHandlerWrapper.cs index 597ffbf0..82df8367 100644 --- a/src/NSubstitute/Core/Events/EventHandlerWrapper.cs +++ b/src/NSubstitute/Internal/Core/Events/EventHandlerWrapper.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core.Events; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core.Events; public class EventHandlerWrapper(object? sender, EventArgs? eventArgs) : RaiseEventWrapper where TEventArgs : EventArgs { diff --git a/src/NSubstitute/Core/Events/RaiseEventWrapper.cs b/src/NSubstitute/Internal/Core/Events/RaiseEventWrapper.cs similarity index 96% rename from src/NSubstitute/Core/Events/RaiseEventWrapper.cs rename to src/NSubstitute/Internal/Core/Events/RaiseEventWrapper.cs index bd3aa8da..61a42a5a 100644 --- a/src/NSubstitute/Core/Events/RaiseEventWrapper.cs +++ b/src/NSubstitute/Internal/Core/Events/RaiseEventWrapper.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core.Events; +namespace NSubstitute.Internal.Core.Events; public abstract class RaiseEventWrapper { diff --git a/src/NSubstitute/Core/Extensions.cs b/src/NSubstitute/Internal/Core/Extensions.cs similarity index 99% rename from src/NSubstitute/Core/Extensions.cs rename to src/NSubstitute/Internal/Core/Extensions.cs index 592e7673..4318c300 100644 --- a/src/NSubstitute/Core/Extensions.cs +++ b/src/NSubstitute/Internal/Core/Extensions.cs @@ -2,7 +2,7 @@ using System.Text; using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; internal static class Extensions { diff --git a/src/NSubstitute/Core/GetCallSpec.cs b/src/NSubstitute/Internal/Core/GetCallSpec.cs similarity index 94% rename from src/NSubstitute/Core/GetCallSpec.cs rename to src/NSubstitute/Internal/Core/GetCallSpec.cs index 4bb7a0f5..5a9076f2 100644 --- a/src/NSubstitute/Core/GetCallSpec.cs +++ b/src/NSubstitute/Internal/Core/GetCallSpec.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class GetCallSpec( ICallCollection receivedCalls, diff --git a/src/NSubstitute/Core/MatchArgs.cs b/src/NSubstitute/Internal/Core/MatchArgs.cs similarity index 90% rename from src/NSubstitute/Core/MatchArgs.cs rename to src/NSubstitute/Internal/Core/MatchArgs.cs index 661d3425..85867624 100644 --- a/src/NSubstitute/Core/MatchArgs.cs +++ b/src/NSubstitute/Internal/Core/MatchArgs.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; [DebuggerDisplay("{" + nameof(_name) + "}")] public class MatchArgs diff --git a/src/NSubstitute/Core/Maybe.cs b/src/NSubstitute/Internal/Core/Maybe.cs similarity index 97% rename from src/NSubstitute/Core/Maybe.cs rename to src/NSubstitute/Internal/Core/Maybe.cs index b1f6de5d..8feacb14 100644 --- a/src/NSubstitute/Core/Maybe.cs +++ b/src/NSubstitute/Internal/Core/Maybe.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; /// /// Particularly poor implementation of Maybe/Option type. diff --git a/src/NSubstitute/Core/MethodFormatter.cs b/src/NSubstitute/Internal/Core/MethodFormatter.cs similarity index 88% rename from src/NSubstitute/Core/MethodFormatter.cs rename to src/NSubstitute/Internal/Core/MethodFormatter.cs index 4f2a1b02..895e3903 100644 --- a/src/NSubstitute/Core/MethodFormatter.cs +++ b/src/NSubstitute/Internal/Core/MethodFormatter.cs @@ -1,6 +1,7 @@ -using System.Reflection; +using NSubstitute.Core; +using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class MethodFormatter : IMethodInfoFormatter { diff --git a/src/NSubstitute/Core/ParameterInfoWrapper.cs b/src/NSubstitute/Internal/Core/ParameterInfoWrapper.cs similarity index 77% rename from src/NSubstitute/Core/ParameterInfoWrapper.cs rename to src/NSubstitute/Internal/Core/ParameterInfoWrapper.cs index cec9a05b..40566aaa 100644 --- a/src/NSubstitute/Core/ParameterInfoWrapper.cs +++ b/src/NSubstitute/Internal/Core/ParameterInfoWrapper.cs @@ -1,6 +1,7 @@ -using System.Reflection; +using NSubstitute.Core; +using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; internal class ParameterInfoWrapper(ParameterInfo parameterInfo) : IParameterInfo { diff --git a/src/NSubstitute/Core/PendingSpecificationInfo.cs b/src/NSubstitute/Internal/Core/PendingSpecificationInfo.cs similarity index 92% rename from src/NSubstitute/Core/PendingSpecificationInfo.cs rename to src/NSubstitute/Internal/Core/PendingSpecificationInfo.cs index 63eefed0..95ca0fb0 100644 --- a/src/NSubstitute/Core/PendingSpecificationInfo.cs +++ b/src/NSubstitute/Internal/Core/PendingSpecificationInfo.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class PendingSpecificationInfo { diff --git a/src/NSubstitute/Core/PropertyCallFormatter.cs b/src/NSubstitute/Internal/Core/PropertyCallFormatter.cs similarity index 96% rename from src/NSubstitute/Core/PropertyCallFormatter.cs rename to src/NSubstitute/Internal/Core/PropertyCallFormatter.cs index 19df03aa..f8dee241 100644 --- a/src/NSubstitute/Core/PropertyCallFormatter.cs +++ b/src/NSubstitute/Internal/Core/PropertyCallFormatter.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class PropertyCallFormatter : IMethodInfoFormatter { diff --git a/src/NSubstitute/Core/PropertyHelper.cs b/src/NSubstitute/Internal/Core/PropertyHelper.cs similarity index 97% rename from src/NSubstitute/Core/PropertyHelper.cs rename to src/NSubstitute/Internal/Core/PropertyHelper.cs index 2087df54..e2e24e72 100644 --- a/src/NSubstitute/Core/PropertyHelper.cs +++ b/src/NSubstitute/Internal/Core/PropertyHelper.cs @@ -1,9 +1,10 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; -using NSubstitute.Core.Arguments; using NSubstitute.Exceptions; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class PropertyHelper(ICallFactory callFactory, IArgumentSpecificationCompatibilityTester argSpecCompatTester) : IPropertyHelper { diff --git a/src/NSubstitute/Core/Query.cs b/src/NSubstitute/Internal/Core/Query.cs similarity index 94% rename from src/NSubstitute/Core/Query.cs rename to src/NSubstitute/Internal/Core/Query.cs index dbfc60b5..055c7b04 100644 --- a/src/NSubstitute/Core/Query.cs +++ b/src/NSubstitute/Internal/Core/Query.cs @@ -1,4 +1,6 @@ -namespace NSubstitute.Core; +using NSubstitute.Core; + +namespace NSubstitute.Internal.Core; public class Query(ICallSpecificationFactory callSpecificationFactory) : IQuery, IQueryResults { diff --git a/src/NSubstitute/Core/ReceivedCallsExceptionThrower.cs b/src/NSubstitute/Internal/Core/ReceivedCallsExceptionThrower.cs similarity index 97% rename from src/NSubstitute/Core/ReceivedCallsExceptionThrower.cs rename to src/NSubstitute/Internal/Core/ReceivedCallsExceptionThrower.cs index 974bc618..f1ce1142 100644 --- a/src/NSubstitute/Core/ReceivedCallsExceptionThrower.cs +++ b/src/NSubstitute/Internal/Core/ReceivedCallsExceptionThrower.cs @@ -1,8 +1,9 @@ using System.Text; +using NSubstitute.Core; using NSubstitute.Exceptions; -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class ReceivedCallsExceptionThrower : IReceivedCallsExceptionThrower { diff --git a/src/NSubstitute/Core/ReflectionExtensions.cs b/src/NSubstitute/Internal/Core/ReflectionExtensions.cs similarity index 98% rename from src/NSubstitute/Core/ReflectionExtensions.cs rename to src/NSubstitute/Internal/Core/ReflectionExtensions.cs index 4672f34f..a3f80c45 100644 --- a/src/NSubstitute/Core/ReflectionExtensions.cs +++ b/src/NSubstitute/Internal/Core/ReflectionExtensions.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public static class ReflectionExtensions { diff --git a/src/NSubstitute/Core/ResultsForType.cs b/src/NSubstitute/Internal/Core/ResultsForType.cs similarity index 93% rename from src/NSubstitute/Core/ResultsForType.cs rename to src/NSubstitute/Internal/Core/ResultsForType.cs index afbd26c1..6d6c6a77 100644 --- a/src/NSubstitute/Core/ResultsForType.cs +++ b/src/NSubstitute/Internal/Core/ResultsForType.cs @@ -1,7 +1,8 @@ using System.Reflection; -using NSubstitute.Core.Arguments; +using NSubstitute.Core; +using NSubstitute.Internal.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class ResultsForType(ICallInfoFactory callInfoFactory) : IResultsForType { diff --git a/src/NSubstitute/Core/ReturnObservable.cs b/src/NSubstitute/Internal/Core/ReturnObservable.cs similarity index 91% rename from src/NSubstitute/Core/ReturnObservable.cs rename to src/NSubstitute/Internal/Core/ReturnObservable.cs index 7f3cbb1c..fae72537 100644 --- a/src/NSubstitute/Core/ReturnObservable.cs +++ b/src/NSubstitute/Internal/Core/ReturnObservable.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; internal class ReturnObservable(T? value) : IObservable { diff --git a/src/NSubstitute/Core/RobustThreadLocal.cs b/src/NSubstitute/Internal/Core/RobustThreadLocal.cs similarity index 97% rename from src/NSubstitute/Core/RobustThreadLocal.cs rename to src/NSubstitute/Internal/Core/RobustThreadLocal.cs index 1b6f245a..d1b47ba9 100644 --- a/src/NSubstitute/Core/RobustThreadLocal.cs +++ b/src/NSubstitute/Internal/Core/RobustThreadLocal.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; /// /// Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions. diff --git a/src/NSubstitute/Core/RouteFactoryCacheWrapper.cs b/src/NSubstitute/Internal/Core/RouteFactoryCacheWrapper.cs similarity index 94% rename from src/NSubstitute/Core/RouteFactoryCacheWrapper.cs rename to src/NSubstitute/Internal/Core/RouteFactoryCacheWrapper.cs index 3118b033..5c51b366 100644 --- a/src/NSubstitute/Core/RouteFactoryCacheWrapper.cs +++ b/src/NSubstitute/Internal/Core/RouteFactoryCacheWrapper.cs @@ -1,7 +1,8 @@ -using NSubstitute.ReceivedExtensions; -using NSubstitute.Routing; +using NSubstitute.Internal.Routing; +using NSubstitute.Extensions; +using NSubstitute.Core; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class RouteFactoryCacheWrapper(IRouteFactory factory) : IRouteFactory { diff --git a/src/NSubstitute/Core/SequenceChecking/InstanceTracker.cs b/src/NSubstitute/Internal/Core/SequenceChecking/InstanceTracker.cs similarity index 93% rename from src/NSubstitute/Core/SequenceChecking/InstanceTracker.cs rename to src/NSubstitute/Internal/Core/SequenceChecking/InstanceTracker.cs index 913a65eb..8414543e 100644 --- a/src/NSubstitute/Core/SequenceChecking/InstanceTracker.cs +++ b/src/NSubstitute/Internal/Core/SequenceChecking/InstanceTracker.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -namespace NSubstitute.Core.SequenceChecking; +namespace NSubstitute.Internal.Core.SequenceChecking; public class InstanceTracker { diff --git a/src/NSubstitute/Core/SequenceChecking/SequenceFormatter.cs b/src/NSubstitute/Internal/Core/SequenceChecking/SequenceFormatter.cs similarity index 97% rename from src/NSubstitute/Core/SequenceChecking/SequenceFormatter.cs rename to src/NSubstitute/Internal/Core/SequenceChecking/SequenceFormatter.cs index 71ff35ac..7c871962 100644 --- a/src/NSubstitute/Core/SequenceChecking/SequenceFormatter.cs +++ b/src/NSubstitute/Internal/Core/SequenceChecking/SequenceFormatter.cs @@ -1,8 +1,9 @@ using System.Collections; using System.Reflection; -using NSubstitute.Core.Arguments; +using NSubstitute.Core; +using NSubstitute.Internal.Core.Arguments; -namespace NSubstitute.Core.SequenceChecking; +namespace NSubstitute.Internal.Core.SequenceChecking; public class SequenceFormatter { diff --git a/src/NSubstitute/Core/SequenceChecking/SequenceInOrderAssertion.cs b/src/NSubstitute/Internal/Core/SequenceChecking/SequenceInOrderAssertion.cs similarity index 96% rename from src/NSubstitute/Core/SequenceChecking/SequenceInOrderAssertion.cs rename to src/NSubstitute/Internal/Core/SequenceChecking/SequenceInOrderAssertion.cs index d2af50b7..22880dc7 100644 --- a/src/NSubstitute/Core/SequenceChecking/SequenceInOrderAssertion.cs +++ b/src/NSubstitute/Internal/Core/SequenceChecking/SequenceInOrderAssertion.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core.SequenceChecking; +namespace NSubstitute.Internal.Core.SequenceChecking; public class SequenceInOrderAssertion { diff --git a/src/NSubstitute/Core/SequenceNumberGenerator.cs b/src/NSubstitute/Internal/Core/SequenceNumberGenerator.cs similarity index 81% rename from src/NSubstitute/Core/SequenceNumberGenerator.cs rename to src/NSubstitute/Internal/Core/SequenceNumberGenerator.cs index 9c64b147..905e9b95 100644 --- a/src/NSubstitute/Core/SequenceNumberGenerator.cs +++ b/src/NSubstitute/Internal/Core/SequenceNumberGenerator.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class SequenceNumberGenerator { diff --git a/src/NSubstitute/Core/SubstituteFactory.cs b/src/NSubstitute/Internal/Core/SubstituteFactory.cs similarity index 97% rename from src/NSubstitute/Core/SubstituteFactory.cs rename to src/NSubstitute/Internal/Core/SubstituteFactory.cs index e55c2ffd..94c30daf 100644 --- a/src/NSubstitute/Core/SubstituteFactory.cs +++ b/src/NSubstitute/Internal/Core/SubstituteFactory.cs @@ -1,7 +1,8 @@ using System.Reflection; +using NSubstitute.Core; using NSubstitute.Exceptions; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class SubstituteFactory(ISubstituteStateFactory substituteStateFactory, ICallRouterFactory callRouterFactory, IProxyFactory proxyFactory) : ISubstituteFactory { diff --git a/src/NSubstitute/Core/SubstituteState.cs b/src/NSubstitute/Internal/Core/SubstituteState.cs similarity index 93% rename from src/NSubstitute/Core/SubstituteState.cs rename to src/NSubstitute/Internal/Core/SubstituteState.cs index 76f3a238..48c1a250 100644 --- a/src/NSubstitute/Core/SubstituteState.cs +++ b/src/NSubstitute/Internal/Core/SubstituteState.cs @@ -1,6 +1,7 @@ -using NSubstitute.Routing.AutoValues; +using NSubstitute.Core; +using NSubstitute.Internal.Routing.AutoValues; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class SubstituteState : ISubstituteState { diff --git a/src/NSubstitute/Core/SubstituteStateFactory.cs b/src/NSubstitute/Internal/Core/SubstituteStateFactory.cs similarity index 81% rename from src/NSubstitute/Core/SubstituteStateFactory.cs rename to src/NSubstitute/Internal/Core/SubstituteStateFactory.cs index 5789a157..fc6b9d60 100644 --- a/src/NSubstitute/Core/SubstituteStateFactory.cs +++ b/src/NSubstitute/Internal/Core/SubstituteStateFactory.cs @@ -1,6 +1,7 @@ -using NSubstitute.Routing.AutoValues; +using NSubstitute.Core; +using NSubstitute.Internal.Routing.AutoValues; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class SubstituteStateFactory(ICallSpecificationFactory callSpecificationFactory, ICallInfoFactory callInfoFactory, diff --git a/src/NSubstitute/Core/ThreadLocalContext.cs b/src/NSubstitute/Internal/Core/ThreadLocalContext.cs similarity index 97% rename from src/NSubstitute/Core/ThreadLocalContext.cs rename to src/NSubstitute/Internal/Core/ThreadLocalContext.cs index 0faba548..b1798ae1 100644 --- a/src/NSubstitute/Core/ThreadLocalContext.cs +++ b/src/NSubstitute/Internal/Core/ThreadLocalContext.cs @@ -1,8 +1,9 @@ -using NSubstitute.Core.Arguments; -using NSubstitute.Exceptions; -using NSubstitute.Routing; +using NSubstitute.Exceptions; +using NSubstitute.Internal.Routing; +using NSubstitute.Core; +using NSubstitute.Core.Arguments; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class ThreadLocalContext : IThreadLocalContext { diff --git a/src/NSubstitute/Core/WhenCalled.cs b/src/NSubstitute/Internal/Core/WhenCalled.cs similarity index 97% rename from src/NSubstitute/Core/WhenCalled.cs rename to src/NSubstitute/Internal/Core/WhenCalled.cs index 35a637d8..ffe64dfd 100644 --- a/src/NSubstitute/Core/WhenCalled.cs +++ b/src/NSubstitute/Internal/Core/WhenCalled.cs @@ -1,6 +1,7 @@ -using NSubstitute.Routing; +using NSubstitute.Core; +using NSubstitute.Internal.Routing; -namespace NSubstitute.Core; +namespace NSubstitute.Internal.Core; public class WhenCalled(ISubstitutionContext context, T substitute, Action call, MatchArgs matchArgs) { diff --git a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs similarity index 99% rename from src/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs rename to src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs index a445f42f..69107c87 100644 --- a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs +++ b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs @@ -1,9 +1,10 @@ -using System.Reflection; using Castle.DynamicProxy; using NSubstitute.Core; using NSubstitute.Exceptions; +using NSubstitute.Internal.Core; +using System.Reflection; -namespace NSubstitute.Proxies.CastleDynamicProxy; +namespace NSubstitute.Internal.Proxies.CastleDynamicProxy; public class CastleDynamicProxyFactory(ICallFactory callFactory, IArgumentSpecificationDequeue argSpecificationDequeue) : IProxyFactory { diff --git a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs similarity index 94% rename from src/NSubstitute/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs rename to src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs index d2e8949b..791bdb6a 100644 --- a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs +++ b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleForwardingInterceptor.cs @@ -1,7 +1,7 @@ using Castle.DynamicProxy; using NSubstitute.Core; -namespace NSubstitute.Proxies.CastleDynamicProxy; +namespace NSubstitute.Internal.Proxies.CastleDynamicProxy; public class CastleForwardingInterceptor(CastleInvocationMapper invocationMapper, ICallRouter callRouter) : IInterceptor { diff --git a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs similarity index 95% rename from src/NSubstitute/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs rename to src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs index ddc15405..f973c9e3 100644 --- a/src/NSubstitute/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs +++ b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/CastleInvocationMapper.cs @@ -1,7 +1,7 @@ using Castle.DynamicProxy; using NSubstitute.Core; -namespace NSubstitute.Proxies.CastleDynamicProxy; +namespace NSubstitute.Internal.Proxies.CastleDynamicProxy; public class CastleInvocationMapper(ICallFactory callFactory, IArgumentSpecificationDequeue argSpecificationDequeue) { diff --git a/src/NSubstitute/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs similarity index 92% rename from src/NSubstitute/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs rename to src/NSubstitute/Internal/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs index 7902fae4..4a1b2e73 100644 --- a/src/NSubstitute/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs +++ b/src/NSubstitute/Internal/Proxies/CastleDynamicProxy/ProxyIdInterceptor.cs @@ -1,9 +1,9 @@ using System.Globalization; using System.Reflection; using Castle.DynamicProxy; -using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Proxies.CastleDynamicProxy; +namespace NSubstitute.Internal.Proxies.CastleDynamicProxy; public class ProxyIdInterceptor(Type primaryProxyType) : IInterceptor { diff --git a/src/NSubstitute/Routing/AutoValues/AutoArrayProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoArrayProvider.cs similarity index 87% rename from src/NSubstitute/Routing/AutoValues/AutoArrayProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoArrayProvider.cs index fd3f4cb0..4068a71a 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoArrayProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoArrayProvider.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoArrayProvider : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoObservableProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoObservableProvider.cs similarity index 91% rename from src/NSubstitute/Routing/AutoValues/AutoObservableProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoObservableProvider.cs index 713a5bde..3cbd2843 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoObservableProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoObservableProvider.cs @@ -1,7 +1,7 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using System.Reflection; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoObservableProvider(Lazy> autoValueProviders) : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoQueryableProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoQueryableProvider.cs similarity index 90% rename from src/NSubstitute/Routing/AutoValues/AutoQueryableProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoQueryableProvider.cs index 2496b8a3..1b5614e0 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoQueryableProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoQueryableProvider.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoQueryableProvider : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoStringProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoStringProvider.cs similarity index 80% rename from src/NSubstitute/Routing/AutoValues/AutoStringProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoStringProvider.cs index d886d9fd..22315660 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoStringProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoStringProvider.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoStringProvider : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoSubstituteProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoSubstituteProvider.cs similarity index 95% rename from src/NSubstitute/Routing/AutoValues/AutoSubstituteProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoSubstituteProvider.cs index e9dd7599..70fe5577 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoSubstituteProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoSubstituteProvider.cs @@ -1,7 +1,8 @@ using System.Reflection; using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoSubstituteProvider(ISubstituteFactory substituteFactory) : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoTaskProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoTaskProvider.cs similarity index 96% rename from src/NSubstitute/Routing/AutoValues/AutoTaskProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoTaskProvider.cs index 13d365f3..c8fd39f7 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoTaskProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoTaskProvider.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoTaskProvider(Lazy> autoValueProviders) : IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/AutoValueProvidersFactory.cs b/src/NSubstitute/Internal/Routing/AutoValues/AutoValueProvidersFactory.cs similarity index 88% rename from src/NSubstitute/Routing/AutoValues/AutoValueProvidersFactory.cs rename to src/NSubstitute/Internal/Routing/AutoValues/AutoValueProvidersFactory.cs index 5dc7fe7c..38530447 100644 --- a/src/NSubstitute/Routing/AutoValues/AutoValueProvidersFactory.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/AutoValueProvidersFactory.cs @@ -1,7 +1,7 @@ -using NSubstitute.Core; -using NSubstitute.Exceptions; +using NSubstitute.Exceptions; +using NSubstitute.Core; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public class AutoValueProvidersFactory : IAutoValueProvidersFactory { diff --git a/src/NSubstitute/Routing/AutoValues/IAutoValueProvider.cs b/src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvider.cs similarity index 68% rename from src/NSubstitute/Routing/AutoValues/IAutoValueProvider.cs rename to src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvider.cs index 47f10eb7..9bc83565 100644 --- a/src/NSubstitute/Routing/AutoValues/IAutoValueProvider.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvider.cs @@ -1,4 +1,4 @@ -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public interface IAutoValueProvider { diff --git a/src/NSubstitute/Routing/AutoValues/IAutoValueProvidersFactory.cs b/src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvidersFactory.cs similarity index 77% rename from src/NSubstitute/Routing/AutoValues/IAutoValueProvidersFactory.cs rename to src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvidersFactory.cs index 0c5da4a9..25c67a06 100644 --- a/src/NSubstitute/Routing/AutoValues/IAutoValueProvidersFactory.cs +++ b/src/NSubstitute/Internal/Routing/AutoValues/IAutoValueProvidersFactory.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.AutoValues; +namespace NSubstitute.Internal.Routing.AutoValues; public interface IAutoValueProvidersFactory { diff --git a/src/NSubstitute/Routing/Handlers/AddCallToQueryResultHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/AddCallToQueryResultHandler.cs similarity index 84% rename from src/NSubstitute/Routing/Handlers/AddCallToQueryResultHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/AddCallToQueryResultHandler.cs index e3000a03..e7e8d946 100644 --- a/src/NSubstitute/Routing/Handlers/AddCallToQueryResultHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/AddCallToQueryResultHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class AddCallToQueryResultHandler(IThreadLocalContext threadContext) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/CallBaseForCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/CallBaseForCallHandler.cs similarity index 86% rename from src/NSubstitute/Routing/Handlers/CallBaseForCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/CallBaseForCallHandler.cs index 0748e980..5794d5e5 100644 --- a/src/NSubstitute/Routing/Handlers/CallBaseForCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/CallBaseForCallHandler.cs @@ -1,7 +1,8 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class CallBaseForCallHandler(ICallSpecificationFactory callSpecificationFactory, ICallBaseConfiguration callBaseConfig, MatchArgs matchArgs) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/CheckReceivedCallsHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/CheckReceivedCallsHandler.cs similarity index 89% rename from src/NSubstitute/Routing/Handlers/CheckReceivedCallsHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/CheckReceivedCallsHandler.cs index e16fd389..430b8551 100644 --- a/src/NSubstitute/Routing/Handlers/CheckReceivedCallsHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/CheckReceivedCallsHandler.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class CheckReceivedCallsHandler(ICallCollection receivedCalls, ICallSpecificationFactory callSpecificationFactory, IReceivedCallsExceptionThrower exceptionThrower, MatchArgs matchArgs, Quantity requiredQuantity) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ClearLastCallRouterHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/ClearLastCallRouterHandler.cs similarity index 90% rename from src/NSubstitute/Routing/Handlers/ClearLastCallRouterHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/ClearLastCallRouterHandler.cs index 2e112d0e..3f2ddd6f 100644 --- a/src/NSubstitute/Routing/Handlers/ClearLastCallRouterHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ClearLastCallRouterHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; /// /// Clears last call router on SubstitutionContext for routes that do not require it. diff --git a/src/NSubstitute/Routing/Handlers/ClearUnusedCallSpecHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/ClearUnusedCallSpecHandler.cs similarity index 84% rename from src/NSubstitute/Routing/Handlers/ClearUnusedCallSpecHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/ClearUnusedCallSpecHandler.cs index 8818617f..a612bbf5 100644 --- a/src/NSubstitute/Routing/Handlers/ClearUnusedCallSpecHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ClearUnusedCallSpecHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ClearUnusedCallSpecHandler(IPendingSpecification pendingSpecification) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/DoActionsCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/DoActionsCallHandler.cs similarity index 83% rename from src/NSubstitute/Routing/Handlers/DoActionsCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/DoActionsCallHandler.cs index 859e4551..dd3221ac 100644 --- a/src/NSubstitute/Routing/Handlers/DoActionsCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/DoActionsCallHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class DoActionsCallHandler(ICallActions callActions) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/DoNotCallBaseForCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/DoNotCallBaseForCallHandler.cs similarity index 86% rename from src/NSubstitute/Routing/Handlers/DoNotCallBaseForCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/DoNotCallBaseForCallHandler.cs index 6e1e223b..272368f2 100644 --- a/src/NSubstitute/Routing/Handlers/DoNotCallBaseForCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/DoNotCallBaseForCallHandler.cs @@ -1,7 +1,8 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class DoNotCallBaseForCallHandler(ICallSpecificationFactory callSpecificationFactory, ICallBaseConfiguration callBaseConfig, MatchArgs matchArgs) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/EventSubscriptionHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/EventSubscriptionHandler.cs similarity index 98% rename from src/NSubstitute/Routing/Handlers/EventSubscriptionHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/EventSubscriptionHandler.cs index cc394b00..92ca0047 100644 --- a/src/NSubstitute/Routing/Handlers/EventSubscriptionHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/EventSubscriptionHandler.cs @@ -1,7 +1,7 @@ using System.Reflection; using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class EventSubscriptionHandler(IEventHandlerRegistry eventHandlerRegistry) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/PropertySetterHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/PropertySetterHandler.cs similarity index 91% rename from src/NSubstitute/Routing/Handlers/PropertySetterHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/PropertySetterHandler.cs index 9245fc62..7bc3c4af 100644 --- a/src/NSubstitute/Routing/Handlers/PropertySetterHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/PropertySetterHandler.cs @@ -1,6 +1,7 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class PropertySetterHandler(IPropertyHelper propertyHelper, IConfigureCall configureCall) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/RaiseEventHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/RaiseEventHandler.cs similarity index 96% rename from src/NSubstitute/Routing/Handlers/RaiseEventHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/RaiseEventHandler.cs index 464f3a9b..e30bae24 100644 --- a/src/NSubstitute/Routing/Handlers/RaiseEventHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/RaiseEventHandler.cs @@ -1,8 +1,8 @@ using System.Reflection; -using NSubstitute.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class RaiseEventHandler(IEventHandlerRegistry eventHandlerRegistry, Func getEventArguments) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/RecordCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/RecordCallHandler.cs similarity index 79% rename from src/NSubstitute/Routing/Handlers/RecordCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/RecordCallHandler.cs index 764815a1..99b10472 100644 --- a/src/NSubstitute/Routing/Handlers/RecordCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/RecordCallHandler.cs @@ -1,6 +1,7 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class RecordCallHandler(ICallCollection callCollection, SequenceNumberGenerator generator) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/RecordCallSpecificationHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/RecordCallSpecificationHandler.cs similarity index 89% rename from src/NSubstitute/Routing/Handlers/RecordCallSpecificationHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/RecordCallSpecificationHandler.cs index 6e9f574d..4982aeb0 100644 --- a/src/NSubstitute/Routing/Handlers/RecordCallSpecificationHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/RecordCallSpecificationHandler.cs @@ -1,6 +1,7 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class RecordCallSpecificationHandler(IPendingSpecification pendingCallSpecification, ICallSpecificationFactory callSpecificationFactory, ICallActions callActions) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnAutoValue.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnAutoValue.cs similarity index 92% rename from src/NSubstitute/Routing/Handlers/ReturnAutoValue.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnAutoValue.cs index 6116cb3c..ee09d6e5 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnAutoValue.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnAutoValue.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; -using NSubstitute.Routing.AutoValues; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Routing.AutoValues; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public enum AutoValueBehaviour { diff --git a/src/NSubstitute/Routing/Handlers/ReturnConfiguredResultHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnConfiguredResultHandler.cs similarity index 87% rename from src/NSubstitute/Routing/Handlers/ReturnConfiguredResultHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnConfiguredResultHandler.cs index e50c7785..d629ac4d 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnConfiguredResultHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnConfiguredResultHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnConfiguredResultHandler(ICallResults callResults) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs similarity index 86% rename from src/NSubstitute/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs index 32c08c4a..28e0a063 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnDefaultForReturnTypeHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnDefaultForReturnTypeHandler(IDefaultForType defaultForType) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs similarity index 95% rename from src/NSubstitute/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs index 235eab2f..37284b29 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromAndConfigureDynamicCall.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; using System.Runtime.CompilerServices; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnFromAndConfigureDynamicCall(IConfigureCall configureCall) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnFromBaseIfRequired.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromBaseIfRequired.cs similarity index 88% rename from src/NSubstitute/Routing/Handlers/ReturnFromBaseIfRequired.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnFromBaseIfRequired.cs index 9daf119b..37916dcf 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnFromBaseIfRequired.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromBaseIfRequired.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnFromBaseIfRequired(ICallBaseConfiguration config) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnFromCustomHandlers.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromCustomHandlers.cs similarity index 92% rename from src/NSubstitute/Routing/Handlers/ReturnFromCustomHandlers.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnFromCustomHandlers.cs index 16202ade..7c760b7e 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnFromCustomHandlers.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnFromCustomHandlers.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnFromCustomHandlers(ICustomHandlers customHandlers) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/ReturnResultForTypeHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/ReturnResultForTypeHandler.cs similarity index 87% rename from src/NSubstitute/Routing/Handlers/ReturnResultForTypeHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/ReturnResultForTypeHandler.cs index e627af0a..999d3ce4 100644 --- a/src/NSubstitute/Routing/Handlers/ReturnResultForTypeHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/ReturnResultForTypeHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class ReturnResultForTypeHandler(IResultsForType resultsForType) : ICallHandler { diff --git a/src/NSubstitute/Routing/Handlers/SetActionForCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/SetActionForCallHandler.cs similarity index 84% rename from src/NSubstitute/Routing/Handlers/SetActionForCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/SetActionForCallHandler.cs index aa0db72d..b9cfb063 100644 --- a/src/NSubstitute/Routing/Handlers/SetActionForCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/SetActionForCallHandler.cs @@ -1,6 +1,7 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class SetActionForCallHandler( ICallSpecificationFactory callSpecificationFactory, diff --git a/src/NSubstitute/Routing/Handlers/TrackLastCallHandler.cs b/src/NSubstitute/Internal/Routing/Handlers/TrackLastCallHandler.cs similarity index 84% rename from src/NSubstitute/Routing/Handlers/TrackLastCallHandler.cs rename to src/NSubstitute/Internal/Routing/Handlers/TrackLastCallHandler.cs index 225db13f..2b1c4f70 100644 --- a/src/NSubstitute/Routing/Handlers/TrackLastCallHandler.cs +++ b/src/NSubstitute/Internal/Routing/Handlers/TrackLastCallHandler.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing.Handlers; +namespace NSubstitute.Internal.Routing.Handlers; public class TrackLastCallHandler(IPendingSpecification pendingSpecification) : ICallHandler { diff --git a/src/NSubstitute/Routing/IRoute.cs b/src/NSubstitute/Internal/Routing/IRoute.cs similarity index 68% rename from src/NSubstitute/Routing/IRoute.cs rename to src/NSubstitute/Internal/Routing/IRoute.cs index f67fc20b..4ed31fba 100644 --- a/src/NSubstitute/Routing/IRoute.cs +++ b/src/NSubstitute/Internal/Routing/IRoute.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing; +namespace NSubstitute.Internal.Routing; public interface IRoute { diff --git a/src/NSubstitute/Routing/IRouteFactory.cs b/src/NSubstitute/Internal/Routing/IRouteFactory.cs similarity index 86% rename from src/NSubstitute/Routing/IRouteFactory.cs rename to src/NSubstitute/Internal/Routing/IRouteFactory.cs index 5f60a84e..f2737ab1 100644 --- a/src/NSubstitute/Routing/IRouteFactory.cs +++ b/src/NSubstitute/Internal/Routing/IRouteFactory.cs @@ -1,7 +1,8 @@ using NSubstitute.Core; -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; +using NSubstitute.Internal.Core; -namespace NSubstitute.Routing; +namespace NSubstitute.Internal.Routing; public interface IRouteFactory { diff --git a/src/NSubstitute/Routing/Route.cs b/src/NSubstitute/Internal/Routing/Route.cs similarity index 93% rename from src/NSubstitute/Routing/Route.cs rename to src/NSubstitute/Internal/Routing/Route.cs index ba84cc0a..6d70a32a 100644 --- a/src/NSubstitute/Routing/Route.cs +++ b/src/NSubstitute/Internal/Routing/Route.cs @@ -1,6 +1,6 @@ using NSubstitute.Core; -namespace NSubstitute.Routing; +namespace NSubstitute.Internal.Routing; public class Route(ICallHandler[] handlers) : IRoute { diff --git a/src/NSubstitute/Routing/RouteFactory.cs b/src/NSubstitute/Internal/Routing/RouteFactory.cs similarity index 96% rename from src/NSubstitute/Routing/RouteFactory.cs rename to src/NSubstitute/Internal/Routing/RouteFactory.cs index a89e3d5e..5bc4dd34 100644 --- a/src/NSubstitute/Routing/RouteFactory.cs +++ b/src/NSubstitute/Internal/Routing/RouteFactory.cs @@ -1,8 +1,9 @@ -using NSubstitute.Core; -using NSubstitute.ReceivedExtensions; -using NSubstitute.Routing.Handlers; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Routing.Handlers; +using NSubstitute.Core; +using NSubstitute.Extensions; -namespace NSubstitute.Routing; +namespace NSubstitute.Internal.Routing; public class RouteFactory(SequenceNumberGenerator sequenceNumberGenerator, IThreadLocalContext threadLocalContext, diff --git a/src/NSubstitute/NSubstitute.csproj b/src/NSubstitute/NSubstitute.csproj index 3df5a5c3..381eb118 100644 --- a/src/NSubstitute/NSubstitute.csproj +++ b/src/NSubstitute/NSubstitute.csproj @@ -21,8 +21,8 @@ icon.png https://nsubstitute.github.io/ BSD-3-Clause - https://github.com/nsubstitute/NSubstitute - git + https://github.com/nsubstitute/NSubstitute + git @@ -46,7 +46,7 @@ - + @@ -54,5 +54,5 @@ - + diff --git a/src/NSubstitute/Raise.cs b/src/NSubstitute/Raise.cs index 937ec5c2..e37591ab 100644 --- a/src/NSubstitute/Raise.cs +++ b/src/NSubstitute/Raise.cs @@ -1,5 +1,5 @@ -using NSubstitute.Core; -using NSubstitute.Core.Events; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Core.Events; using System.Reflection; namespace NSubstitute; diff --git a/src/NSubstitute/Received.cs b/src/NSubstitute/Received.cs index 311950f2..5ef3a53e 100644 --- a/src/NSubstitute/Received.cs +++ b/src/NSubstitute/Received.cs @@ -1,5 +1,6 @@ using NSubstitute.Core; -using NSubstitute.Core.SequenceChecking; +using NSubstitute.Internal.Core; +using NSubstitute.Internal.Core.SequenceChecking; namespace NSubstitute; diff --git a/src/NSubstitute/Substitute.cs b/src/NSubstitute/Substitute.cs index f1069c17..6921e626 100644 --- a/src/NSubstitute/Substitute.cs +++ b/src/NSubstitute/Substitute.cs @@ -1,4 +1,5 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; using System.Diagnostics.Contracts; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.Received.cs b/src/NSubstitute/SubstituteExtensions.Received.cs index afb612f3..2fd66a0f 100644 --- a/src/NSubstitute/SubstituteExtensions.Received.cs +++ b/src/NSubstitute/SubstituteExtensions.Received.cs @@ -1,7 +1,6 @@ -using NSubstitute.ClearExtensions; using NSubstitute.Core; using NSubstitute.Exceptions; -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; namespace NSubstitute; @@ -85,7 +84,7 @@ public static IEnumerable ReceivedCalls(this T substitute) where T : c /// /// /// Note that this will not clear any results set up for the substitute using Returns(). - /// See for more options with resetting + /// See for more options with resetting /// a substitute. /// public static void ClearReceivedCalls(this T substitute) where T : class diff --git a/src/NSubstitute/SubstituteExtensions.Returns.Task.cs b/src/NSubstitute/SubstituteExtensions.Returns.Task.cs index 9d603679..4c0d1c7a 100644 --- a/src/NSubstitute/SubstituteExtensions.Returns.Task.cs +++ b/src/NSubstitute/SubstituteExtensions.Returns.Task.cs @@ -1,5 +1,6 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.Returns.ValueTask.cs b/src/NSubstitute/SubstituteExtensions.Returns.ValueTask.cs index 39ed3496..9c1c9c43 100644 --- a/src/NSubstitute/SubstituteExtensions.Returns.ValueTask.cs +++ b/src/NSubstitute/SubstituteExtensions.Returns.ValueTask.cs @@ -1,5 +1,6 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.Returns.cs b/src/NSubstitute/SubstituteExtensions.Returns.cs index f201d09d..b3ffd37b 100644 --- a/src/NSubstitute/SubstituteExtensions.Returns.cs +++ b/src/NSubstitute/SubstituteExtensions.Returns.cs @@ -1,4 +1,5 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.When.Task.cs b/src/NSubstitute/SubstituteExtensions.When.Task.cs index e4649809..433c7c0a 100644 --- a/src/NSubstitute/SubstituteExtensions.When.Task.cs +++ b/src/NSubstitute/SubstituteExtensions.When.Task.cs @@ -1,4 +1,5 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.When.ValueTask.cs b/src/NSubstitute/SubstituteExtensions.When.ValueTask.cs index cd3e4648..cea2a0da 100644 --- a/src/NSubstitute/SubstituteExtensions.When.ValueTask.cs +++ b/src/NSubstitute/SubstituteExtensions.When.ValueTask.cs @@ -1,4 +1,5 @@ using NSubstitute.Core; +using NSubstitute.Internal.Core; namespace NSubstitute; diff --git a/src/NSubstitute/SubstituteExtensions.When.cs b/src/NSubstitute/SubstituteExtensions.When.cs index 5ba3f7a9..752b803a 100644 --- a/src/NSubstitute/SubstituteExtensions.When.cs +++ b/src/NSubstitute/SubstituteExtensions.When.cs @@ -1,5 +1,6 @@ -using NSubstitute.Core; +using NSubstitute.Internal.Core; using NSubstitute.Exceptions; +using NSubstitute.Core; namespace NSubstitute; public static partial class SubstituteExtensions diff --git a/tests/NSubstitute.Acceptance.Specs/ArgDoFromMatcher.cs b/tests/NSubstitute.Acceptance.Specs/ArgDoFromMatcher.cs index cd49cc26..4e016076 100644 --- a/tests/NSubstitute.Acceptance.Specs/ArgDoFromMatcher.cs +++ b/tests/NSubstitute.Acceptance.Specs/ArgDoFromMatcher.cs @@ -1,4 +1,4 @@ -using NSubstitute.ClearExtensions; +using NSubstitute.Extensions; using NUnit.Framework; namespace NSubstitute.Acceptance.Specs; diff --git a/tests/NSubstitute.Acceptance.Specs/ArgumentMatching.cs b/tests/NSubstitute.Acceptance.Specs/ArgumentMatching.cs index 2dc1f5a1..b43ef848 100644 --- a/tests/NSubstitute.Acceptance.Specs/ArgumentMatching.cs +++ b/tests/NSubstitute.Acceptance.Specs/ArgumentMatching.cs @@ -1,7 +1,6 @@ using NSubstitute.Acceptance.Specs.Infrastructure; using NSubstitute.Core; using NSubstitute.Core.Arguments; -using NSubstitute.ExceptionExtensions; using NSubstitute.Exceptions; using NSubstitute.Extensions; using NUnit.Framework; diff --git a/tests/NSubstitute.Acceptance.Specs/ClearSubstitute.cs b/tests/NSubstitute.Acceptance.Specs/ClearSubstitute.cs index 00317247..df553574 100644 --- a/tests/NSubstitute.Acceptance.Specs/ClearSubstitute.cs +++ b/tests/NSubstitute.Acceptance.Specs/ClearSubstitute.cs @@ -1,5 +1,5 @@ -using NSubstitute.ClearExtensions; using NSubstitute.Exceptions; +using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy; diff --git a/tests/NSubstitute.Acceptance.Specs/ConfigurationExtensionTests.cs b/tests/NSubstitute.Acceptance.Specs/ConfigurationExtensionTests.cs index a83c5771..89f40636 100644 --- a/tests/NSubstitute.Acceptance.Specs/ConfigurationExtensionTests.cs +++ b/tests/NSubstitute.Acceptance.Specs/ConfigurationExtensionTests.cs @@ -1,6 +1,5 @@ using NSubstitute.Acceptance.Specs.Infrastructure; using NSubstitute.Core; -using NSubstitute.ExceptionExtensions; using NSubstitute.Extensions; using NUnit.Framework; diff --git a/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue291_CannotReconfigureThrowingConfiguration.cs b/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue291_CannotReconfigureThrowingConfiguration.cs index bd6880e2..12892ad0 100644 --- a/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue291_CannotReconfigureThrowingConfiguration.cs +++ b/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue291_CannotReconfigureThrowingConfiguration.cs @@ -1,5 +1,5 @@ using NSubstitute.Acceptance.Specs.Infrastructure; -using NSubstitute.ExceptionExtensions; +using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy; diff --git a/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue569_QueryShouldNotInvokeConfiguredResult.cs b/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue569_QueryShouldNotInvokeConfiguredResult.cs index 0272a571..8bcaa7b2 100644 --- a/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue569_QueryShouldNotInvokeConfiguredResult.cs +++ b/tests/NSubstitute.Acceptance.Specs/FieldReports/Issue569_QueryShouldNotInvokeConfiguredResult.cs @@ -1,5 +1,5 @@ using NSubstitute.Acceptance.Specs.Infrastructure; -using NSubstitute.ExceptionExtensions; +using NSubstitute.Extensions; using NUnit.Framework; namespace NSubstitute.Acceptance.Specs.FieldReports; diff --git a/tests/NSubstitute.Acceptance.Specs/InternalChecks/PublicApiTests.cs b/tests/NSubstitute.Acceptance.Specs/InternalChecks/PublicApiTests.cs new file mode 100644 index 00000000..563e76ca --- /dev/null +++ b/tests/NSubstitute.Acceptance.Specs/InternalChecks/PublicApiTests.cs @@ -0,0 +1,75 @@ +using NUnit.Framework; +using System.Reflection; + +namespace NSubstitute.Acceptance.Specs.InternalChecks; + +[TestFixture] +public class PublicApiTests +{ + private static readonly Assembly Assembly = typeof(Substitute).Assembly; + + [Test] + [TestCaseSource(nameof(AllPublicProperties))] + public void Property_Should_Not_Use_Internal_Type(Type type, PropertyInfo property) + { + var propertyType = property.PropertyType; + + // Act & Assert + Assert.That(propertyType.Namespace, Is.Not.Contains(".Internal"), $"Property '{type.FullName}.{property.Name}' uses internal type '{propertyType.FullName}'."); + + } + [Test] + [TestCaseSource(nameof(AllPublicMethods))] + public void Method_Should_Not_Use_Internal_Types(Type type, MethodInfo method) + { + // Arrange + var returnType = method.ReturnType; + var parameters = method.GetParameters(); + + // Act & Assert + + // Check return type + Assert.That(returnType.Namespace, Is.Not.Contains(".Internal"), $"Method '{type.FullName}.{method.Name}' uses internal return type '{returnType.FullName}'."); + + // Check parameter types + foreach (var param in parameters) + { + var paramType = param.ParameterType; + Assert.That(paramType.Namespace, Is.Not.Contains(".Internal"), $"Method '{type.FullName}.{method.Name}' parameter '{param.Name}' uses internal type '{paramType.FullName}'."); + } + } + + public static IEnumerable AllPublicProperties() + { + foreach (var type in GetPublicTypesThatAreNotInInternalNamespace()) + { + foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) + { + yield return new TestCaseData(type, prop) + .SetName($"Property {type.Name}.{prop.Name} ShouldNotUseInternalTypes"); + } + } + } + + public static IEnumerable AllPublicMethods() + { + foreach (var type in GetPublicTypesThatAreNotInInternalNamespace()) + { + foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) + { + if (method.IsSpecialName) // Exclude property/events accessors + continue; + + yield return new TestCaseData(type, method) + .SetName($"Method {type.Name}.{method.Name} ShouldNotUseInternalTypes"); + } + } + } + + private static IEnumerable GetPublicTypesThatAreNotInInternalNamespace() + { + return Assembly.GetExportedTypes().Where(t => t.IsPublic && !t.Namespace.Contains(".Internal")); + } + + +} diff --git a/tests/NSubstitute.Acceptance.Specs/NullReferenceCheckingForSubstituteExtensions.cs b/tests/NSubstitute.Acceptance.Specs/NullReferenceCheckingForSubstituteExtensions.cs index e7e02b43..b23f7669 100644 --- a/tests/NSubstitute.Acceptance.Specs/NullReferenceCheckingForSubstituteExtensions.cs +++ b/tests/NSubstitute.Acceptance.Specs/NullReferenceCheckingForSubstituteExtensions.cs @@ -1,5 +1,5 @@ -using NSubstitute.ClearExtensions; using NSubstitute.Exceptions; +using NSubstitute.Extensions; using NUnit.Framework; namespace NSubstitute.Acceptance.Specs; diff --git a/tests/NSubstitute.Acceptance.Specs/PartialSubs.cs b/tests/NSubstitute.Acceptance.Specs/PartialSubs.cs index f299e29a..0c7ccdc5 100644 --- a/tests/NSubstitute.Acceptance.Specs/PartialSubs.cs +++ b/tests/NSubstitute.Acceptance.Specs/PartialSubs.cs @@ -1,8 +1,8 @@ -using NSubstitute.Core; -using NSubstitute.Exceptions; +using NSubstitute.Exceptions; using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy; +using NSubstitute.Core; namespace NSubstitute.Acceptance.Specs; diff --git a/tests/NSubstitute.Acceptance.Specs/ReceivedCalls.cs b/tests/NSubstitute.Acceptance.Specs/ReceivedCalls.cs index 4a664d9d..151ca51f 100644 --- a/tests/NSubstitute.Acceptance.Specs/ReceivedCalls.cs +++ b/tests/NSubstitute.Acceptance.Specs/ReceivedCalls.cs @@ -1,5 +1,5 @@ using NSubstitute.Exceptions; -using NSubstitute.ReceivedExtensions; +using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy; diff --git a/tests/NSubstitute.Acceptance.Specs/ReturningResults.cs b/tests/NSubstitute.Acceptance.Specs/ReturningResults.cs index ac2b45e1..ece26464 100644 --- a/tests/NSubstitute.Acceptance.Specs/ReturningResults.cs +++ b/tests/NSubstitute.Acceptance.Specs/ReturningResults.cs @@ -1,6 +1,6 @@ using NSubstitute.Acceptance.Specs.Infrastructure; using NSubstitute.Exceptions; -using NSubstitute.ReturnsExtensions; +using NSubstitute.Extensions; using NUnit.Framework; namespace NSubstitute.Acceptance.Specs; diff --git a/tests/NSubstitute.Acceptance.Specs/ThrowingAsyncExceptions.cs b/tests/NSubstitute.Acceptance.Specs/ThrowingAsyncExceptions.cs index 29fe4e11..5cb8832e 100644 --- a/tests/NSubstitute.Acceptance.Specs/ThrowingAsyncExceptions.cs +++ b/tests/NSubstitute.Acceptance.Specs/ThrowingAsyncExceptions.cs @@ -1,5 +1,5 @@ using NSubstitute.Acceptance.Specs.Infrastructure; -using NSubstitute.ExceptionExtensions; +using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy; diff --git a/tests/NSubstitute.Acceptance.Specs/ThrowingExceptions.cs b/tests/NSubstitute.Acceptance.Specs/ThrowingExceptions.cs index 4ac6e18c..7f0f3317 100644 --- a/tests/NSubstitute.Acceptance.Specs/ThrowingExceptions.cs +++ b/tests/NSubstitute.Acceptance.Specs/ThrowingExceptions.cs @@ -1,5 +1,5 @@ using NSubstitute.Acceptance.Specs.Infrastructure; -using NSubstitute.ExceptionExtensions; +using NSubstitute.Extensions; using NUnit.Framework; using NUnit.Framework.Legacy;