use of org.talend.dataprep.api.dataset.row.DataSetRow in project data-prep by Talend.
the class AbsoluteTest method testAbsoluteIntWithNonNumeric.
@Test
public void testAbsoluteIntWithNonNumeric() {
// given
final Map<String, String> values = new HashMap<>();
// $NON-NLS-1$
values.put(INT_COLUMN, "foobar");
final DataSetRow row = new DataSetRow(values);
assertInteger(row, "foobar");
}
use of org.talend.dataprep.api.dataset.row.DataSetRow in project data-prep by Talend.
the class AbsoluteTest method testAbsoluteIntWithPositiveInt.
@Test
public void testAbsoluteIntWithPositiveInt() {
// given
final Map<String, String> values = new HashMap<>();
// $NON-NLS-1$
values.put(INT_COLUMN, "42");
final DataSetRow row = new DataSetRow(values);
assertInteger(row, "42");
}
use of org.talend.dataprep.api.dataset.row.DataSetRow in project data-prep by Talend.
the class AbsoluteTest method testAbsoluteIntWithNegativeInt.
@Test
public void testAbsoluteIntWithNegativeInt() {
// given
final Map<String, String> values = new HashMap<>();
// $NON-NLS-1$
values.put(INT_COLUMN, "-542");
final DataSetRow row = new DataSetRow(values);
assertInteger(row, "542");
}
use of org.talend.dataprep.api.dataset.row.DataSetRow in project data-prep by Talend.
the class AbsoluteTest method testAbsoluteFloatWithPositiveFloat.
@Test
public void testAbsoluteFloatWithPositiveFloat() {
// given
final Map<String, String> values = new HashMap<>();
// $NON-NLS-1$
values.put(FLOAT_COLUMN, "5.42");
final DataSetRow row = new DataSetRow(values);
assertFloat(row, "5.42");
}
use of org.talend.dataprep.api.dataset.row.DataSetRow in project data-prep by Talend.
the class AbsoluteTest method testAbsoluteFloatWithNegativeScientific.
@Test
public void testAbsoluteFloatWithNegativeScientific() {
// given
final Map<String, String> values = new HashMap<>();
// $NON-NLS-1$
values.put(FLOAT_COLUMN, "-1.2E3");
final DataSetRow row = new DataSetRow(values);
assertFloat(row, "1200");
}
Aggregations