public void OnEnableVersionControl_WithRepoNoProjectId_InitializesRepository() { TestableGitProxy gitProxy = new TestableGitProxy(); TestableCollabVersionControl collabVersionControl = new TestableCollabVersionControl(gitProxy); collabVersionControl.OnEnableVersionControl(); Assert.That(gitProxy.InitializeRepositoryCount == 1); }
public void JsProxyClient_WhenJobRunningCalled_ReturnsVersionControlIsJobRunning(bool jobIsRunning) { TestableGitProxy gitProxy = new TestableGitProxy(); TestableCollabVersionControl collabVersionControlMock = new TestableCollabVersionControl(gitProxy); collabVersionControlMock.IsJobRunningReturn = jobIsRunning; JsProxyClient jpc = new JsProxyClient(collabVersionControlMock); Assert.AreEqual(jobIsRunning, jpc.IsJobRunning()); }
public void OnEnableVersionControl_WithRepoNoProjectId_DoesNotSetRemoteOrigin() { TestableGitProxy gitProxy = new TestableGitProxy(); gitProxy.RepositoryExistsReturn = true; TestableCollabVersionControl collabVersionControl = new TestableCollabVersionControl(gitProxy); collabVersionControl.OnEnableVersionControl(); Assert.That(gitProxy.SetRemoteOriginCount == 0); }
public void OnEnableVersionControl_WithNoRepoWithProjectId_SetsCurrentHead() { TestableGitProxy gitProxy = new TestableGitProxy(); gitProxy.RepositoryExistsReturn = false; TestableCollabVersionControl collabVersionControl = new TestableCollabVersionControl(gitProxy); collabVersionControl.ProjectId = "anything"; collabVersionControl.BaseUrl = "https://bestsiteever.com"; collabVersionControl.OnEnableVersionControl(); Assert.That(gitProxy.SetRemoteOriginCount == 1); }
public void OnEnableVersionControl_WithNoRepoWithProjectId_CallsOnFileSystemChanged() { TestableGitProxy gitProxy = new TestableGitProxy(); gitProxy.RepositoryExistsReturn = false; TestableCollabVersionControl collabVersionControl = new TestableCollabVersionControl(gitProxy); collabVersionControl.ProjectId = "anything"; collabVersionControl.BaseUrl = "http://bestsiteever.com"; collabVersionControl.OnEnableVersionControl(); Assert.AreEqual(true, collabVersionControl.OnFileSystemChangedCalled); }