From 653db312e7b8fab824693f8bfa13755502e56199 Mon Sep 17 00:00:00 2001 From: Dominique Schuppli Date: Mon, 18 Jan 2021 22:31:53 +0100 Subject: [PATCH] Some minor renames for consistency --- .../{ImmutablePoppableStack.cs => ImmutablePopOnlyStack.cs} | 0 src/Moq/Interception/InterceptionAspects.cs | 4 ++-- src/Moq/{Mock.Generic.cs => Mock`1.cs} | 0 ...edPropertyGetterSetup.cs => StubbedPropertyGetterSetup.cs} | 4 ++-- ...edPropertySetterSetup.cs => StubbedPropertySetterSetup.cs} | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename src/Moq/{ImmutablePoppableStack.cs => ImmutablePopOnlyStack.cs} (100%) rename src/Moq/{Mock.Generic.cs => Mock`1.cs} (100%) rename src/Moq/{AutoImplementedPropertyGetterSetup.cs => StubbedPropertyGetterSetup.cs} (82%) rename src/Moq/{AutoImplementedPropertySetterSetup.cs => StubbedPropertySetterSetup.cs} (80%) diff --git a/src/Moq/ImmutablePoppableStack.cs b/src/Moq/ImmutablePopOnlyStack.cs similarity index 100% rename from src/Moq/ImmutablePoppableStack.cs rename to src/Moq/ImmutablePopOnlyStack.cs diff --git a/src/Moq/Interception/InterceptionAspects.cs b/src/Moq/Interception/InterceptionAspects.cs index f31607818..5bf33805e 100644 --- a/src/Moq/Interception/InterceptionAspects.cs +++ b/src/Moq/Interception/InterceptionAspects.cs @@ -217,7 +217,7 @@ public static bool Handle(Invocation invocation, Mock mock) if (ProxyFactory.Instance.IsMethodVisible(getter, out _)) { propertyValue = CreateInitialPropertyValue(mock, getter); - getterSetup = new AutoImplementedPropertyGetterSetup(mock, expression, getter, () => propertyValue); + getterSetup = new StubbedPropertyGetterSetup(mock, expression, getter, () => propertyValue); mock.MutableSetups.Add(getterSetup); } @@ -237,7 +237,7 @@ public static bool Handle(Invocation invocation, Mock mock) { if (ProxyFactory.Instance.IsMethodVisible(setter, out _)) { - setterSetup = new AutoImplementedPropertySetterSetup(mock, expression, setter, (newValue) => + setterSetup = new StubbedPropertySetterSetup(mock, expression, setter, (newValue) => { propertyValue = newValue; }); diff --git a/src/Moq/Mock.Generic.cs b/src/Moq/Mock`1.cs similarity index 100% rename from src/Moq/Mock.Generic.cs rename to src/Moq/Mock`1.cs diff --git a/src/Moq/AutoImplementedPropertyGetterSetup.cs b/src/Moq/StubbedPropertyGetterSetup.cs similarity index 82% rename from src/Moq/AutoImplementedPropertyGetterSetup.cs rename to src/Moq/StubbedPropertyGetterSetup.cs index 83765c82a..cd553cd0e 100644 --- a/src/Moq/AutoImplementedPropertyGetterSetup.cs +++ b/src/Moq/StubbedPropertyGetterSetup.cs @@ -10,13 +10,13 @@ namespace Moq /// /// Setup used by for property getters. /// - internal sealed class AutoImplementedPropertyGetterSetup : Setup + internal sealed class StubbedPropertyGetterSetup : Setup { private static Expression[] noArguments = new Expression[0]; private Func getter; - public AutoImplementedPropertyGetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Func getter) + public StubbedPropertyGetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Func getter) : base(originalExpression: null, mock, new InvocationShape(originalExpression, method, noArguments)) { this.getter = getter; diff --git a/src/Moq/AutoImplementedPropertySetterSetup.cs b/src/Moq/StubbedPropertySetterSetup.cs similarity index 80% rename from src/Moq/AutoImplementedPropertySetterSetup.cs rename to src/Moq/StubbedPropertySetterSetup.cs index 17f83da6b..04b7ee835 100644 --- a/src/Moq/AutoImplementedPropertySetterSetup.cs +++ b/src/Moq/StubbedPropertySetterSetup.cs @@ -11,11 +11,11 @@ namespace Moq /// /// Setup used by for property setters. /// - internal sealed class AutoImplementedPropertySetterSetup : Setup + internal sealed class StubbedPropertySetterSetup : Setup { private Action setter; - public AutoImplementedPropertySetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Action setter) + public StubbedPropertySetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Action setter) : base(originalExpression: null, mock, new InvocationShape(originalExpression, method, new Expression[] { It.IsAny(method.GetParameterTypes().Last()) })) { this.setter = setter;