@Test public void conversion() { DTCellValueUtilities.assertDTCellValue(type, provided, (final String value, final DataType.DataTypes dataType) -> assertTrue("Conversion error callback was called unexpectedly", hasConversionError)); assertEquals(expectedDataType, provided.getDataType()); assertEquals(expectedValue, extractValue(provided)); }
public static void assertDTCellValue(final String type, final DTCellValue52 dcv, final ConversionErrorCallback callback) { if (dcv == null) { return; } final DataType.DataTypes dataType = convertToTypeSafeType(type); if (dataType.equals(dcv.getDataType())) { return; } switch (dcv.getDataType()) { case NUMERIC: convertDTCellValueFromNumeric(dataType, dcv); break; default: convertDTCellValueFromString(dataType, dcv, callback); } }
DTCellValueUtilities { public static void assertDTCellValue(final String type, final DTCellValue52 dcv, final ConversionErrorCallback callback) { if (dcv == null) { return; } final DataType.DataTypes dataType = convertToTypeSafeType(type); if (dataType.equals(dcv.getDataType())) { return; } switch (dcv.getDataType()) { case NUMERIC: convertDTCellValueFromNumeric(dataType, dcv); break; default: convertDTCellValueFromString(dataType, dcv, callback); } } }
DTCellValueUtilities { public static void assertDTCellValue(final String type, final DTCellValue52 dcv, final ConversionErrorCallback callback) { if (dcv == null) { return; } final DataType.DataTypes dataType = convertToTypeSafeType(type); if (dataType.equals(dcv.getDataType())) { return; } switch (dcv.getDataType()) { case NUMERIC: convertDTCellValueFromNumeric(dataType, dcv); break; default: convertDTCellValueFromString(dataType, dcv, callback); } }  }
DTCellValueUtilities { public static void assertDTCellValue(final String type, final DTCellValue52 dcv, final ConversionErrorCallback callback) { if (dcv == null) { return; } final DataType.DataTypes dataType = convertToTypeSafeType(type); if (dataType.equals(dcv.getDataType())) { return; } switch (dcv.getDataType()) { case NUMERIC: convertDTCellValueFromNumeric(dataType, dcv); break; default: convertDTCellValueFromString(dataType, dcv, callback); } }  static void assertDTCellValue(final String type,
                                         final DTCellValue52 dcv,
                                         final ConversionErrorCallback callback); }
DTCellValueUtilities { public static void assertDTCellValue(final String type, final DTCellValue52 dcv, final ConversionErrorCallback callback) { if (dcv == null) { return; } final DataType.DataTypes dataType = convertToTypeSafeType(type); if (dataType.equals(dcv.getDataType())) { return; } switch (dcv.getDataType()) { case NUMERIC: convertDTCellValueFromNumeric(dataType, dcv); break; default: convertDTCellValueFromString(dataType, dcv, callback); } }  static void assertDTCellValue(final String type,
                                         final DTCellValue52 dcv,
                                         final ConversionErrorCallback callback);  }