@Test void convert_to_unknown_type__throws_exception() { DataTable table = parse("", "| ♘ |" ); CucumberDataTableException exception = assertThrows( CucumberDataTableException.class, () -> converter.convert(table, Piece.class)); assertThat(exception.getMessage(), is("" + "Can't convert DataTable to io.cucumber.datatable.DataTableTypeRegistryTableConverterTest$Piece.\n" + "Please review these problems:\n" + "\n" + " - There was no table entry or table row transformer registered for io.cucumber.datatable.DataTableTypeRegistryTableConverterTest$Piece.\n" + " Please consider registering a table entry or row transformer.\n" + "\n" + " - There was no table cell transformer registered for io.cucumber.datatable.DataTableTypeRegistryTableConverterTest$Piece.\n" + " Please consider registering a table cell transformer.\n" + "\n" + " - There was no default table cell transformer registered to transform io.cucumber.datatable.DataTableTypeRegistryTableConverterTest$Piece.\n" + " Please consider registering a default table cell transformer.\n" + "\n" + "Note: Usually solving one is enough")); }
@Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); @Override T convert(DataTable dataTable, Type type); @Override @SuppressWarnings("unchecked") T convert(DataTable dataTable, Type type, boolean transposed); @Override List<T> toList(DataTable dataTable, Type itemType); @Override @SuppressWarnings("unchecked") List<List<T>> toLists(DataTable dataTable, Type itemType); @Override Map<K, V> toMap(DataTable dataTable, Type keyType, Type valueType); @Override @SuppressWarnings("unchecked") List<Map<K, V>> toMaps(DataTable dataTable, Type keyType, Type valueType); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); @Override T convert(DataTable dataTable, Type type); @Override @SuppressWarnings("unchecked") T convert(DataTable dataTable, Type type, boolean transposed); @Override List<T> toList(DataTable dataTable, Type itemType); @Override @SuppressWarnings("unchecked") List<List<T>> toLists(DataTable dataTable, Type itemType); @Override Map<K, V> toMap(DataTable dataTable, Type keyType, Type valueType); @Override @SuppressWarnings("unchecked") List<Map<K, V>> toMaps(DataTable dataTable, Type keyType, Type valueType);  }