public void BeforeEach() { _replacements = new Dictionary <string, string> { { ReplacementsKeys.ProjectNameKey, DefaultProjectName }, { ReplacementsKeys.DestinationDirectoryKey, DefaultDestinationDirectory }, { ReplacementsKeys.SolutionDirectoryKey, DefaultSolutionDirectory } }; _customParams = new object[] { DefaultSelectorTemplatePath }; _promptResult = new TemplateChooserViewModelResult( DefaultProjectId, DefaultFrameworkType, AspNetVersion.AspNetCore10, DefaultAppType); _promptUserMock = new Mock <Func <string, TemplateChooserViewModelResult> >(); _promptUserMock.Setup(p => p(It.IsAny <string>())).Returns(() => _promptResult); _cleanupDirectoriesMock = new Mock <Action <Dictionary <string, string> > >(); _objectUnderTest = new GoogleProjectTemplateSelectorWizard { CleanupDirectories = _cleanupDirectoriesMock.Object, PromptUser = _promptUserMock.Object }; _dteMock = new Mock <DTE>(); Guid guidService = typeof(SVsSolution).GUID; Guid uuid = typeof(IUnknown).GUID; _newHierarchy = Mock.Of <IVsHierarchy>(); _solutionMock = new Mock <IVsSolution6>(); _solutionMock.Setup( s => s.AddNewProjectFromTemplate( It.IsAny <string>(), It.IsAny <Array>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <IVsHierarchy>(), out _newHierarchy)) .Returns(VSConstants.S_OK); IntPtr mockedSolutionPtr = Marshal.GetIUnknownForObject(_solutionMock.Object); _dteMock.As <IServiceProvider>().Setup( sp => sp.QueryService(ref guidService, ref uuid, out mockedSolutionPtr)); _newCustomParams = new Dictionary <string, string> { { ReplacementsKeys.GcpProjectIdKey, DefaultProjectId }, { ReplacementsKeys.SolutionDirectoryKey, DefaultSolutionDirectory }, { ReplacementsKeys.PackagesPathKey, @"..\packages\" } }; }