public void SetupTest()
        {
            _redirector              = new MockRedirector();
            _gitClient               = new MockGitClient();
            _gitHubClient            = new MockGitHubClient();
            _cutterClient            = new MockCookiecutterClient();
            _installedTemplateSource = new MockTemplateSource();
            _gitHubTemplateSource    = new MockTemplateSource();
            _feedTemplateSource      = new MockTemplateSource();
            _projectSystemClient     = new MockProjectSystemClient();

            var output = TestData.GetTempPath("Cookiecutter", true);
            var outputProjectFolder = Path.Combine(output, "project");

            _telemetry = new CookiecutterTelemetry(new TelemetryTestService());
            _vm        = new CookiecutterViewModel(
                _cutterClient,
                _gitHubClient,
                _gitClient,
                _telemetry,
                _redirector,
                _installedTemplateSource,
                _feedTemplateSource,
                _gitHubTemplateSource,
                null,
                _projectSystemClient
                );
            _vm.UserConfigFilePath = UserConfigFilePath;
            _vm.OutputFolderPath   = outputProjectFolder;
        }
        public void SetupTest()
        {
            _redirector = new MockRedirector();

            var output = TestData.GetTempPath("Cookiecutter", true);
            var outputProjectFolder = Path.Combine(output, "integration");
            var feedUrl             = new Uri(TestFeedPath);
            var installedPath       = TestInstalledTemplateFolderPath;
            var userConfigFilePath  = TestUserConfigFilePath;

            _gitClient               = GitClientProvider.Create(_redirector, null);
            _gitHubClient            = new GitHubClient();
            _cutterClient            = CookiecutterClientProvider.Create(null, _redirector);
            _telemetry               = new CookiecutterTelemetry(new TelemetryTestService());
            _installedTemplateSource = new LocalTemplateSource(installedPath, _gitClient);
            _gitHubTemplateSource    = new GitHubTemplateSource(_gitHubClient);
            _feedTemplateSource      = new FeedTemplateSource(feedUrl);
            _projectSystemClient     = new MockProjectSystemClient();

            _vm = new CookiecutterViewModel(
                _cutterClient,
                _gitHubClient,
                _gitClient,
                _telemetry,
                _redirector,
                _installedTemplateSource,
                _feedTemplateSource,
                _gitHubTemplateSource,
                ExecuteCommand,
                _projectSystemClient
                );

            _vm.UserConfigFilePath = userConfigFilePath;
            ((CookiecutterClient)_cutterClient).DefaultBasePath = outputProjectFolder;
        }
Example #3
0
        public void SetupTest() {
            _redirector = new MockRedirector();
            _gitClient = new MockGitClient();
            _gitHubClient = new MockGitHubClient();
            _cutterClient = new MockCookiecutterClient();
            _installedTemplateSource = new MockTemplateSource();
            _gitHubTemplateSource = new MockTemplateSource();
            _feedTemplateSource = new MockTemplateSource();

            var output = TestData.GetTempPath("Cookiecutter", true);
            var outputProjectFolder = Path.Combine(output, "project");

            _telemetry = new CookiecutterTelemetry(new TelemetryTestService());
            _vm = new CookiecutterViewModel(_cutterClient, _gitHubClient, _gitClient, _telemetry, _redirector, _installedTemplateSource, _feedTemplateSource, _gitHubTemplateSource, null, null);
            _vm.UserConfigFilePath = UserConfigFilePath;
            _vm.OutputFolderPath = outputProjectFolder;
        }
        public void SetupTest() {
            _redirector = new MockRedirector();

            var output = TestData.GetTempPath("Cookiecutter", true);
            var outputProjectFolder = Path.Combine(output, "integration");
            var feedUrl = new Uri(TestFeedPath);
            var installedPath = TestInstalledTemplateFolderPath;
            var userConfigFilePath = TestUserConfigFilePath;

            _gitClient = new GitClient(GitClient.RecommendedGitFilePath, _redirector);
            _gitHubClient = new GitHubClient();
            _cutterClient = CookiecutterClientProvider.Create(_redirector);
            _telemetry = new CookiecutterTelemetry(new TelemetryTestService());
            _installedTemplateSource = new LocalTemplateSource(installedPath, _gitClient);
            _gitHubTemplateSource = new GitHubTemplateSource(_gitHubClient);
            _feedTemplateSource = new FeedTemplateSource(feedUrl);

            _vm = new CookiecutterViewModel(_cutterClient, _gitHubClient, _gitClient, _telemetry, _redirector, _installedTemplateSource, _feedTemplateSource, _gitHubTemplateSource, OpenFolder);
            _vm.UserConfigFilePath = userConfigFilePath;
            _vm.OutputFolderPath = outputProjectFolder;
        }
Example #5
0
        public void SetupTest()
        {
            _redirector = new MockRedirector();

            var output = TestData.GetTempPath("Cookiecutter", true);
            var outputProjectFolder = Path.Combine(output, "integration");
            var feedUrl             = new Uri(TestFeedPath);
            var installedPath       = TestInstalledTemplateFolderPath;
            var userConfigFilePath  = TestUserConfigFilePath;

            _gitClient               = new GitClient(GitClient.RecommendedGitFilePath);
            _gitHubClient            = new GitHubClient();
            _cutterClient            = CookiecutterClientProvider.Create();
            _installedTemplateSource = new LocalTemplateSource(installedPath, _gitClient);
            _gitHubTemplateSource    = new GitHubTemplateSource(_gitHubClient);
            _feedTemplateSource      = new FeedTemplateSource(feedUrl);

            _vm = new CookiecutterViewModel(_cutterClient, _gitHubClient, _gitClient, _redirector, _installedTemplateSource, _feedTemplateSource, _gitHubTemplateSource, null);
            _vm.UserConfigFilePath = userConfigFilePath;
            _vm.OutputFolderPath   = outputProjectFolder;
        }