예제 #1
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();
            _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;
        }
예제 #2
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;
        }