예제 #1
0
        public void GitGetChangeSetReturnsNullIfIdDoesNotExist()
        {
            // Arrange
            using (TestRepository testRepository = GetRepository())
            {
                var gitRepo = new GitExeRepository(testRepository.Environment, new MockDeploymentSettingsManager(), NullTracerFactory.Instance);
                gitRepo.Initialize();

                // Act
                var changeset = gitRepo.GetChangeSet("does-not-exist");

                // Assert
                Assert.Null(changeset);
            }
        }
예제 #2
0
        public void GitRepoParsesCommitDetails(string id, ChangeSet expectedChangeset)
        {
            using (var testRepository = Git.Clone("Mvc3Application_NoSolution"))
            {
                // Arrange
                var gitRepo = new GitExeRepository(testRepository.Environment, new MockDeploymentSettingsManager(), NullTracerFactory.Instance);

                // Act
                var changeset = gitRepo.GetChangeSet(id);

                // Assert
                Assert.Equal(expectedChangeset.Id, changeset.Id);
                Assert.Equal(expectedChangeset.AuthorName, changeset.AuthorName);
                Assert.Equal(expectedChangeset.AuthorEmail, changeset.AuthorEmail);
                Assert.Equal(expectedChangeset.Message, changeset.Message.Trim());
                Assert.Equal(expectedChangeset.Timestamp, changeset.Timestamp);
            }
        }