private static TaintIssuesControlViewModel CreateTestSubject( IAnalysisIssueVisualization[] issueVizs = null, ILocationNavigator locationNavigator = null, Mock <ITaintStore> store = null, IActiveDocumentTracker activeDocumentTracker = null, IActiveDocumentLocator activeDocumentLocator = null, ITelemetryManager telemetryManager = null, IShowInBrowserService showInBrowserService = null, IIssueSelectionService selectionService = null) { issueVizs ??= Array.Empty <IAnalysisIssueVisualization>(); store ??= new Mock <ITaintStore>(); store.Setup(x => x.GetAll()).Returns(issueVizs); activeDocumentTracker ??= Mock.Of <IActiveDocumentTracker>(); activeDocumentLocator ??= Mock.Of <IActiveDocumentLocator>(); showInBrowserService ??= Mock.Of <IShowInBrowserService>(); locationNavigator ??= Mock.Of <ILocationNavigator>(); telemetryManager ??= Mock.Of <ITelemetryManager>(); selectionService ??= Mock.Of <IIssueSelectionService>(); return(new TaintIssuesControlViewModel(store.Object, locationNavigator, activeDocumentTracker, activeDocumentLocator, showInBrowserService, telemetryManager, selectionService)); }
public NavigateToRuleDescriptionCommand(IShowInBrowserService showInBrowserService) : base(parameter => { var ruleKey = (string)parameter; showInBrowserService.ShowRuleDescription(ruleKey); }, parameter => parameter is string s && !string.IsNullOrEmpty(s))
public NavigateToDocumentationCommand(IShowInBrowserService showInBrowserService) : base(parameter => showInBrowserService.ShowDocumentation()) { }
private NavigateToDocumentationCommand CreateTestSubject(IShowInBrowserService browserService = null) { return(new NavigateToDocumentationCommand(browserService)); }
private NavigateToRuleDescriptionCommand CreateTestSubject(IShowInBrowserService browserService = null) { return(new NavigateToRuleDescriptionCommand(browserService)); }