Skip to content

Commit

Permalink
Some minor renames for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
stakx committed Jan 18, 2021
1 parent fc73131 commit 653db31
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Moq/Interception/InterceptionAspects.cs
Expand Up @@ -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);
}

Expand All @@ -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;
});
Expand Down
File renamed without changes.
Expand Up @@ -10,13 +10,13 @@ namespace Moq
/// <summary>
/// Setup used by <see cref="Mock.SetupAllProperties(Mock)"/> for property getters.
/// </summary>
internal sealed class AutoImplementedPropertyGetterSetup : Setup
internal sealed class StubbedPropertyGetterSetup : Setup
{
private static Expression[] noArguments = new Expression[0];

private Func<object> getter;

public AutoImplementedPropertyGetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Func<object> getter)
public StubbedPropertyGetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Func<object> getter)
: base(originalExpression: null, mock, new InvocationShape(originalExpression, method, noArguments))
{
this.getter = getter;
Expand Down
Expand Up @@ -11,11 +11,11 @@ namespace Moq
/// <summary>
/// Setup used by <see cref="Mock.SetupAllProperties(Mock)"/> for property setters.
/// </summary>
internal sealed class AutoImplementedPropertySetterSetup : Setup
internal sealed class StubbedPropertySetterSetup : Setup
{
private Action<object> setter;

public AutoImplementedPropertySetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Action<object> setter)
public StubbedPropertySetterSetup(Mock mock, LambdaExpression originalExpression, MethodInfo method, Action<object> setter)
: base(originalExpression: null, mock, new InvocationShape(originalExpression, method, new Expression[] { It.IsAny(method.GetParameterTypes().Last()) }))
{
this.setter = setter;
Expand Down

0 comments on commit 653db31

Please sign in to comment.