Esempio n. 1
0
        public PushHandlerApiServerForTest(HgRepository repo, ProgressForTest progress)
        {
            const string identifier = "PushHandlerApiServerForTest";

            _localStorage          = new TemporaryFolder(identifier);
            _repo                  = repo;
            _progress              = progress;
            Host                   = identifier;
            ProjectId              = "SampleProject";
            _executeCount          = 0;
            _failCount             = -1;
            _cancelCount           = -1;
            _timeoutList           = new List <int>();
            _serverUnavailableList = new List <ServerUnavailableResponse>();
        }
Esempio n. 2
0
        public PullHandlerApiServerForTest(HgRepository repo, ProgressForTest progress)
        {
            const string identifier = "PullHandlerApiServerForTest";

            _storageFolder         = new TemporaryFolder(identifier);
            _repo                  = repo;
            _progress              = progress;
            _helper                = new PushStorageManager(_storageFolder.Path, "randomHash");
            Host                   = identifier;
            ProjectId              = "SampleProject";
            _executeCount          = 0;
            _failCount             = -1;
            _timeoutList           = new List <int>();
            _serverUnavailableList = new List <ServerUnavailableResponse>();
            OriginalTip            = "";
        }
Esempio n. 3
0
        public TestEnvironment(string testName, ApiServerType type)
        {
            Local    = new RepositorySetup(testName + "-local");
            Remote   = new RepositorySetup(testName + "-remote");
            Progress = new ProgressForTest();
            switch (type)
            {
            case ApiServerType.Dummy:
                ApiServer = new DummyApiServerForTest(testName);
                break;

            case ApiServerType.Pull:
                ApiServer = new PullHandlerApiServerForTest(Remote.Repository, Progress);
                break;

            case ApiServerType.Push:
                ApiServer = new PushHandlerApiServerForTest(Remote.Repository, Progress);
                break;
            }
            Label         = testName;
            MultiProgress = new MultiProgress(new IProgress[] { new ConsoleProgress {
                                                                    ShowVerbose = true
                                                                }, Progress });
        }
Esempio n. 4
0
 public TestEnvironment(string testName, ApiServerType type)
 {
     Local = new RepositorySetup(testName + "-local");
     Remote = new RepositorySetup(testName + "-remote");
     Progress = new ProgressForTest();
     switch (type)
     {
         case ApiServerType.Dummy:
             ApiServer = new DummyApiServerForTest(testName);
             break;
         case ApiServerType.Pull:
             ApiServer = new PullHandlerApiServerForTest(Remote.Repository, Progress);
             break;
         case ApiServerType.Push:
             ApiServer = new PushHandlerApiServerForTest(Remote.Repository, Progress);
             break;
     }
     Label = testName;
     MultiProgress = new MultiProgress(new IProgress[] { new ConsoleProgress { ShowVerbose = true }, Progress });
 }
Esempio n. 5
0
 public PushHandlerApiServerForTest(HgRepository repo, ProgressForTest progress)
 {
     const string identifier = "PushHandlerApiServerForTest";
     _localStorage = new TemporaryFolder(identifier);
     _repo = repo;
     _progress = progress;
     Host = identifier;
     ProjectId = "SampleProject";
     _executeCount = 0;
     _failCount = -1;
     _cancelCount = -1;
     _timeoutList = new List<int>();
     _serverUnavailableList = new List<ServerUnavailableResponse>();
 }
Esempio n. 6
0
 public PullHandlerApiServerForTest(HgRepository repo, ProgressForTest progress)
 {
     const string identifier = "PullHandlerApiServerForTest";
     _storageFolder = new TemporaryFolder(identifier);
     _repo = repo;
     _progress = progress;
     _helper = new PushStorageManager(_storageFolder.Path, "randomHash");
     Host = identifier;
     ProjectId = "SampleProject";
     _executeCount = 0;
     _failCount = -1;
     _timeoutList = new List<int>();
     _serverUnavailableList = new List<ServerUnavailableResponse>();
     OriginalTip = "";
 }