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

            if (fileExtension == null)
            {
                throw new ArgumentNullException(nameof(fileExtension));
            }

            if (rootDirectory == null)
            {
                throw new ArgumentNullException(nameof(rootDirectory));
            }

            var applicationDirectory = applicationConfiguration.GetDirectoryInfo(rootDirectory);
            var fileName             = applicationConfiguration.GetFileName(fileExtension);
            var filePath             = Path.Combine(applicationDirectory.FullName, fileName);

            return(filePath);
        }
 public void GetFileNameWithNullValueThrowsException(CmdApplicationConfiguration sut)
 {
     Assert.Throws <ArgumentNullException>(() => sut.GetFileName(null));
 }
        public void GetFileNameOnNullThrowsException()
        {
            CmdApplicationConfiguration sut = null;

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