示例#1
0
        public void OnEnableVersionControl_WithRepoNoProjectId_DoesNotSetRemoteOrigin()
        {
            var gitProxy = new TestableGitProxy {
                RepositoryExistsReturn = true
            };
            var collabVersionControl = new TestableCollabVersionControl(gitProxy);

            collabVersionControl.OnEnableVersionControl();
            Assert.That(gitProxy.SetRemoteOriginCount == 0);
        }
示例#2
0
        public void OnEnableVersionControl_WithNoRepoWithProjectId_InitializesRepository()
        {
            var gitProxy             = new TestableGitProxy();
            var collabVersionControl = new TestableCollabVersionControl(gitProxy)
            {
                ProjectId = "anything"
            };

            collabVersionControl.OnEnableVersionControl();
            Assert.That(gitProxy.InitializeRepositoryCount == 1);
        }
示例#3
0
        public void OnEnableVersionControl_WithNoRepoWithProjectId_SetsCurrentHead()
        {
            var gitProxy = new TestableGitProxy {
                RepositoryExistsReturn = false
            };
            var collabVersionControl = new TestableCollabVersionControl(gitProxy)
            {
                ProjectId = "anything", BaseUrl = "https://bestsiteever.com"
            };

            collabVersionControl.OnEnableVersionControl();
            Assert.That(gitProxy.SetRemoteOriginCount == 1);
        }