@Test(expected = MojoExecutionException.class) public void testValidateDbName_NULL() throws Exception { System.out.println("testValidateDbName_NULL"); Generator instance = new Generator(); instance.dbName = null; instance.validateDbName(); }
protected void validateDbName() throws MojoExecutionException { if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) { throw new MojoExecutionException("EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: " + DBNAME_PATTERN); } else { if (dbName.length() > 16) { dbName = dbName.substring(0, 15); } } }
Generator extends AbstractMojo { protected void validateDbName() throws MojoExecutionException { if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) { throw new MojoExecutionException("EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: " + DBNAME_PATTERN); } else { if (dbName.length() > 16) { dbName = dbName.substring(0, 15); } } } }
Generator extends AbstractMojo { protected void validateDbName() throws MojoExecutionException { if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) { throw new MojoExecutionException("EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: " + DBNAME_PATTERN); } else { if (dbName.length() > 16) { dbName = dbName.substring(0, 15); } } }  }
Generator extends AbstractMojo { protected void validateDbName() throws MojoExecutionException { if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) { throw new MojoExecutionException("EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: " + DBNAME_PATTERN); } else { if (dbName.length() > 16) { dbName = dbName.substring(0, 15); } } }  void execute(); }
Generator extends AbstractMojo { protected void validateDbName() throws MojoExecutionException { if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) { throw new MojoExecutionException("EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: " + DBNAME_PATTERN); } else { if (dbName.length() > 16) { dbName = dbName.substring(0, 15); } } }  void execute();  }