CE-604 Let a customizer set a record label

This commit is contained in:
2023-11-02 14:32:53 -05:00
parent 9e3054381a
commit c58d8fd7de
2 changed files with 14 additions and 0 deletions

View File

@ -121,6 +121,12 @@ class QValueFormatterTest extends BaseTest
table = new QTableMetaData().withPrimaryKeyField("id");
assertEquals("42", QValueFormatter.formatRecordLabel(table, new QRecord().withValue("id", 42)));
///////////////////////////////////////////////////////////////////////////////////////
// exceptional flow: no recordLabelFormat specified, and record already had a label //
///////////////////////////////////////////////////////////////////////////////////////
table = new QTableMetaData().withPrimaryKeyField("id");
assertEquals("my label", QValueFormatter.formatRecordLabel(table, new QRecord().withRecordLabel("my label").withValue("id", 42)));
/////////////////////////////////////////////////
// exceptional flow: no fields for the format //
/////////////////////////////////////////////////