Skip to content

Commit 87607bb

Browse files
committed
simplified MCVE
1 parent c39e910 commit 87607bb

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

RubberduckTests/Inspections/ParameterCanBeByValInspectionTests.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,13 @@ public class ParameterCanBeByValInspectionTests
2020
[TestCategory("Inspections")]
2121
public void ParameterCanBeByVal_NoResultForByValObjectInInterfaceImplementationProperty()
2222
{
23-
const string modelCode = @"
24-
Option Explicit
25-
Public Property Get Foo() As Integer
26-
Foo = 42
27-
End Property
28-
";
29-
3023
const string interfaceCode = @"
3124
Option Explicit
3225
33-
Public Property Get Model() As ModelClass
26+
Public Property Get Model() As Object
3427
End Property
3528
36-
Public Property Set Model(ByVal value As ModelClass)
29+
Public Property Set Model(ByVal value As Object)
3730
End Property
3831
3932
Public Property Get IsCancelled() As Boolean
@@ -57,11 +50,11 @@ Private Property Get IDailySalesView_IsCancelled() As Boolean
5750
IDailySalesView_IsCancelled = this.IsCancelled
5851
End Property
5952
60-
Private Property Set IDailySalesView_Model(ByVal value As DailySalesModel)
53+
Private Property Set IDailySalesView_Model(ByVal value As Object)
6154
Set this.Model = value
6255
End Property
6356
64-
Private Property Get IDailySalesView_Model() As DailySalesModel
57+
Private Property Get IDailySalesView_Model() As Object
6558
Set IDailySalesView_Model = this.Model
6659
End Property
6760
@@ -74,7 +67,6 @@ End Sub
7467
var builder = new MockVbeBuilder();
7568
var vbe = builder.ProjectBuilder("TestProject1", ProjectProtection.Unprotected)
7669
.AddComponent("IView", ComponentType.ClassModule, interfaceCode)
77-
.AddComponent("MyModel", ComponentType.ClassModule, modelCode)
7870
.AddComponent("MyForm", ComponentType.UserForm, implementationCode)
7971
.MockVbeBuilder().Build();
8072

0 commit comments

Comments
 (0)