public static DirectoryInfo GetDirectoryInfo(
            this CmdApplicationConfiguration applicationConfiguration,
            string rootDirectory)
        {
            if (applicationConfiguration == null)
            {
                throw new ArgumentNullException(nameof(applicationConfiguration));
            }

            return(new DirectoryInfo(Path.Combine(rootDirectory, applicationConfiguration.GetDirectoryName()))
                   .CreateIfDoesNotExists());
        }
        public void GetDirectoryOnNullThrowsException()
        {
            CmdApplicationConfiguration sut = null;

            Assert.Throws <ArgumentNullException>(() => sut.GetDirectoryName());
        }