Skip to content

Commit 4f6a636

Browse files
committed
Get RHS Dflt Parameter from Resource.Refactorings
1 parent 5e07cf7 commit 4f6a636

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

RubberduckTests/CodeBuilderTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace RubberduckTests
1010
[TestFixture]
1111
public class CodeBuilderTests
1212
{
13-
private const string RHSIdentifier = "RHS";
13+
private static string _rhsIdentifier = Rubberduck.Resources.Refactorings.Refactorings.CodeBuilder_DefaultPropertyRHSParam;
1414

1515
[TestCase("fizz", DeclarationType.Variable, "Integer")]
1616
[TestCase("FirstValue", DeclarationType.UserDefinedTypeMember, "Long")]
@@ -193,7 +193,7 @@ Private fuzz As ETestType2
193193
declarationType,
194194
testParams,
195195
PropertyLetBlockFromPrototypeTest);
196-
StringAssert.Contains($"Property Let {testParams.Identifier}(ByVal {RHSIdentifier} As {typeName})", result);
196+
StringAssert.Contains($"Property Let {testParams.Identifier}(ByVal {_rhsIdentifier} As {typeName})", result);
197197
}
198198

199199
[TestCase("fizz", DeclarationType.Variable, "Variant")]
@@ -219,7 +219,7 @@ Private fizz As Variant
219219
testParams,
220220
PropertySetBlockFromPrototypeTest);
221221

222-
StringAssert.Contains($"Property Set {testParams.Identifier}(ByVal {RHSIdentifier} As {typeName})", result);
222+
StringAssert.Contains($"Property Set {testParams.Identifier}(ByVal {_rhsIdentifier} As {typeName})", result);
223223
}
224224

225225
[TestCase(DeclarationType.PropertyLet)]

RubberduckTests/Refactoring/EncapsulateField/EncapsulateFIeldTestSupport.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
using Moq;
2-
using Rubberduck.Common;
3-
using Rubberduck.Parsing.Rewriter;
1+
using Rubberduck.Parsing.Rewriter;
42
using Rubberduck.Parsing.Symbols;
5-
using Rubberduck.Parsing.UIContext;
63
using Rubberduck.Parsing.VBA;
74
using Rubberduck.Refactorings;
85
using Rubberduck.Refactorings.EncapsulateField;
@@ -19,7 +16,7 @@ namespace RubberduckTests.Refactoring.EncapsulateField
1916
{
2017
public class EncapsulateFieldTestSupport : InteractiveRefactoringTestBase<IEncapsulateFieldPresenter, EncapsulateFieldModel>
2118
{
22-
public string RHSIdentifier => "RHS";
19+
public string RHSIdentifier => Rubberduck.Resources.Refactorings.Refactorings.CodeBuilder_DefaultPropertyRHSParam;
2320

2421
public string StateUDTDefaultType => $"T{MockVbeBuilder.TestModuleName}";
2522

RubberduckTests/Refactoring/ImplementInterface/ImplementInterfaceRefactoringActionTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ImplementInterfaceRefactoringActionTests : RefactoringActionTestBas
1515
{
1616
private string _todoImplementMessage = "Err.Raise 5 'TODO implement interface member";
1717

18-
private const string RHSIdentifier = "RHS";
18+
private static string _rhsIdentifier = Rubberduck.Resources.Refactorings.Refactorings.CodeBuilder_DefaultPropertyRHSParam;
1919

2020
[Test]
2121
[Category("Refactorings")]
@@ -494,7 +494,7 @@ Private Property Get Interface1_Foo() As Long
494494
{_todoImplementMessage}
495495
End Property
496496
497-
Private Property Let Interface1_Foo(ByVal {RHSIdentifier} As Long)
497+
Private Property Let Interface1_Foo(ByVal {_rhsIdentifier} As Long)
498498
{_todoImplementMessage}
499499
End Property
500500
";
@@ -519,7 +519,7 @@ Private Property Get Interface1_Foo() As Object
519519
{_todoImplementMessage}
520520
End Property
521521
522-
Private Property Set Interface1_Foo(ByVal {RHSIdentifier} As Object)
522+
Private Property Set Interface1_Foo(ByVal {_rhsIdentifier} As Object)
523523
{_todoImplementMessage}
524524
End Property
525525
";
@@ -546,11 +546,11 @@ Private Property Get Interface1_Foo() As Variant
546546
{_todoImplementMessage}
547547
End Property
548548
549-
Private Property Let Interface1_Foo(ByVal {RHSIdentifier} As Variant)
549+
Private Property Let Interface1_Foo(ByVal {_rhsIdentifier} As Variant)
550550
{_todoImplementMessage}
551551
End Property
552552
553-
Private Property Set Interface1_Foo(ByVal {RHSIdentifier} As Variant)
553+
Private Property Set Interface1_Foo(ByVal {_rhsIdentifier} As Variant)
554554
{_todoImplementMessage}
555555
End Property
556556
";

0 commit comments

Comments
 (0)