Skip to content

Commit 2b521b7

Browse files
author
Andrew Mansell
committed
Added tests
1 parent f67eeff commit 2b521b7

File tree

6 files changed

+477
-29
lines changed

6 files changed

+477
-29
lines changed

Rubberduck.Core/UI/CodeExplorer/CodeExplorerControl.xaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,6 @@
496496
<Image Height="16" Source="{StaticResource AddTestModuleImage}" />
497497
</MenuItem.Icon>
498498
</MenuItem>
499-
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_AddTestModuleWithStubsText}"
500-
Command="{Binding AddTestModuleWithStubsCommand}"
501-
CommandParameter="{Binding SelectedItem}">
502-
<MenuItem.Icon>
503-
<Image Height="16" Source="{StaticResource AddTestModuleImage}" />
504-
</MenuItem.Icon>
505-
</MenuItem>
506499
</MenuItem>
507500
</Menu>
508501

Rubberduck.Core/UI/CodeExplorer/Commands/AddTestModuleWithStubsCommand.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,7 @@ public AddTestModuleWithStubsCommand(IVBE vbe, Command.AddTestModuleCommand newU
1919
_newUnitTestModuleCommand = newUnitTestModuleCommand;
2020
}
2121

22-
protected override bool EvaluateCanExecute(object parameter)
23-
{
24-
try
25-
{
26-
return GetDeclaration(parameter)?.Project != null || _vbe.ProjectsCount == 1;
27-
}
28-
catch (COMException)
29-
{
30-
return false;
31-
}
32-
}
22+
protected override bool EvaluateCanExecute(object parameter) => parameter is CodeExplorerComponentViewModel;
3323

3424
protected override void OnExecute(object parameter)
3525
{

Rubberduck.VBEEditor/SafeComWrappers/VB/Enums/ProjectTypes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace Rubberduck.VBEditor.SafeComWrappers
44
{
55
public static class ProjectTypes
66
{
7-
public static ProjectType[] All { get; } = { ProjectType.StandardExe, ProjectType.ActiveXExe, ProjectType.ActiveXControl, ProjectType.ActiveXControl, ProjectType.HostProject, ProjectType.StandAlone };
7+
public static ProjectType[] All { get; } = { ProjectType.StandardExe, ProjectType.ActiveXExe, ProjectType.ActiveXDll, ProjectType.ActiveXControl, ProjectType.HostProject, ProjectType.StandAlone };
88

9-
public static ProjectType[] VB6 { get; } = { ProjectType.StandardExe, ProjectType.ActiveXExe, ProjectType.ActiveXControl, ProjectType.ActiveXControl };
9+
public static ProjectType[] VB6 { get; } = { ProjectType.StandardExe, ProjectType.ActiveXExe, ProjectType.ActiveXDll, ProjectType.ActiveXControl };
1010

1111
public static ProjectType[] VBA { get; } = { ProjectType.HostProject, ProjectType.StandAlone };
1212
}

0 commit comments

Comments
 (0)