11package com .codedifferently .lesson9 ;
22
3+ import com .codedifferently .lesson9 .dataprovider .DataProvider ;
4+ import com .codedifferently .lesson9 .generator .SampleFileGenerator ;
35import java .io .File ;
46import java .nio .file .Paths ;
57import java .util .List ;
6-
78import org .springframework .beans .factory .annotation .Autowired ;
89import org .springframework .boot .CommandLineRunner ;
910import org .springframework .boot .SpringApplication ;
1011import org .springframework .boot .autoconfigure .SpringBootApplication ;
1112import org .springframework .context .annotation .Configuration ;
1213
13- import com .codedifferently .lesson9 .dataprovider .DataProvider ;
14- import com .codedifferently .lesson9 .generator .SampleFileGenerator ;
15-
1614@ Configuration
1715@ SpringBootApplication (scanBasePackages = "com.codedifferently" )
1816public class Lesson9 implements CommandLineRunner {
19- @ Autowired private List <DataProvider > dataProviders ;
17+ @ Autowired private List <DataProvider > dataProviders ;
2018
2119 public static void main (String [] args ) {
2220 var application = new SpringApplication (Lesson9 .class );
@@ -33,25 +31,22 @@ public void run(String... args) throws Exception {
3331 throw new IllegalArgumentException ("Provider name is required" );
3432 }
3533
36- //if the providerName is equal to '-bulk'
34+ // if the providerName is equal to '-bulk'
3735 // go through every dataprovider we have and run this code below using their provider name
3836 // example files for usage - each provider file (to get their name)
3937 // String path = getDataPath();
4038 // var fileGenerator = new SampleFileGenerator();
4139 // fileGenerator.createTestFile(path, providerName);
42-
43- if (providerName .equals ("-bulk" )){
44- for (DataProvider provider : dataProviders ) {
40+
41+ if (providerName .equals ("-bulk" )) {
42+ for (DataProvider provider : dataProviders ) {
4543 String path = getDataPath ();
4644 var fileGenerator = new SampleFileGenerator ();
4745 fileGenerator .createTestFile (path , provider .getProviderName ());
4846 }
4947 return ;
5048 }
5149
52-
53-
54-
5550 String path = getDataPath ();
5651 var fileGenerator = new SampleFileGenerator ();
5752 fileGenerator .createTestFile (path , providerName );
0 commit comments