Skip to content

Commit bd93aff

Browse files
committed
Added ValueTuple to RubberduckTests.csproj; updated MockVbeBuilder.BuildFromStdModules signature.
1 parent d29b3b8 commit bd93aff

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.user
77
*.sln.docstates
88
*.csproj.user
9+
*.csproj.DotSettings
910

1011
# External NuGet Packages
1112
[Pp]ackages/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2-
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp60</s:String>
2+
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp70</s:String>
33
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=ui_005Crefactorings_005Cextractinterface/@EntryIndexedValue">True</s:Boolean>
44
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=unittesting_005Cstubs/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

RubberduckTests/Inspections/IllegalAnnotationsInspectionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ End Sub
6868
Option Explicit
6969
'@Folder(""Legal"")
7070
";
71-
var vbe = MockVbeBuilder.BuildFromStdModules(Tuple.Create("Module1", inputCode1), Tuple.Create("Module2", inputCode2));
71+
var vbe = MockVbeBuilder.BuildFromStdModules(("Module1", inputCode1), ("Module2", inputCode2));
7272
var state = MockParser.CreateAndParse(vbe.Object);
7373

7474
var inspection = new IllegalAnnotationInspection(state);

RubberduckTests/Mocks/MockVbeBuilder.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,14 @@ public Mock<IVBE> Build()
151151
/// <summary>
152152
/// Builds a mock VBE containing multiple standard modules.
153153
/// </summary>
154-
/// <param name="modules">Each tuple is [name, content].</param>
155-
/// <returns></returns>
156-
public static Mock<IVBE> BuildFromStdModules(params Tuple<string, string>[] modules)
154+
public static Mock<IVBE> BuildFromStdModules(params (string name, string content)[] modules)
157155
{
158156
var vbeBuilder = new MockVbeBuilder();
159157

160158
var builder = vbeBuilder.ProjectBuilder(TestProjectName, ProjectProtection.Unprotected);
161159
foreach (var module in modules)
162160
{
163-
builder.AddComponent(module.Item1, ComponentType.StandardModule, module.Item2);
161+
builder.AddComponent(module.name, ComponentType.StandardModule, module.content);
164162
}
165163

166164
var project = builder.Build();

RubberduckTests/RubberduckTests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
<Reference Include="PresentationCore" />
6262
<Reference Include="PresentationFramework" />
6363
<Reference Include="System" />
64+
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
65+
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
66+
</Reference>
6467
<Reference Include="System.Windows.Forms" />
6568
<Reference Include="System.Xaml" />
6669
<Reference Include="WindowsBase" />

RubberduckTests/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
<package id="Moq" version="4.2.1507.0118" targetFramework="net45" />
55
<package id="Ninject" version="3.2.2.0" targetFramework="net45" />
66
<package id="NLog" version="4.0.1" targetFramework="net45" />
7-
</packages>
7+
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
8+
</packages>

0 commit comments

Comments
 (0)