void GenerateFiles(int nbre) { Directory.CreateDirectory(path); RowGenerator <FilenameSchema> fileGen = new RowGenerator <FilenameSchema>(new RowGeneratorOptions <FilenameSchema>().GeneratorFor(r => r.Filename, r => ETLString.GetAsciiRandomString())); fileGen.NumberOfRowToGenerate = nbre; for (int i = 0; i < nbre; i++) { using (File.Create(Path.Combine(path, $"{fileGen.Generate().Filename}.txt"))) { } } }
public void GenerateRow_ExampeInput_ExpectedRow(string input, string expectedOutput) { var newRow = RowGenerator.Generate(input); Assert.AreEqual(expectedOutput, newRow); }