public void FiFiRunner_New_Returns_New_Session_Every_Time() { var expected = FiFiRunner.New(); var actual = FiFiRunner.New(); Assert.NotSame(expected, actual); }
static void Main(string[] args) { string dir = string.Empty; if (args.Length == 0) { dir = "/Users/sdhaksh5/trunk/Application/Loader/Loader.Shell/"; Console.WriteLine("Enter directory path"); } dir = args[0].Trim(); if (!Directory.Exists(dir)) { Console.WriteLine("Directory does't exist"); } var fileSources = FileSources.New() .Add(dir, "*.sql"); var result = FiFiRunner.New() .FixEncoding(Encoding.UTF8) .FixInvalidCharacters() .FixLineEndings(LineEndingMode.Windows) .ForFiles(fileSources) .Run(); var failures = result.Failures(); Console.WriteLine(result.ConsoleResult); }
public void FiFiRunner_New_Initializes_State_Properly() { var runner = FiFiRunner.New(); Assert.NotNull(runner.GetConfig()); Assert.NotNull(runner.GetFiles()); Assert.Empty(runner.GetFiles().All()); }
public void FiFiRunner_FixEncoding_Returns_ConfigCorrectly (Encoding expected) { var runner = FiFiRunner.New(); var config = runner .FixEncoding(expected) .GetConfig(); Assert.Equal(expected, config.Encoding); }
public void FiFiRunner_FixLineEndings_Returns_Config_Correctly (LineEndingMode expected) { var runner = FiFiRunner.New(); var config = runner .FixLineEndings(expected) .GetConfig(); Assert.Equal(expected, config.LineEnding); }