public void WhenNullIgnorePatterns_ShouldNotThrowException()
        {
            // arrange
            var repoPath = TestRepoPath("git-test-operations");
            var sut      = new SourceControlAnalysisBuilder()
                           .WithPath(repoPath)
                           .WithIgnorePatterns(null);

            // act
            // assert
            Assert.DoesNotThrow(() => sut.Build());
        }
        public void WhenPathNotValidGitRepo_ShouldThrowException()
        {
            // arrange
            var repoPath = "x:\\invalid_repo";
            var builder  = new SourceControlAnalysisBuilder()
                           .WithPath(repoPath);
            // act
            var actual = Assert.Throws <Exception>(() => builder.Build());
            // assert
            var expected = "Invalid path [x:\\invalid_repo]";

            actual.Message.Should().Be(expected);
        }
        public void WhenNullIgnorePatterns_ShouldNotThrowException()
        {
            // arrange
            var context = new RepositoryTestDataBuilder()
                          .After_Init_Commit_To_Master()
                          .Build();
            var sut = new SourceControlAnalysisBuilder()
                      .WithPath(context.Path)
                      .WithIgnorePatterns(null);

            // act
            // assert
            Assert.DoesNotThrow(() => sut.Build());
        }
        public void WhenInvalidBranch_ShouldReturnDeveloperList()
        {
            // arrange
            var context = new RepositoryTestDataBuilder()
                          .Build();

            var sut = new SourceControlAnalysisBuilder()
                      .WithPath(context.Path)
                      .WithRange(DateTime.Parse("2018-06-25"), DateTime.Parse("2018-07-09"))
                      .WithBranch("--Never-Existed--");
            // act
            var actual = Assert.Throws <Exception>(() => sut.Build());

            // assert
            actual.Message.Should().Be("Invalid branch [--Never-Existed--]");
        }