コード例 #1
0
 private void validateMockFileCreation(String schemaName) {
   Schema schema = SchemaParser.parse(schemaName);
   final String outputDirectory = schemaName.substring(0, schemaName.indexOf("."));
   Options options = createMockOptions(outputDirectory, "random");
   FileGenerator fileGenerator = new FileGenerator(options, schema);
   assertFiles(options, fileGenerator);
 }
コード例 #2
0
 private void validateFixedWidthMockFileCreation(String schemaName) throws IOException {
   int expectedMockLength = 148;
   Schema schema = SchemaParser.parse(schemaName);
   final String outputDirectory = schemaName.substring(0, schemaName.indexOf("."));
   Options options = createMockOptions(outputDirectory, "random");
   FileGenerator fileGenerator = new FileGenerator(options, schema);
   assertFiles(options, fileGenerator);
   assertRecordLength(options, expectedMockLength);
 }