22
33import freemarker .template .TemplateException ;
44import org .apache .commons .io .FileUtils ;
5+ import org .junit .Before ;
56import org .junit .Test ;
7+ import org .ngbsn .generator .ModelGenerator ;
68import org .slf4j .Logger ;
79import org .slf4j .LoggerFactory ;
810
1618public class CodeGenTest {
1719 private static final Logger logger = LoggerFactory .getLogger (CodeGenTest .class );
1820
21+
22+ @ Before
23+ public void beforeTest (){
24+ ModelGenerator .clearTablesMap ();
25+ }
1926 @ Test
2027 public void testMySql () throws TemplateException , IOException {
21- logger .info ("Starting test " );
28+ logger .info ("Starting testMySql " );
2229 ClassLoader classLoader = getClass ().getClassLoader ();
2330 File file = new File (Objects .requireNonNull (classLoader .getResource ("sql/mysql.sql" )).getFile ());
2431 String sqlScript = FileUtils .readFileToString (file , StandardCharsets .UTF_8 );
@@ -28,7 +35,7 @@ public void testMySql() throws TemplateException, IOException {
2835
2936 @ Test
3037 public void testPostgres () throws TemplateException , IOException {
31- logger .info ("Starting test " );
38+ logger .info ("Starting testPostgres " );
3239 ClassLoader classLoader = getClass ().getClassLoader ();
3340 File file = new File (Objects .requireNonNull (classLoader .getResource ("sql/postgres.sql" )).getFile ());
3441 String sqlScript = FileUtils .readFileToString (file , StandardCharsets .UTF_8 );
0 commit comments