diff --git a/Tests/Mockolate.ExampleTests/MockCreationTests.cs b/Tests/Mockolate.ExampleTests/MockCreationTests.cs
deleted file mode 100644
index fa9db23a..00000000
--- a/Tests/Mockolate.ExampleTests/MockCreationTests.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-#if NET10_0_OR_GREATER
-using System.Net.Http;
-using System.Threading.Tasks;
-using Mockolate.ExampleTests.GeneratorCoverage;
-
-namespace Mockolate.ExampleTests;
-
-///
-/// Compile-and-create coverage for every special case in
-/// Source/Mockolate.SourceGenerators. The example types in this folder
-/// are designed so that this project compiling is itself the primary regression
-/// gate — the source generator must successfully process every shape — and each
-/// fact below additionally proves that CreateMock doesn't throw at runtime.
-///
-public sealed class MockCreationTests
-{
- [Fact]
- public async Task BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated()
- {
- ComprehensiveAbstractClass sut = ComprehensiveAbstractClass.CreateMock()
- .Implementing()
- .Implementing();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public async Task ComprehensiveAbstractClass_CanBeCreated()
- {
- ComprehensiveAbstractClass sut = ComprehensiveAbstractClass.CreateMock();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public async Task ComprehensiveDelegate_CanBeCreated()
- {
- ComprehensiveDelegate sut = ComprehensiveDelegate.CreateMock();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public void ComprehensiveInterface_CanBeCreated()
- {
- IComprehensiveInterface sut = IComprehensiveInterface.CreateMock();
- // Uses Assert.NotNull instead of `await That(sut)` because CS8920 forbids interfaces
- // with unimplemented static abstract members as generic type arguments.
- Assert.NotNull(sut);
- }
-
- [Fact]
- public async Task HttpClient_CanBeCreated()
- {
- HttpClient sut = HttpClient.CreateMock();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public async Task KeywordEdgeCases_CanBeCreated()
- {
- IKeywordEdgeCases sut = IKeywordEdgeCases.CreateMock();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public async Task RefStructConsumer_CanBeCreated()
- {
- IRefStructConsumer sut = IRefStructConsumer.CreateMock();
- await That(sut).IsNotNull();
- }
-
- [Fact]
- public void StaticAbstractMembers_CanBeCreated()
- {
- IStaticAbstractMembers sut = IStaticAbstractMembers.CreateMock();
- // Uses Assert.NotNull instead of `await That(sut)` because CS8920 forbids interfaces
- // with unimplemented static abstract members as generic type arguments.
- Assert.NotNull(sut);
- }
-}
-#endif
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Entities/TypeIsFormattableTests.cs b/Tests/Mockolate.SourceGenerators.Tests/Entities/TypeIsFormattableTests.cs
index 907550a7..c2693d5f 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Entities/TypeIsFormattableTests.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Entities/TypeIsFormattableTests.cs
@@ -12,7 +12,7 @@ public class TypeIsFormattableTests
public async Task WhenSymbolIsObject_ShouldNotReportFormattable()
{
const string source = "public class Holder { public object Value; }";
- SyntaxTree tree = CSharpSyntaxTree.ParseText(source);
+ SyntaxTree tree = CSharpSyntaxTree.ParseText(source, cancellationToken: TestContext.Current.CancellationToken);
CSharpCompilation compilation = CSharpCompilation.Create(
"TestAssembly",
[tree,],
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.AsExtensions.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.AsExtensions.g.cs
index 925cf462..6712ff11 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.AsExtensions.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.AsExtensions.g.cs
@@ -15,14 +15,14 @@ internal static partial class MockExtensionsForICombinationMockA
extension(global::Mockolate.Mock.IMockForComprehensiveAbstractClass mock)
{
///
- /// Reinterprets this mock as a mock of ICombinationMockA to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ICombinationMockA to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ICombinationMockA.
- /// The subject does not implement ICombinationMockA.
- public global::Mockolate.Mock.IMockForICombinationMockA As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ /// An IMockFor... accessor targeting ICombinationMockA.
+ /// The subject does not implement ICombinationMockA.
+ public global::Mockolate.Mock.IMockForICombinationMockA As() where T : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA
{
if (mock is global::Mockolate.Mock.IMockForICombinationMockA typed)
{
@@ -38,14 +38,14 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
extension(global::Mockolate.Mock.IMockForICombinationMockA mock)
{
///
- /// Reinterprets this mock as a mock of ComprehensiveAbstractClass to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ComprehensiveAbstractClass to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ComprehensiveAbstractClass.
- /// The subject does not implement ComprehensiveAbstractClass.
- public global::Mockolate.Mock.IMockForComprehensiveAbstractClass As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ /// An IMockFor... accessor targeting ComprehensiveAbstractClass.
+ /// The subject does not implement ComprehensiveAbstractClass.
+ public global::Mockolate.Mock.IMockForComprehensiveAbstractClass As() where T : global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
{
if (mock is global::Mockolate.Mock.IMockForComprehensiveAbstractClass typed)
{
@@ -61,14 +61,14 @@ internal static partial class MockExtensionsForICombinationMockB
extension(global::Mockolate.Mock.IMockForComprehensiveAbstractClass mock)
{
///
- /// Reinterprets this mock as a mock of ICombinationMockB to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ICombinationMockB to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ICombinationMockB.
- /// The subject does not implement ICombinationMockB.
- public global::Mockolate.Mock.IMockForICombinationMockB As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB
+ /// An IMockFor... accessor targeting ICombinationMockB.
+ /// The subject does not implement ICombinationMockB.
+ public global::Mockolate.Mock.IMockForICombinationMockB As() where T : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB
{
if (mock is global::Mockolate.Mock.IMockForICombinationMockB typed)
{
@@ -84,14 +84,14 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
extension(global::Mockolate.Mock.IMockForICombinationMockB mock)
{
///
- /// Reinterprets this mock as a mock of ComprehensiveAbstractClass to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ComprehensiveAbstractClass to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ComprehensiveAbstractClass.
- /// The subject does not implement ComprehensiveAbstractClass.
- public global::Mockolate.Mock.IMockForComprehensiveAbstractClass As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ /// An IMockFor... accessor targeting ComprehensiveAbstractClass.
+ /// The subject does not implement ComprehensiveAbstractClass.
+ public global::Mockolate.Mock.IMockForComprehensiveAbstractClass As() where T : global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
{
if (mock is global::Mockolate.Mock.IMockForComprehensiveAbstractClass typed)
{
@@ -107,14 +107,14 @@ internal static partial class MockExtensionsForICombinationMockB
extension(global::Mockolate.Mock.IMockForICombinationMockA mock)
{
///
- /// Reinterprets this mock as a mock of ICombinationMockB to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ICombinationMockB to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ICombinationMockB.
- /// The subject does not implement ICombinationMockB.
- public global::Mockolate.Mock.IMockForICombinationMockB As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB
+ /// An IMockFor... accessor targeting ICombinationMockB.
+ /// The subject does not implement ICombinationMockB.
+ public global::Mockolate.Mock.IMockForICombinationMockB As() where T : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB
{
if (mock is global::Mockolate.Mock.IMockForICombinationMockB typed)
{
@@ -130,14 +130,14 @@ internal static partial class MockExtensionsForICombinationMockA
extension(global::Mockolate.Mock.IMockForICombinationMockB mock)
{
///
- /// Reinterprets this mock as a mock of ICombinationMockA to reach its Setup/Verify/Raise surface.
+ /// Reinterprets this mock as a mock of ICombinationMockA to reach its Setup/Verify/Raise surface.
///
///
/// The returned accessor shares the same mock registry as this one - setups and verifications act on the same mocked instance. Use this when the mock implements multiple interfaces via Implementing<T>() and you need to configure or verify members of a different interface than the one the instance is currently typed as.
///
- /// An IMockFor... accessor targeting ICombinationMockA.
- /// The subject does not implement ICombinationMockA.
- public global::Mockolate.Mock.IMockForICombinationMockA As() where T : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ /// An IMockFor... accessor targeting ICombinationMockA.
+ /// The subject does not implement ICombinationMockA.
+ public global::Mockolate.Mock.IMockForICombinationMockA As() where T : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA
{
if (mock is global::Mockolate.Mock.IMockForICombinationMockA typed)
{
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass.g.cs
index 6f74d2a6..d6f26d81 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass.g.cs
@@ -11,20 +11,19 @@
namespace Mockolate;
///
-/// Mock extensions for ComprehensiveAbstractClass.
+/// Mock extensions for ComprehensiveAbstractClass.
///
-[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class MockExtensionsForComprehensiveAbstractClass
{
///
- extension(global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass mock)
+ extension(global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass mock)
{
///
- /// Gets the mock accessor for ComprehensiveAbstractClass - the entry point for configuring setups, verifying interactions and raising events.
+ /// Gets the mock accessor for ComprehensiveAbstractClass - the entry point for configuring setups, verifying interactions and raising events.
///
///
- /// The accessor is the bridge between the strongly-typed instance of ComprehensiveAbstractClass returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
+ /// The accessor is the bridge between the strongly-typed instance of ComprehensiveAbstractClass returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
/// Through it you can:
///
/// - Setup - configure how members respond when invoked (Returns, Throws, Do, InitializeWith, ...).
@@ -35,7 +34,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// - VerifySetup - verify how often a specific setup matched.
///
///
- /// The instance is not a Mockolate-generated mock of ComprehensiveAbstractClass.
+ /// The instance is not a Mockolate-generated mock of ComprehensiveAbstractClass.
public global::Mockolate.Mock.IMockForComprehensiveAbstractClass Mock
{
get
@@ -49,10 +48,10 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
}
///
- /// Creates a new mock of ComprehensiveAbstractClass with the default MockBehavior.
+ /// Creates a new mock of ComprehensiveAbstractClass with the default MockBehavior.
///
///
- /// The returned instance is a strongly-typed mock generated at compile time - it implements ComprehensiveAbstractClass and exposes the Mockolate surface through .Mock:
+ /// The returned instance is a strongly-typed mock generated at compile time - it implements ComprehensiveAbstractClass and exposes the Mockolate surface through .Mock:
///
/// - .Mock.Setup configures how members respond (Returns, Throws, Do, InitializeWith, sequences, callbacks).
/// - .Mock.Verify asserts how often and in which order members were invoked.
@@ -60,91 +59,91 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// With the default behavior, un-configured members return default values (empty collections / strings, completed tasks, otherwise) and base-class implementations are invoked for class mocks. Use one of the overloads that accepts a MockBehavior to customize this (for example to make un-configured calls throw or to skip the base class).
/// Overloads allow you to additionally pass constructor parameters (for class mocks), apply an initial setup callback before the instance is returned, or combine both.
///
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock()
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock()
=> CreateMock(null, null, (object?[]?)null);
///
- /// Creates a new mock of ComprehensiveAbstractClass with the default MockBehavior, applying the given immediately.
+ /// Creates a new mock of ComprehensiveAbstractClass with the default MockBehavior, applying the given immediately.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup)
=> CreateMock(null, setup, (object?[]?)null);
///
- /// Creates a new mock of ComprehensiveAbstractClass with the given .
+ /// Creates a new mock of ComprehensiveAbstractClass with the given .
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior)
=> CreateMock(mockBehavior, null, (object?[]?)null);
///
- /// Creates a new mock of ComprehensiveAbstractClass with the given , applying the given immediately.
+ /// Creates a new mock of ComprehensiveAbstractClass with the given , applying the given immediately.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup)
=> CreateMock(mockBehavior, setup, (object?[]?)null);
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given to invoke the base-class constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given to invoke the base-class constructor.
///
/// Values forwarded to a matching base-class constructor. Required when no parameterless constructor exists.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(object?[] constructorParameters)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(object?[] constructorParameters)
=> CreateMock(null, null, constructorParameters);
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given and .
+ /// Creates a new mock of ComprehensiveAbstractClass using the given and .
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Values forwarded to a matching base-class constructor. Required when no parameterless constructor exists.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, object?[] constructorParameters)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, object?[] constructorParameters)
=> CreateMock(mockBehavior, null, constructorParameters);
///
- /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given .
+ /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given .
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Values forwarded to a matching base-class constructor. Required when no parameterless constructor exists.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, object?[] constructorParameters)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, object?[] constructorParameters)
=> CreateMock(null, setup, constructorParameters);
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
///
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(int v, string text = "x")
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(int v, string text = "x")
=> CreateMock(null, null, new object?[] { v, text });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, int v, string text = "x")
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, int v, string text = "x")
=> CreateMock(mockBehavior, null, new object?[] { v, text });
///
- /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -152,12 +151,12 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, int v, string text = "x")
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, int v, string text = "x")
=> CreateMock(null, setup, new object?[] { v, text });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, string) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -166,31 +165,31 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, int v, string text = "x")
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, int v, string text = "x")
=> CreateMock(mockBehavior, setup, new object?[] { v, text });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
///
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(int mockRegistry, bool _)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(int mockRegistry, bool _)
=> CreateMock(null, null, new object?[] { mockRegistry, _ });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, int mockRegistry, bool _)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, int mockRegistry, bool _)
=> CreateMock(mockBehavior, null, new object?[] { mockRegistry, _ });
///
- /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -198,12 +197,12 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, int mockRegistry, bool _)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, int mockRegistry, bool _)
=> CreateMock(null, setup, new object?[] { mockRegistry, _ });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(int, bool) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -212,41 +211,41 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, int mockRegistry, bool _)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, int mockRegistry, bool _)
=> CreateMock(mockBehavior, setup, new object?[] { mockRegistry, _ });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
///
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(string name)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(string name)
=> CreateMock(null, null, new object?[] { name });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given and the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, string name)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, string name)
=> CreateMock(mockBehavior, null, new object?[] { name });
///
- /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, string name)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::System.Action setup, string name)
=> CreateMock(null, setup, new object?[] { name });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
+ /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given constructor parameters to invoke the ComprehensiveAbstractClass(string) constructor.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -254,12 +253,12 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
/// Value forwarded to the base-class constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, string name)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup, string name)
=> CreateMock(mockBehavior, setup, new object?[] { name });
///
- /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given .
+ /// Creates a new mock of ComprehensiveAbstractClass using the given , applying the given immediately, using the given .
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -267,8 +266,8 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
/// Controls how the mock responds when members are invoked without a matching setup, or for MockBehavior.Default.
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned, or to skip.
/// Values forwarded to a matching base-class constructor, or to use the parameterless constructor.
- /// A new mock instance of ComprehensiveAbstractClass.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior? mockBehavior, global::System.Action? setup, object?[]? constructorParameters)
+ /// A new mock instance of ComprehensiveAbstractClass.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMock(global::Mockolate.MockBehavior? mockBehavior, global::System.Action? setup, object?[]? constructorParameters)
{
if (mockBehavior is not null)
{
@@ -285,7 +284,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
setup = s => { additionalSetup.Invoke(s); originalSetup.Invoke(s); };
}
}
- if (constructorParameters is null && mockBehaviorAccess.TryGetConstructorParameters(out object?[]? parameters))
+ if (constructorParameters is null && mockBehaviorAccess.TryGetConstructorParameters(out object?[]? parameters))
{
constructorParameters = parameters;
}
@@ -296,7 +295,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
return CreateMockInstance(mockRegistry, constructorParameters, setup);
}
- private static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass CreateMockInstance(global::Mockolate.MockRegistry mockRegistry, object?[]? constructorParameters, global::System.Action? setup)
+ private static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass CreateMockInstance(global::Mockolate.MockRegistry mockRegistry, object?[]? constructorParameters, global::System.Action? setup)
{
if (constructorParameters is null || constructorParameters.Length == 0)
{
@@ -360,7 +359,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass
}
else
{
- throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {constructorParameters.Length} given parameters ({string.Join(", ", constructorParameters)}).");
+ throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {constructorParameters.Length} given parameters ({string.Join(", ", constructorParameters)}).");
}
static bool TryCast(object?[] values, int index, global::Mockolate.MockBehavior behavior, out TValue result)
{
@@ -393,8 +392,8 @@ static bool TryCastWithDefaultValue(object?[] values, int index, TValue
/// Public members on the mock forward to unless overridden by a setup; protected members still go through the base-class implementation. All forwarded interactions are recorded and can be verified the same as on a plain mock.
///
/// The real object whose calls should be forwarded. Must not be .
- /// A new mock of ComprehensiveAbstractClass that delegates to .
- public global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass Wrapping(global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass instance)
+ /// A new mock of ComprehensiveAbstractClass that delegates to .
+ public global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass Wrapping(global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass instance)
{
if (mock is global::Mockolate.IMock mockInterface)
{
@@ -416,11 +415,11 @@ static bool TryCastWithDefaultValue(object?[] values, int index, TValue
///
/// The is applied to the mock before the constructor is executed. Calling Initialize again overlays additional setups on top of any previously registered ones.
///
- /// The mockable type derived from ComprehensiveAbstractClass that this setup should apply to.
+ /// The mockable type derived from ComprehensiveAbstractClass that this setup should apply to.
/// Callback invoked when a new mock of is created.
/// A new MockBehavior with the registered initializer. The original instance is unchanged.
public global::Mockolate.MockBehavior Initialize(global::System.Action setup)
- where T : global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ where T : global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
{
var behaviorAccess = (global::Mockolate.IMockBehaviorAccess)behavior;
return behaviorAccess.Set(setup);
@@ -434,7 +433,6 @@ internal interface IMockSetupInitializationForComprehensiveAbstractClass : globa
global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass Protected { get; }
}
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class MockSetup(global::Mockolate.MockRegistry mockRegistry) : global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass, global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass, IMockSetupInitializationForComprehensiveAbstractClass
{
@@ -450,7 +448,7 @@ internal sealed class MockSetup(global::Mockolate.MockRegistry mockRegistry) : g
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, propertySetup);
return propertySetup;
}
@@ -459,7 +457,7 @@ internal sealed class MockSetup(global::Mockolate.MockRegistry mockRegistry) : g
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass.A()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, methodSetup);
return methodSetup;
}
@@ -471,7 +469,7 @@ internal sealed class MockSetup(global::Mockolate.MockRegistry mockRegistry) : g
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass.P()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_P, methodSetup);
return methodSetup;
}
@@ -496,13 +494,12 @@ private sealed class CovariantParameterAdapter(global::Mockolate.Parameters.I
internal static partial class Mock
{
///
- /// A mock implementation for ComprehensiveAbstractClass.
+ /// A mock implementation for ComprehensiveAbstractClass.
///
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class ComprehensiveAbstractClass :
- global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
+ global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
global::Mockolate.IMock
{
internal const int MemberId_V_Get = 0;
@@ -510,7 +507,7 @@ internal class ComprehensiveAbstractClass :
internal const int MemberId_A = 2;
internal const int MemberId_P = 3;
internal const int MemberCount = 4;
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
///
/// Creates a FastMockInteractions sized to MemberCount for use as the mock's interaction store.
@@ -608,7 +605,7 @@ void IMockForComprehensiveAbstractClass.ClearAllInteractions()
///
string global::Mockolate.IMock.ToString()
- => "Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass mock";
+ => "Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass mock";
///
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
@@ -670,20 +667,20 @@ public ComprehensiveAbstractClass(global::Mockolate.MockBehavior behavior, strin
{
}
- #region Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #region Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
- ///
+ ///
public override int V
{
get
{
- return this.MockRegistry.GetPropertyFast(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.PropertyAccess_V_Get, static b => b.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
+ return this.MockRegistry.GetPropertyFast(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.PropertyAccess_V_Get, static b => b.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
}
set
{
- if (!this.MockRegistry.SetPropertyFast(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
+ if (!this.MockRegistry.SetPropertyFast(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wraps.V = value;
}
@@ -695,7 +692,7 @@ public override int V
}
}
- ///
+ ///
public override int A()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -716,7 +713,7 @@ public override int A()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
{
if (s_methodSetup.Matches())
{
@@ -729,11 +726,11 @@ public override int A()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockolateBuffer_A.Append("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ this.MockolateBuffer_A.Append("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
}
try
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wrappedResult = wraps.A();
hasWrappedResult = true;
@@ -745,7 +742,7 @@ public override int A()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -754,7 +751,7 @@ public override int A()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- ///
+ ///
protected override int P()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -775,7 +772,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
{
if (s_methodSetup.Matches())
{
@@ -788,7 +785,7 @@ protected override int P()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockolateBuffer_P.Append("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ this.MockolateBuffer_P.Append("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
}
try
{
@@ -804,7 +801,7 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -813,7 +810,7 @@ protected override int P()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #endregion Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
#region IMockSetupForComprehensiveAbstractClass
@@ -823,7 +820,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, propertySetup);
return propertySetup;
}
@@ -832,7 +829,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass.A()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, methodSetup);
return methodSetup;
}
@@ -844,7 +841,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass.P()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_P, methodSetup);
return methodSetup;
}
@@ -859,24 +856,23 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForComprehensiveAbstractClass.A()
- => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A", () => $"A()");
+ => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A", () => $"A()");
#endregion IMockVerifyForComprehensiveAbstractClass
#region IMockProtectedVerifyForComprehensiveAbstractClass
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockProtectedVerifyForComprehensiveAbstractClass.P()
- => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_P, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P", () => $"P()");
+ => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_P, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P", () => $"P()");
#endregion IMockProtectedVerifyForComprehensiveAbstractClass
}
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
private sealed class VerifyMonitorComprehensiveAbstractClass(global::Mockolate.MockRegistry mockRegistry) : global::Mockolate.Mock.IMockVerifyForComprehensiveAbstractClass
{
@@ -890,17 +886,16 @@ private sealed class VerifyMonitorComprehensiveAbstractClass(global::Mockolate.M
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Set, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForComprehensiveAbstractClass.A()
- => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A", () => $"A()");
+ => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A", () => $"A()");
#endregion IMockVerifyForComprehensiveAbstractClass
}
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
private sealed class MockInScenarioForComprehensiveAbstractClass : global::Mockolate.Mock.IMockInScenarioForComprehensiveAbstractClass, global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass, global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass
{
@@ -929,7 +924,7 @@ public MockInScenarioForComprehensiveAbstractClass(global::Mockolate.MockRegistr
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_V_Get, _scenarioName, propertySetup);
return propertySetup;
}
@@ -938,7 +933,7 @@ public MockInScenarioForComprehensiveAbstractClass(global::Mockolate.MockRegistr
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass.A()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_A, _scenarioName, methodSetup);
return methodSetup;
}
@@ -950,7 +945,7 @@ public MockInScenarioForComprehensiveAbstractClass(global::Mockolate.MockRegistr
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass.P()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass.MemberId_P, _scenarioName, methodSetup);
return methodSetup;
}
@@ -959,7 +954,7 @@ public MockInScenarioForComprehensiveAbstractClass(global::Mockolate.MockRegistr
}
///
- /// The Mockolate accessor for a mock of ComprehensiveAbstractClass, reached through .Mock on the mocked instance.
+ /// The Mockolate accessor for a mock of ComprehensiveAbstractClass, reached through .Mock on the mocked instance.
///
///
/// Groups every operation that acts on the mock rather than on the mocked subject: setups, verifications, event raising, scenarios and monitoring.
@@ -967,7 +962,7 @@ public MockInScenarioForComprehensiveAbstractClass(global::Mockolate.MockRegistr
internal interface IMockForComprehensiveAbstractClass
{
///
- /// Configures how members of the mock of ComprehensiveAbstractClass respond when invoked.
+ /// Configures how members of the mock of ComprehensiveAbstractClass respond when invoked.
///
///
/// Each mocked member is available as a strongly-typed entry on this surface. Chain Returns, ReturnsAsync, Throws, ThrowsAsync or Do to control the response; chain InitializeWith/Register to initialize properties and indexers; chain multiple returns/throws to define a sequence; use .For(n), .Only(n), .Forever(), .When(predicate) to control when a callback runs.
@@ -976,7 +971,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockSetupForComprehensiveAbstractClass Setup { get; }
///
- /// Configures how virtual members of the mock of ComprehensiveAbstractClass respond when invoked.
+ /// Configures how virtual members of the mock of ComprehensiveAbstractClass respond when invoked.
///
///
/// Only members declared as (or ) on the mocked class appear here. All setup chain operators (Returns, Throws, Do, sequences, .For/.Only/.Forever, ...) work identically to Setup.
@@ -984,7 +979,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockProtectedSetupForComprehensiveAbstractClass SetupProtected { get; }
///
- /// Opens a named scenario scope on the mock of ComprehensiveAbstractClass so that additional setups can be registered for that scenario.
+ /// Opens a named scenario scope on the mock of ComprehensiveAbstractClass so that additional setups can be registered for that scenario.
///
///
/// Scenarios let you define per-state behavior. Setups registered inside the returned IMockInScenarioFor... scope only apply while the mock's current scenario matches ; switch scenarios with TransitionTo.
@@ -994,7 +989,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockInScenarioForComprehensiveAbstractClass InScenario(string scenario);
///
- /// Opens a named scenario scope on the mock of ComprehensiveAbstractClass and immediately invokes to register scenario-specific setups.
+ /// Opens a named scenario scope on the mock of ComprehensiveAbstractClass and immediately invokes to register scenario-specific setups.
///
///
/// Equivalent to InScenario(scenario) followed by the setup callback, but returns the original IMockFor... accessor so it chains nicely at mock-creation time.
@@ -1005,7 +1000,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockForComprehensiveAbstractClass InScenario(string scenario, global::System.Action setup);
///
- /// Switches the active scenario of the mock of ComprehensiveAbstractClass to .
+ /// Switches the active scenario of the mock of ComprehensiveAbstractClass to .
///
///
/// After the transition, setups registered via InScenario(string) under that scenario take effect. Scenarios that have no matching setup for a given member fall back to the default (un-scoped) setups.
@@ -1015,7 +1010,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockForComprehensiveAbstractClass TransitionTo(string scenario);
///
- /// Asserts how often, and in which order, members of the mock of ComprehensiveAbstractClass were invoked.
+ /// Asserts how often, and in which order, members of the mock of ComprehensiveAbstractClass were invoked.
///
///
/// Each call to a member here returns a VerificationResult that you terminate with a count assertion: Never(), Once(), Twice(), Exactly(n), AtLeast(n)/AtLeastOnce()/AtLeastTwice(), AtMost(n)/AtMostOnce()/AtMostTwice(), Between(min, max) or Times(predicate).
@@ -1025,7 +1020,7 @@ internal interface IMockForComprehensiveAbstractClass
IMockVerifyForComprehensiveAbstractClass Verify { get; }
///
- /// Asserts how often, and in which order, members of the mock of ComprehensiveAbstractClass were invoked.
+ /// Asserts how often, and in which order, members of the mock of ComprehensiveAbstractClass were invoked.
///
///
/// Same terminators and modifiers as Verify (Once(), Exactly(n), Within(...), Then(...), ...); applies to members and events instead of public ones.
@@ -1079,33 +1074,33 @@ internal interface IMockForComprehensiveAbstractClass
}
///
- /// Scoped access to setups for a scenario on the mock of ComprehensiveAbstractClass.
+ /// Scoped access to setups for a scenario on the mock of ComprehensiveAbstractClass.
///
internal interface IMockInScenarioForComprehensiveAbstractClass
{
///
- /// Set up the mock of ComprehensiveAbstractClass within the scenario scope.
+ /// Set up the mock of ComprehensiveAbstractClass within the scenario scope.
///
IMockSetupForComprehensiveAbstractClass Setup { get; }
///
- /// Set up protected members of the mock of ComprehensiveAbstractClass within the scenario scope.
+ /// Set up protected members of the mock of ComprehensiveAbstractClass within the scenario scope.
///
IMockProtectedSetupForComprehensiveAbstractClass SetupProtected { get; }
}
///
- /// Set up the mock of ComprehensiveAbstractClass.
+ /// Set up the mock of ComprehensiveAbstractClass.
///
- internal interface IMockSetupForComprehensiveAbstractClass : global::Mockolate.Setup.IMockSetup
+ internal interface IMockSetupForComprehensiveAbstractClass : global::Mockolate.Setup.IMockSetup
{
///
- /// Setup for the int property V.
+ /// Setup for the int property V.
///
global::Mockolate.Setup.PropertySetup V { get; }
///
- /// Setup for the method A().
+ /// Setup for the method A().
///
[global::System.Runtime.CompilerServices.OverloadResolutionPriority(int.MaxValue)]
global::Mockolate.Setup.IReturnMethodSetup A();
@@ -1113,12 +1108,12 @@ internal interface IMockSetupForComprehensiveAbstractClass : global::Mockolate.S
}
///
- /// Set up protected members for the mock of ComprehensiveAbstractClass.
+ /// Set up protected members for the mock of ComprehensiveAbstractClass.
///
internal interface IMockProtectedSetupForComprehensiveAbstractClass
{
///
- /// Setup for the method P().
+ /// Setup for the method P().
///
[global::System.Runtime.CompilerServices.OverloadResolutionPriority(int.MaxValue)]
global::Mockolate.Setup.IReturnMethodSetup P();
@@ -1126,29 +1121,29 @@ internal interface IMockProtectedSetupForComprehensiveAbstractClass
}
///
- /// Verify interactions with the mock of ComprehensiveAbstractClass.
+ /// Verify interactions with the mock of ComprehensiveAbstractClass.
///
- internal interface IMockVerifyForComprehensiveAbstractClass : global::Mockolate.Verify.IMockVerify
+ internal interface IMockVerifyForComprehensiveAbstractClass : global::Mockolate.Verify.IMockVerify
{
///
- /// Verify interactions with the int property V.
+ /// Verify interactions with the int property V.
///
global::Mockolate.Verify.VerificationPropertyResult V { get; }
///
- /// Verify invocations for the method A().
+ /// Verify invocations for the method A().
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters A();
}
///
- /// Verify protected interactions with the mock of ComprehensiveAbstractClass.
+ /// Verify protected interactions with the mock of ComprehensiveAbstractClass.
///
internal interface IMockProtectedVerifyForComprehensiveAbstractClass
{
///
- /// Verify invocations for the method P().
+ /// Verify invocations for the method P().
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters P();
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA.g.cs
index 22a9b77c..347e4ba1 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA.g.cs
@@ -11,24 +11,23 @@
namespace Mockolate;
///
-/// Mock extensions for ComprehensiveAbstractClass that also implements
-/// - ICombinationMockA.
+/// Mock extensions for ComprehensiveAbstractClass that also implements
+/// - ICombinationMockA.
///
-[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class MockExtensionsForComprehensiveAbstractClass__ICombinationMockA
{
///
- /// Extends this mock so the returned instance also implements ICombinationMockA.
+ /// Extends this mock so the returned instance also implements ICombinationMockA.
///
///
- /// The returned instance is a brand-new mock that shares the mock registry (recorded interactions, scenario state, setups) of this one. Cast it to ICombinationMockA to exercise the extra surface or use .Mock.As<ICombinationMockA>() to reach the Setup/Verify surface of the additional interface.
+ /// The returned instance is a brand-new mock that shares the mock registry (recorded interactions, scenario state, setups) of this one. Cast it to ICombinationMockA to exercise the extra surface or use .Mock.As<ICombinationMockA>() to reach the Setup/Verify surface of the additional interface.
///
/// The mock instance to extend.
/// Optional setup callbacks registered on the additional interface before the mock is returned.
- /// A mock of the original type that additionally implements ICombinationMockA.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass Implementing(this global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass sut, params global::System.Action[] setups)
- where TInterface : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ /// A mock of the original type that additionally implements ICombinationMockA.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass Implementing(this global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass sut, params global::System.Action[] setups)
+ where TInterface : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA
{
if (sut is not global::Mockolate.IMock mock)
{
@@ -62,7 +61,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass__IComb
}
else
{
- throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {mock.MockRegistry.ConstructorParameters.Length} given parameters ({string.Join(", ", mock.MockRegistry.ConstructorParameters)}).");
+ throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {mock.MockRegistry.ConstructorParameters.Length} given parameters ({string.Join(", ", mock.MockRegistry.ConstructorParameters)}).");
}
IMockBehaviorAccess mockBehaviorAccess = (global::Mockolate.IMockBehaviorAccess)mock.MockRegistry.Behavior;
if (mockBehaviorAccess.TryGet[]?>(out var additionalSetups))
@@ -116,15 +115,14 @@ static bool TryCastWithDefaultValue(object?[] values, int index, TValue
internal static partial class Mock
{
///
- /// A mock implementation for ComprehensiveAbstractClass that also implements
- /// - ICombinationMockA.
+ /// A mock implementation for ComprehensiveAbstractClass that also implements
+ /// - ICombinationMockA.
///
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class ComprehensiveAbstractClass__ICombinationMockA :
- global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
- global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
+ global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
+ global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
global::Mockolate.IMock
{
internal const int MemberId_V_Get = 0;
@@ -135,8 +133,8 @@ internal class ComprehensiveAbstractClass__ICombinationMockA :
internal const int MemberId_Value_Set = 5;
internal const int MemberId_Run = 6;
internal const int MemberCount = 7;
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
///
[global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
@@ -239,7 +237,7 @@ void IMockForICombinationMockA.ClearAllInteractions()
///
string global::Mockolate.IMock.ToString()
- => "Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass mock that also implements Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA";
+ => "Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass mock that also implements Mockolate.Tests.GeneratorCoverage.ICombinationMockA";
///
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
@@ -273,20 +271,20 @@ public ComprehensiveAbstractClass__ICombinationMockA(global::Mockolate.MockRegis
this.MockRegistry = mockRegistry;
}
- #region Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #region Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
- ///
+ ///
public override int V
{
get
{
- return this.MockRegistry.GetProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.PropertyAccess_V_Get, () => this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
+ return this.MockRegistry.GetProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.PropertyAccess_V_Get, () => this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
}
set
{
- if (!this.MockRegistry.SetProperty("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
+ if (!this.MockRegistry.SetProperty("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wraps.V = value;
}
@@ -298,7 +296,7 @@ public override int V
}
}
- ///
+ ///
public override int A()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -319,7 +317,7 @@ public override int A()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
{
if (s_methodSetup.Matches())
{
@@ -332,11 +330,11 @@ public override int A()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A"));
}
try
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wrappedResult = wraps.A();
hasWrappedResult = true;
@@ -348,7 +346,7 @@ public override int A()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -357,7 +355,7 @@ public override int A()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- ///
+ ///
protected override int P()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -378,7 +376,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
{
if (s_methodSetup.Matches())
{
@@ -391,7 +389,7 @@ protected override int P()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P"));
}
try
{
@@ -407,7 +405,7 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -416,12 +414,12 @@ protected override int P()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #endregion Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
- #region Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #region Mockolate.Tests.GeneratorCoverage.ICombinationMockA
- ///
- int global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value
+ ///
+ int global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value
{
get
{
@@ -429,8 +427,8 @@ protected override int P()
}
}
- ///
- void global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run()
+ ///
+ void global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run()
{
global::Mockolate.Setup.VoidMethodSetup? methodSetup = null;
if (string.IsNullOrEmpty(this.MockRegistry.Scenario))
@@ -450,7 +448,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run"))
+ foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run"))
{
if (s_methodSetup.Matches())
{
@@ -462,7 +460,7 @@ protected override int P()
bool hasWrappedResult = false;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run"));
}
try
{
@@ -473,11 +471,11 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
}
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #endregion Mockolate.Tests.GeneratorCoverage.ICombinationMockA
#region IMockSetupForComprehensiveAbstractClass
@@ -487,7 +485,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.MemberId_V_Get, propertySetup);
return propertySetup;
}
@@ -496,7 +494,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass.A()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.MemberId_A, methodSetup);
return methodSetup;
}
@@ -508,7 +506,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass.P()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.MemberId_P, methodSetup);
return methodSetup;
}
@@ -523,7 +521,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.MemberId_Value_Get, propertySetup);
return propertySetup;
}
@@ -532,7 +530,7 @@ protected override int P()
///
global::Mockolate.Setup.IVoidMethodSetup global::Mockolate.Mock.IMockSetupForICombinationMockA.Run()
{
- var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run");
+ var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA.MemberId_Run, methodSetup);
return methodSetup;
}
@@ -547,20 +545,20 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForComprehensiveAbstractClass.A()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A", __i => true, () => $"A()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A", __i => true, () => $"A()");
#endregion IMockVerifyForComprehensiveAbstractClass
#region IMockProtectedVerifyForComprehensiveAbstractClass
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockProtectedVerifyForComprehensiveAbstractClass.P()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P", __i => true, () => $"P()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P", __i => true, () => $"P()");
#endregion IMockProtectedVerifyForComprehensiveAbstractClass
#region IMockVerifyForICombinationMockA
@@ -571,13 +569,13 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForICombinationMockA.Run()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run", __i => true, () => $"Run()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run", __i => true, () => $"Run()");
#endregion IMockVerifyForICombinationMockA
}
}
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.g.cs
index 3f269607..c8af595a 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.g.cs
@@ -11,25 +11,24 @@
namespace Mockolate;
///
-/// Mock extensions for ComprehensiveAbstractClass that also implements
-/// - ICombinationMockA
-/// - ICombinationMockB.
+/// Mock extensions for ComprehensiveAbstractClass that also implements
+/// - ICombinationMockA
+/// - ICombinationMockB.
///
-[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class MockExtensionsForComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB
{
///
- /// Extends this mock so the returned instance also implements ICombinationMockB.
+ /// Extends this mock so the returned instance also implements ICombinationMockB.
///
///
- /// The returned instance is a brand-new mock that shares the mock registry (recorded interactions, scenario state, setups) of this one. Cast it to ICombinationMockB to exercise the extra surface or use .Mock.As<ICombinationMockB>() to reach the Setup/Verify surface of the additional interface.
+ /// The returned instance is a brand-new mock that shares the mock registry (recorded interactions, scenario state, setups) of this one. Cast it to ICombinationMockB to exercise the extra surface or use .Mock.As<ICombinationMockB>() to reach the Setup/Verify surface of the additional interface.
///
/// The mock instance to extend.
/// Optional setup callbacks registered on the additional interface before the mock is returned.
- /// A mock of the original type that additionally implements ICombinationMockB.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass Implementing(this global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass sut, params global::System.Action[] setups)
- where TInterface : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB
+ /// A mock of the original type that additionally implements ICombinationMockB.
+ public static global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass Implementing(this global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass sut, params global::System.Action[] setups)
+ where TInterface : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB
{
if (sut is not global::Mockolate.IMock mock)
{
@@ -63,7 +62,7 @@ internal static partial class MockExtensionsForComprehensiveAbstractClass__IComb
}
else
{
- throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {mock.MockRegistry.ConstructorParameters.Length} given parameters ({string.Join(", ", mock.MockRegistry.ConstructorParameters)}).");
+ throw new global::Mockolate.Exceptions.MockException($"Could not find any constructor for 'Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass' that matches the {mock.MockRegistry.ConstructorParameters.Length} given parameters ({string.Join(", ", mock.MockRegistry.ConstructorParameters)}).");
}
IMockBehaviorAccess mockBehaviorAccess = (global::Mockolate.IMockBehaviorAccess)mock.MockRegistry.Behavior;
if (mockBehaviorAccess.TryGet[]?>(out var additionalSetups))
@@ -117,17 +116,16 @@ static bool TryCastWithDefaultValue(object?[] values, int index, TValue
internal static partial class Mock
{
///
- /// A mock implementation for ComprehensiveAbstractClass that also implements
- /// - ICombinationMockA
- /// - ICombinationMockB.
+ /// A mock implementation for ComprehensiveAbstractClass that also implements
+ /// - ICombinationMockA
+ /// - ICombinationMockB.
///
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB :
- global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
- global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
- global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB, IMockForICombinationMockB, IMockSetupForICombinationMockB, IMockVerifyForICombinationMockB,
+ global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass, IMockForComprehensiveAbstractClass, IMockSetupForComprehensiveAbstractClass, IMockProtectedSetupForComprehensiveAbstractClass, global::Mockolate.MockExtensionsForComprehensiveAbstractClass.IMockSetupInitializationForComprehensiveAbstractClass, IMockVerifyForComprehensiveAbstractClass, IMockProtectedVerifyForComprehensiveAbstractClass,
+ global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
+ global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB, IMockForICombinationMockB, IMockSetupForICombinationMockB, IMockVerifyForICombinationMockB,
global::Mockolate.IMock
{
internal const int MemberId_V_Get = 0;
@@ -141,9 +139,9 @@ internal class ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB
internal const int MemberId_Value_Set_2 = 8;
internal const int MemberId_Run_2 = 9;
internal const int MemberCount = 10;
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get_2 = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Value");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_V_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get_2 = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Value");
///
[global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
@@ -287,7 +285,7 @@ void IMockForICombinationMockB.ClearAllInteractions()
///
string global::Mockolate.IMock.ToString()
- => "Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass mock that also implements Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA, Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB";
+ => "Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass mock that also implements Mockolate.Tests.GeneratorCoverage.ICombinationMockA, Mockolate.Tests.GeneratorCoverage.ICombinationMockB";
///
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
@@ -321,20 +319,20 @@ public ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB(global::
this.MockRegistry = mockRegistry;
}
- #region Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #region Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
- ///
+ ///
public override int V
{
get
{
- return this.MockRegistry.GetProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.PropertyAccess_V_Get, () => this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
+ return this.MockRegistry.GetProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.PropertyAccess_V_Get, () => this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps ? () => wraps.V : () => base.V);
}
set
{
- if (!this.MockRegistry.SetProperty("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
+ if (!this.MockRegistry.SetProperty("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V", value))
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wraps.V = value;
}
@@ -346,7 +344,7 @@ public override int V
}
}
- ///
+ ///
public override int A()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -367,7 +365,7 @@ public override int A()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A"))
{
if (s_methodSetup.Matches())
{
@@ -380,11 +378,11 @@ public override int A()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A"));
}
try
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass wraps)
{
wrappedResult = wraps.A();
hasWrappedResult = true;
@@ -396,7 +394,7 @@ public override int A()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -405,7 +403,7 @@ public override int A()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- ///
+ ///
protected override int P()
{
global::Mockolate.Setup.ReturnMethodSetup? methodSetup = null;
@@ -426,7 +424,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
+ foreach (global::Mockolate.Setup.ReturnMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups>("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P"))
{
if (s_methodSetup.Matches())
{
@@ -439,7 +437,7 @@ protected override int P()
int wrappedResult = default!;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P"));
}
try
{
@@ -455,7 +453,7 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P()' was invoked without prior setup.");
}
if (methodSetup?.HasReturnCallbacks != true && hasWrappedResult)
{
@@ -464,12 +462,12 @@ protected override int P()
return methodSetup?.TryGetReturnValue(out var returnValue) == true ? returnValue : this.MockRegistry.Behavior.DefaultValue.Generate(default(int)!);
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass
+ #endregion Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass
- #region Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #region Mockolate.Tests.GeneratorCoverage.ICombinationMockA
- ///
- int global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value
+ ///
+ int global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value
{
get
{
@@ -477,8 +475,8 @@ protected override int P()
}
}
- ///
- void global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run()
+ ///
+ void global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run()
{
global::Mockolate.Setup.VoidMethodSetup? methodSetup = null;
if (string.IsNullOrEmpty(this.MockRegistry.Scenario))
@@ -498,7 +496,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run"))
+ foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run"))
{
if (s_methodSetup.Matches())
{
@@ -510,7 +508,7 @@ protected override int P()
bool hasWrappedResult = false;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run"));
}
try
{
@@ -521,16 +519,16 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
}
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #endregion Mockolate.Tests.GeneratorCoverage.ICombinationMockA
- #region Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB
+ #region Mockolate.Tests.GeneratorCoverage.ICombinationMockB
- ///
- int global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Value
+ ///
+ int global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Value
{
get
{
@@ -538,8 +536,8 @@ protected override int P()
}
}
- ///
- void global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run()
+ ///
+ void global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run()
{
global::Mockolate.Setup.VoidMethodSetup? methodSetup = null;
if (string.IsNullOrEmpty(this.MockRegistry.Scenario))
@@ -559,7 +557,7 @@ protected override int P()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run"))
+ foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run"))
{
if (s_methodSetup.Matches())
{
@@ -571,7 +569,7 @@ protected override int P()
bool hasWrappedResult = false;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run"));
+ this.MockRegistry.RegisterInteraction(new global::Mockolate.Interactions.MethodInvocation("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run"));
}
try
{
@@ -582,11 +580,11 @@ protected override int P()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run()' was invoked without prior setup.");
}
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB
+ #endregion Mockolate.Tests.GeneratorCoverage.ICombinationMockB
#region IMockSetupForComprehensiveAbstractClass
@@ -596,7 +594,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_V_Get, propertySetup);
return propertySetup;
}
@@ -605,7 +603,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockSetupForComprehensiveAbstractClass.A()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_A, methodSetup);
return methodSetup;
}
@@ -617,7 +615,7 @@ protected override int P()
///
global::Mockolate.Setup.IReturnMethodSetup global::Mockolate.Mock.IMockProtectedSetupForComprehensiveAbstractClass.P()
{
- var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P");
+ var methodSetup = new global::Mockolate.Setup.ReturnMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_P, methodSetup);
return methodSetup;
}
@@ -632,7 +630,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_Value_Get, propertySetup);
return propertySetup;
}
@@ -641,7 +639,7 @@ protected override int P()
///
global::Mockolate.Setup.IVoidMethodSetup global::Mockolate.Mock.IMockSetupForICombinationMockA.Run()
{
- var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run");
+ var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_Run, methodSetup);
return methodSetup;
}
@@ -656,7 +654,7 @@ protected override int P()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Value");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Value");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_Value_Get_2, propertySetup);
return propertySetup;
}
@@ -665,7 +663,7 @@ protected override int P()
///
global::Mockolate.Setup.IVoidMethodSetup global::Mockolate.Mock.IMockSetupForICombinationMockB.Run()
{
- var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run");
+ var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ComprehensiveAbstractClass__ICombinationMockA__ICombinationMockB.MemberId_Run_2, methodSetup);
return methodSetup;
}
@@ -680,20 +678,20 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.V");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.V");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForComprehensiveAbstractClass.A()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.A", __i => true, () => $"A()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.A", __i => true, () => $"A()");
#endregion IMockVerifyForComprehensiveAbstractClass
#region IMockProtectedVerifyForComprehensiveAbstractClass
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockProtectedVerifyForComprehensiveAbstractClass.P()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ComprehensiveAbstractClass.P", __i => true, () => $"P()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ComprehensiveAbstractClass.P", __i => true, () => $"P()");
#endregion IMockProtectedVerifyForComprehensiveAbstractClass
#region IMockVerifyForICombinationMockA
@@ -704,13 +702,13 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForICombinationMockA.Run()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run", __i => true, () => $"Run()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run", __i => true, () => $"Run()");
#endregion IMockVerifyForICombinationMockA
#region IMockVerifyForICombinationMockB
@@ -721,13 +719,13 @@ protected override int P()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Value");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, -1, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Value");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForICombinationMockB.Run()
- => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB.Run", __i => true, () => $"Run()");
+ => this.MockRegistry.VerifyMethod(this, -1, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB.Run", __i => true, () => $"Run()");
#endregion IMockVerifyForICombinationMockB
}
}
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockA.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockA.g.cs
index 04daa015..86d70a01 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockA.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockA.g.cs
@@ -11,20 +11,19 @@
namespace Mockolate;
///
-/// Mock extensions for ICombinationMockA.
+/// Mock extensions for ICombinationMockA.
///
-[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class MockExtensionsForICombinationMockA
{
///
- extension(global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA mock)
+ extension(global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA mock)
{
///
- /// Gets the mock accessor for ICombinationMockA - the entry point for configuring setups, verifying interactions and raising events.
+ /// Gets the mock accessor for ICombinationMockA - the entry point for configuring setups, verifying interactions and raising events.
///
///
- /// The accessor is the bridge between the strongly-typed instance of ICombinationMockA returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
+ /// The accessor is the bridge between the strongly-typed instance of ICombinationMockA returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
/// Through it you can:
///
/// - Setup - configure how members respond when invoked (Returns, Throws, Do, InitializeWith, ...).
@@ -34,7 +33,7 @@ internal static partial class MockExtensionsForICombinationMockA
/// - VerifySetup - verify how often a specific setup matched.
///
///
- /// The instance is not a Mockolate-generated mock of ICombinationMockA.
+ /// The instance is not a Mockolate-generated mock of ICombinationMockA.
public global::Mockolate.Mock.IMockForICombinationMockA Mock
{
get
@@ -48,10 +47,10 @@ internal static partial class MockExtensionsForICombinationMockA
}
///
- /// Creates a new mock of ICombinationMockA with the default MockBehavior.
+ /// Creates a new mock of ICombinationMockA with the default MockBehavior.
///
///
- /// The returned instance is a strongly-typed mock generated at compile time - it implements ICombinationMockA and exposes the Mockolate surface through .Mock:
+ /// The returned instance is a strongly-typed mock generated at compile time - it implements ICombinationMockA and exposes the Mockolate surface through .Mock:
///
/// - .Mock.Setup configures how members respond (Returns, Throws, Do, InitializeWith, sequences, callbacks).
/// - .Mock.Verify asserts how often and in which order members were invoked.
@@ -59,43 +58,43 @@ internal static partial class MockExtensionsForICombinationMockA
/// With the default behavior, un-configured members return default values (empty collections / strings, completed tasks, otherwise) and base-class implementations are invoked for class mocks. Use one of the overloads that accepts a MockBehavior to customize this (for example to make un-configured calls throw or to skip the base class).
/// Overloads allow you to additionally pass constructor parameters (for class mocks), apply an initial setup callback before the instance is returned, or combine both.
///
- /// A new mock instance of ICombinationMockA.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMock()
+ /// A new mock instance of ICombinationMockA.
+ public static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMock()
=> CreateMock(null, null, (object?[]?)null);
///
- /// Creates a new mock of ICombinationMockA with the default MockBehavior, applying the given immediately.
+ /// Creates a new mock of ICombinationMockA with the default MockBehavior, applying the given immediately.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
- /// A new mock instance of ICombinationMockA.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMock(global::System.Action setup)
+ /// A new mock instance of ICombinationMockA.
+ public static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMock(global::System.Action setup)
=> CreateMock(null, setup, (object?[]?)null);
///
- /// Creates a new mock of ICombinationMockA with the given .
+ /// Creates a new mock of ICombinationMockA with the given .
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
- /// A new mock instance of ICombinationMockA.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior mockBehavior)
+ /// A new mock instance of ICombinationMockA.
+ public static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior mockBehavior)
=> CreateMock(mockBehavior, null, (object?[]?)null);
///
- /// Creates a new mock of ICombinationMockA with the given , applying the given immediately.
+ /// Creates a new mock of ICombinationMockA with the given , applying the given immediately.
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
///
/// Controls how the mock responds when members are invoked without a matching setup; see MockBehavior.
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned.
- /// A new mock instance of ICombinationMockA.
- public static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup)
+ /// A new mock instance of ICombinationMockA.
+ public static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior mockBehavior, global::System.Action setup)
=> CreateMock(mockBehavior, setup, (object?[]?)null);
///
- /// Creates a new mock of ICombinationMockA using the given , applying the given immediately, using the given .
+ /// Creates a new mock of ICombinationMockA using the given , applying the given immediately, using the given .
///
///
/// The provided is immediately applied to the mock. Use this overload when you want setups to cover virtual interactions triggered inside the constructor.
@@ -103,8 +102,8 @@ internal static partial class MockExtensionsForICombinationMockA
/// Controls how the mock responds when members are invoked without a matching setup, or for MockBehavior.Default.
/// Callback that receives the mock's setup surface and registers initial setups before the mock is returned, or to skip.
/// Values forwarded to a matching base-class constructor, or to use the parameterless constructor.
- /// A new mock instance of ICombinationMockA.
- private static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior? mockBehavior, global::System.Action? setup, object?[]? constructorParameters)
+ /// A new mock instance of ICombinationMockA.
+ private static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMock(global::Mockolate.MockBehavior? mockBehavior, global::System.Action? setup, object?[]? constructorParameters)
{
if (mockBehavior is not null)
{
@@ -128,7 +127,7 @@ internal static partial class MockExtensionsForICombinationMockA
return CreateMockInstance(mockRegistry, constructorParameters, setup);
}
- private static global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA CreateMockInstance(global::Mockolate.MockRegistry mockRegistry, object?[]? constructorParameters, global::System.Action? setup)
+ private static global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA CreateMockInstance(global::Mockolate.MockRegistry mockRegistry, object?[]? constructorParameters, global::System.Action? setup)
{
var value = new global::Mockolate.Mock.ICombinationMockA(mockRegistry);
if (setup is not null)
@@ -144,8 +143,8 @@ internal static partial class MockExtensionsForICombinationMockA
/// Public members on the mock forward to unless overridden by a setup; protected members still go through the base-class implementation. All forwarded interactions are recorded and can be verified the same as on a plain mock.
///
/// The real object whose calls should be forwarded. Must not be .
- /// A new mock of ICombinationMockA that delegates to .
- public global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA Wrapping(global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA instance)
+ /// A new mock of ICombinationMockA that delegates to .
+ public global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA Wrapping(global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA instance)
{
if (mock is global::Mockolate.IMock mockInterface)
{
@@ -167,11 +166,11 @@ internal static partial class MockExtensionsForICombinationMockA
///
/// The is applied to the mock before the constructor is executed. Calling Initialize again overlays additional setups on top of any previously registered ones.
///
- /// The mockable type derived from ICombinationMockA that this setup should apply to.
+ /// The mockable type derived from ICombinationMockA that this setup should apply to.
/// Callback invoked when a new mock of is created.
/// A new MockBehavior with the registered initializer. The original instance is unchanged.
public global::Mockolate.MockBehavior Initialize(global::System.Action setup)
- where T : global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ where T : global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA
{
var behaviorAccess = (global::Mockolate.IMockBehaviorAccess)behavior;
return behaviorAccess.Set(setup);
@@ -195,20 +194,19 @@ private sealed class CovariantParameterAdapter(global::Mockolate.Parameters.I
internal static partial class Mock
{
///
- /// A mock implementation for ICombinationMockA.
+ /// A mock implementation for ICombinationMockA.
///
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class ICombinationMockA :
- global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
+ global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA, IMockForICombinationMockA, IMockSetupForICombinationMockA, IMockVerifyForICombinationMockA,
global::Mockolate.IMock
{
internal const int MemberId_Value_Get = 0;
internal const int MemberId_Value_Set = 1;
internal const int MemberId_Run = 2;
internal const int MemberCount = 3;
- internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ internal static readonly global::Mockolate.Interactions.PropertyGetterAccess PropertyAccess_Value_Get = new global::Mockolate.Interactions.PropertyGetterAccess("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
///
/// Creates a FastMockInteractions sized to MemberCount for use as the mock's interaction store.
@@ -283,7 +281,7 @@ void IMockForICombinationMockA.ClearAllInteractions()
///
string global::Mockolate.IMock.ToString()
- => "Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA mock";
+ => "Mockolate.Tests.GeneratorCoverage.ICombinationMockA mock";
///
public ICombinationMockA(global::Mockolate.MockRegistry mockRegistry)
@@ -297,18 +295,18 @@ public ICombinationMockA(global::Mockolate.MockBehavior behavior)
{
}
- #region Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #region Mockolate.Tests.GeneratorCoverage.ICombinationMockA
- ///
+ ///
public int Value
{
get
{
- return this.MockRegistry.GetPropertyFast(global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.PropertyAccess_Value_Get, static b => b.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is not global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA wraps ? null : () => wraps.Value);
+ return this.MockRegistry.GetPropertyFast(global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.PropertyAccess_Value_Get, static b => b.DefaultValue.Generate(default(int)!), this.MockRegistry.Wraps is not global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA wraps ? null : () => wraps.Value);
}
}
- ///
+ ///
public void Run()
{
global::Mockolate.Setup.VoidMethodSetup? methodSetup = null;
@@ -329,7 +327,7 @@ public void Run()
}
if (methodSetup is null)
{
- foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run"))
+ foreach (global::Mockolate.Setup.VoidMethodSetup s_methodSetup in this.MockRegistry.GetMethodSetups("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run"))
{
if (s_methodSetup.Matches())
{
@@ -341,11 +339,11 @@ public void Run()
bool hasWrappedResult = false;
if (this.MockRegistry.Behavior.SkipInteractionRecording == false)
{
- this.MockolateBuffer_Run.Append("global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run");
+ this.MockolateBuffer_Run.Append("global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run");
}
try
{
- if (this.MockRegistry.Wraps is global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA wraps)
+ if (this.MockRegistry.Wraps is global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA wraps)
{
wraps.Run();
hasWrappedResult = true;
@@ -357,11 +355,11 @@ public void Run()
}
if (methodSetup is null && !hasWrappedResult && this.MockRegistry.Behavior.ThrowWhenNotSetup)
{
- throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
+ throw new global::Mockolate.Exceptions.MockNotSetupException("The method 'global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run()' was invoked without prior setup.");
}
}
- #endregion Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA
+ #endregion Mockolate.Tests.GeneratorCoverage.ICombinationMockA
#region IMockSetupForICombinationMockA
@@ -371,7 +369,7 @@ public void Run()
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, propertySetup);
return propertySetup;
}
@@ -380,7 +378,7 @@ public void Run()
///
global::Mockolate.Setup.IVoidMethodSetup global::Mockolate.Mock.IMockSetupForICombinationMockA.Run()
{
- var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run");
+ var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ICombinationMockA.MemberId_Run, methodSetup);
return methodSetup;
}
@@ -395,17 +393,16 @@ public void Run()
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Set, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Set, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForICombinationMockA.Run()
- => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ICombinationMockA.MemberId_Run, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run", () => $"Run()");
+ => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ICombinationMockA.MemberId_Run, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run", () => $"Run()");
#endregion IMockVerifyForICombinationMockA
}
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
private sealed class VerifyMonitorICombinationMockA(global::Mockolate.MockRegistry mockRegistry) : global::Mockolate.Mock.IMockVerifyForICombinationMockA
{
@@ -419,17 +416,16 @@ private sealed class VerifyMonitorICombinationMockA(global::Mockolate.MockRegist
{
get
{
- return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Set, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ return new global::Mockolate.Verify.VerificationPropertyResult(this, this.MockRegistry, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Set, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
}
}
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters IMockVerifyForICombinationMockA.Run()
- => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ICombinationMockA.MemberId_Run, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run", () => $"Run()");
+ => this.MockRegistry.VerifyMethod(this, global::Mockolate.Mock.ICombinationMockA.MemberId_Run, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run", () => $"Run()");
#endregion IMockVerifyForICombinationMockA
}
- [global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
private sealed class MockInScenarioForICombinationMockA : global::Mockolate.Mock.IMockInScenarioForICombinationMockA, global::Mockolate.Mock.IMockSetupForICombinationMockA
{
@@ -454,7 +450,7 @@ public MockInScenarioForICombinationMockA(global::Mockolate.MockRegistry mockReg
{
get
{
- var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Value");
+ var propertySetup = new global::Mockolate.Setup.PropertySetup(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Value");
this.MockRegistry.SetupProperty(global::Mockolate.Mock.ICombinationMockA.MemberId_Value_Get, _scenarioName, propertySetup);
return propertySetup;
}
@@ -463,7 +459,7 @@ public MockInScenarioForICombinationMockA(global::Mockolate.MockRegistry mockReg
///
global::Mockolate.Setup.IVoidMethodSetup global::Mockolate.Mock.IMockSetupForICombinationMockA.Run()
{
- var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockA.Run");
+ var methodSetup = new global::Mockolate.Setup.VoidMethodSetup.WithParameterCollection(MockRegistry, "global::Mockolate.Tests.GeneratorCoverage.ICombinationMockA.Run");
this.MockRegistry.SetupMethod(global::Mockolate.Mock.ICombinationMockA.MemberId_Run, _scenarioName, methodSetup);
return methodSetup;
}
@@ -472,7 +468,7 @@ public MockInScenarioForICombinationMockA(global::Mockolate.MockRegistry mockReg
}
///
- /// The Mockolate accessor for a mock of ICombinationMockA, reached through .Mock on the mocked instance.
+ /// The Mockolate accessor for a mock of ICombinationMockA, reached through .Mock on the mocked instance.
///
///
/// Groups every operation that acts on the mock rather than on the mocked subject: setups, verifications, event raising, scenarios and monitoring.
@@ -480,7 +476,7 @@ public MockInScenarioForICombinationMockA(global::Mockolate.MockRegistry mockReg
internal interface IMockForICombinationMockA
{
///
- /// Configures how members of the mock of ICombinationMockA respond when invoked.
+ /// Configures how members of the mock of ICombinationMockA respond when invoked.
///
///
/// Each mocked member is available as a strongly-typed entry on this surface. Chain Returns, ReturnsAsync, Throws, ThrowsAsync or Do to control the response; chain InitializeWith/Register to initialize properties and indexers; chain multiple returns/throws to define a sequence; use .For(n), .Only(n), .Forever(), .When(predicate) to control when a callback runs.
@@ -489,7 +485,7 @@ internal interface IMockForICombinationMockA
IMockSetupForICombinationMockA Setup { get; }
///
- /// Opens a named scenario scope on the mock of ICombinationMockA so that additional setups can be registered for that scenario.
+ /// Opens a named scenario scope on the mock of ICombinationMockA so that additional setups can be registered for that scenario.
///
///
/// Scenarios let you define per-state behavior. Setups registered inside the returned IMockInScenarioFor... scope only apply while the mock's current scenario matches ; switch scenarios with TransitionTo.
@@ -499,7 +495,7 @@ internal interface IMockForICombinationMockA
IMockInScenarioForICombinationMockA InScenario(string scenario);
///
- /// Opens a named scenario scope on the mock of ICombinationMockA and immediately invokes to register scenario-specific setups.
+ /// Opens a named scenario scope on the mock of ICombinationMockA and immediately invokes to register scenario-specific setups.
///
///
/// Equivalent to InScenario(scenario) followed by the setup callback, but returns the original IMockFor... accessor so it chains nicely at mock-creation time.
@@ -510,7 +506,7 @@ internal interface IMockForICombinationMockA
IMockForICombinationMockA InScenario(string scenario, global::System.Action setup);
///
- /// Switches the active scenario of the mock of ICombinationMockA to .
+ /// Switches the active scenario of the mock of ICombinationMockA to .
///
///
/// After the transition, setups registered via InScenario(string) under that scenario take effect. Scenarios that have no matching setup for a given member fall back to the default (un-scoped) setups.
@@ -520,7 +516,7 @@ internal interface IMockForICombinationMockA
IMockForICombinationMockA TransitionTo(string scenario);
///
- /// Asserts how often, and in which order, members of the mock of ICombinationMockA were invoked.
+ /// Asserts how often, and in which order, members of the mock of ICombinationMockA were invoked.
///
///
/// Each call to a member here returns a VerificationResult that you terminate with a count assertion: Never(), Once(), Twice(), Exactly(n), AtLeast(n)/AtLeastOnce()/AtLeastTwice(), AtMost(n)/AtMostOnce()/AtMostTwice(), Between(min, max) or Times(predicate).
@@ -576,28 +572,28 @@ internal interface IMockForICombinationMockA
}
///
- /// Scoped access to setups for a scenario on the mock of ICombinationMockA.
+ /// Scoped access to setups for a scenario on the mock of ICombinationMockA.
///
internal interface IMockInScenarioForICombinationMockA
{
///
- /// Set up the mock of ICombinationMockA within the scenario scope.
+ /// Set up the mock of ICombinationMockA within the scenario scope.
///
IMockSetupForICombinationMockA Setup { get; }
}
///
- /// Set up the mock of ICombinationMockA.
+ /// Set up the mock of ICombinationMockA.
///
- internal interface IMockSetupForICombinationMockA : global::Mockolate.Setup.IMockSetup
+ internal interface IMockSetupForICombinationMockA : global::Mockolate.Setup.IMockSetup
{
///
- /// Setup for the int property Value.
+ /// Setup for the int property Value.
///
global::Mockolate.Setup.PropertySetup Value { get; }
///
- /// Setup for the method Run().
+ /// Setup for the method Run().
///
[global::System.Runtime.CompilerServices.OverloadResolutionPriority(int.MaxValue)]
global::Mockolate.Setup.IVoidMethodSetup Run();
@@ -605,17 +601,17 @@ internal interface IMockSetupForICombinationMockA : global::Mockolate.Setup.IMoc
}
///
- /// Verify interactions with the mock of ICombinationMockA.
+ /// Verify interactions with the mock of ICombinationMockA.
///
- internal interface IMockVerifyForICombinationMockA : global::Mockolate.Verify.IMockVerify
+ internal interface IMockVerifyForICombinationMockA : global::Mockolate.Verify.IMockVerify
{
///
- /// Verify interactions with the int property Value.
+ /// Verify interactions with the int property Value.
///
global::Mockolate.Verify.VerificationPropertyResult Value { get; }
///
- /// Verify invocations for the method Run().
+ /// Verify invocations for the method Run().
///
global::Mockolate.Verify.VerificationResult.IgnoreParameters Run();
diff --git a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockB.g.cs b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockB.g.cs
index 673715ff..71c02c1b 100644
--- a/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockB.g.cs
+++ b/Tests/Mockolate.SourceGenerators.Tests/Snapshot/Expected/BaseClass_WithMultipleAdditionalInterfaces_CanBeCreated/Mock.ICombinationMockB.g.cs
@@ -11,20 +11,19 @@
namespace Mockolate;
///
-/// Mock extensions for ICombinationMockB.
+/// Mock extensions for ICombinationMockB.
///
-[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class MockExtensionsForICombinationMockB
{
///
- extension(global::Mockolate.ExampleTests.GeneratorCoverage.ICombinationMockB mock)
+ extension(global::Mockolate.Tests.GeneratorCoverage.ICombinationMockB mock)
{
///
- /// Gets the mock accessor for ICombinationMockB - the entry point for configuring setups, verifying interactions and raising events.
+ /// Gets the mock accessor for ICombinationMockB - the entry point for configuring setups, verifying interactions and raising events.
///
///
- /// The accessor is the bridge between the strongly-typed instance of ICombinationMockB returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
+ /// The accessor is the bridge between the strongly-typed instance of ICombinationMockB returned by CreateMock(...) and the underlying mock registry where setups and recorded interactions live.
/// Through it you can:
///
///