@Test public void testGetMutatorName(){ CodeGenConfig config = new CodeGenConfig(); WriterService service = new WriterService(config); DBTableColumn col = Mockito.mock(DBTableColumn.class); Mockito.when(col.getDataType()).thenReturn(DataType.DECIMAL); Mockito.when(col.getName()).thenReturn("name"); assertEquals("setName", service.getMutatorName(col)); }
public String getMutatorName(DBColumn column) { return deriveMutatorName(column.getName(), getJavaType(column)); }
WriterService { public String getMutatorName(DBColumn column) { return deriveMutatorName(column.getName(), getJavaType(column)); } }
WriterService { public String getMutatorName(DBColumn column) { return deriveMutatorName(column.getName(), getJavaType(column)); } WriterService(CodeGenConfig config); }
WriterService { public String getMutatorName(DBColumn column) { return deriveMutatorName(column.getName(), getJavaType(column)); } WriterService(CodeGenConfig config); String getTableName(DBTable t); String getViewName(DBView v); String getRowsetName(DBRowSet r); String getColumnName(DBColumn c); String getTableClassName(String tableName); String getViewClassName(String viewName); String getRecordClassName(String tableName); String getAccessorName(DBColumn column); String getMutatorName(DBColumn column); boolean hasBigDecimalField(DBTable table); boolean hasDateField(DBTable table); boolean hasLockingColumn(DBTable table); Class<?> getJavaType(DBColumn column); DataType getDataType(DBColumn c); }
WriterService { public String getMutatorName(DBColumn column) { return deriveMutatorName(column.getName(), getJavaType(column)); } WriterService(CodeGenConfig config); String getTableName(DBTable t); String getViewName(DBView v); String getRowsetName(DBRowSet r); String getColumnName(DBColumn c); String getTableClassName(String tableName); String getViewClassName(String viewName); String getRecordClassName(String tableName); String getAccessorName(DBColumn column); String getMutatorName(DBColumn column); boolean hasBigDecimalField(DBTable table); boolean hasDateField(DBTable table); boolean hasLockingColumn(DBTable table); Class<?> getJavaType(DBColumn column); DataType getDataType(DBColumn c);  }