You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (int idx = 0; idx < sampleData.size(); idx++) {
R row = rows.get(idx);
for (Field column : fields) {
String columnName = column.getName();
if (column.getType() == String.class) {
assertEquals(column.get(sampleData.get(idx)), zFrameSortedDesc.getAsString(row, columnName),
"value in ZFrame and sample input is not same");
} else if (column.getType() == Integer.class) {
assertEquals(column.get(sampleData.get(idx)), zFrameSortedDesc.getAsInt(row, columnName),
"value in ZFrame and sample input is not same");
} else if (column.getType() == Double.class) {
assertEquals(column.get(sampleData.get(idx)), zFrameSortedDesc.getAsDouble(row, columnName),
"value in ZFrame and sample input is not same");
} else if (column.getType() == Long.class) {
assertEquals(column.get(sampleData.get(idx)), zFrameSortedDesc.getAsLong(row, columnName),
"value in ZFrame and sample input is not same");
} else {
throw new Exception("Not a valid data type");
}
}
}
AND
for (Person schema : sampleDataWithDistinctSurnameAndPostCode) {
for (R row : rows) {
boolean rowMatched = true;
for (Field column : fields) {
String columnName = column.getName();
if (!column.get(schema).toString().
equals(zFrame.getAsString(row, columnName))) {
rowMatched = false;
break;
}
}
if (rowMatched) {
matchedCount++;
break;
}
}
}
assertEquals(rows.size(), matchedCount,
"rows count is not as expected");
assertEquals(sampleDataWithDistinctSurnameAndPostCode.size(), matchedCount,
"rows count is not as expected");
The text was updated successfully, but these errors were encountered:
Duplicate code like
AND
The text was updated successfully, but these errors were encountered: