public void DirectoryInfo_WithValidPath_Conversion()
        {
            // Arrange
            IConverter converter = new FileSystemInfoConverter();
            var value = @"C:\temp\file.txt";

            // Act
            var actual = converter.Convert(value, typeof(DirectoryInfo));

            // Assert
            Assert.NotNull(actual);
            Assert.IsType<DirectoryInfo>(actual);
            Assert.Equal(value, ((DirectoryInfo)actual).FullName);
        }
        public void FileInfo_WithInValidPath_Conversion()
        {
            // Arrange
            IConverter converter = new FileSystemInfoConverter();
            var value = "Hello:world";
            var expectedType = typeof (FileInfo);
            var expectedExceptionMessage = Constants.ExceptionMessages.FormatConverterUnableConvert(value, expectedType);
            var expectedInnerExceptionMessage = "The given path's format is not supported.";

            // Act
            using (new LangageSwitcher("en-us"))
            {
                var actualException = Assert.Throws<CommandLineParserException>(() => converter.Convert(value, expectedType));

                // Assert
                Assert.Equal(expectedExceptionMessage, actualException.Message);
                Assert.NotNull(actualException.InnerException);
                var actualInnerExecption = Assert.IsAssignableFrom<NotSupportedException>(actualException.InnerException);
                Assert.Equal(expectedInnerExceptionMessage, actualInnerExecption.Message);
            }
        }