public void CreatingNotesFile_WithNullNotesFile_ThrowsArgumentNullException()
        {
            // Arrange
            string notesFile = null;
            var    contents  = new Mock <IEnumerable <string> >();

            // Act
            void CreateNotesFile() => FileFunctionality.CreateNotesFile(notesFile, contents.Object);

            // Assert
            Assert.ThrowsException <ArgumentNullException>((Action)CreateNotesFile);
        }
        public void CreatingNotesFile_WithNullContents_ThrowsArgumentNullException()
        {
            // Arrange
            IEnumerable <string> contents = null;
            string notesFile = "test";

            // Act
            void CreateNotesFile() => FileFunctionality.CreateNotesFile(notesFile, contents);

            // Assert
            Assert.ThrowsException <ArgumentNullException>((Action)CreateNotesFile);
        }
        protected override void OnStart(string[] args)
        {
            var branch = ConfigurationManager.AppSettings["Branch"];
            var file   = ConfigurationManager.AppSettings["StandupNotesFile"];
            var repo   = new Repository(ConfigurationManager.AppSettings["GitRepositoryDirectory"]);

            // Delete yesterday's notes.
            File.Delete(file);

            var commits = GitFunctionality.GetFilteredCommitLog(repo, branch);

            FileFunctionality.CreateNotesFile(file, FileFunctionality.CreateNotesContent(repo, commits));
        }