@ExtDirectMethod public String method12(Row aRow) { assertThat(aRow).isNotNull(); assertThat(aRow.getId()).isEqualTo(104); assertThat(aRow.getName()).isEqualTo("myRow"); assertThat(aRow.isAdmin()).isEqualTo(true); assertThat(aRow.getSalary().toPlainString()).isEqualTo("100.45"); return aRow.toString(); }
@ExtDirectMethod(value = ExtDirectMethodType.SIMPLE_NAMED, group = "named") public String method9(Row aRow) { assertThat(aRow).isNotNull(); assertThat(aRow.getId()).isEqualTo(104); assertThat(aRow.getName()).isEqualTo("myRow"); assertThat(aRow.isAdmin()).isEqualTo(true); assertThat(aRow.getSalary().toPlainString()).isEqualTo("100.45"); return aRow.toString(); }
/** Returns a DbUnit FlatXmlDataSet string representation of the data set. */ @SuppressWarnings( "PMD.InsufficientStringBufferDeclaration") // test method doesn't need performance // optimization yet public String toString() { StringBuffer dataSet = new StringBuffer(); dataSet.append("<dataset>\n"); for (Row row : this.rows) { dataSet.append(row.toString()); } dataSet.append("</dataset>"); return dataSet.toString(); }
/** * Используется в целях отладки. * * @return описание структуры данной области. */ public String dumpStructure() { final StringBuilder buf = new StringBuilder(2048); buf.append("=== template area: rows=") .append(rows.size()) .append(", regions=") .append(regions.size()) .append(" ===\n"); for (Row row : rows) { buf.append(row != null ? row.toString() : "<empty>\n"); } buf.append("=== end of template area ===\n"); return buf.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("{"); sb.append(super.toString()); sb.append("\n"); for (Row<T> row : this) { sb.append("\t"); sb.append(row.toString()); sb.append("\n"); } sb.append("}"); return sb.toString(); }
public void testBasicRow() throws NamingException, SQLException { BasicTable table = (BasicTable) populatedSchema.getTables().getByName("Test_Three"); DatabaseConnValueContext dbvc = new BasicDatabaseConnValueContext(); dbvc.setConnectionProvider(TestUtils.getConnProvider(this.getClass().getPackage().getName())); dbvc.setDefaultDataSource(this.getClass().getPackage().getName()); ConnectionContext cc = dbvc.getConnection(this.getClass().getPackage().getName(), true); Row initialRow = table.createRow(); QueryDefnSelect query = table.getAccessorByColumnEquality(table.getColumns().getByName("column_a")); QueryResultSet qrs = query.execute(dbvc, new Object[] {"abc"}, false); ResultSet rs = qrs.getResultSet(); if (rs.next()) initialRow.getColumnValues().populateValues(rs, 1); assertNotNull(initialRow.toString()); qrs.close(true); }