Interpreter Test Reference — Records
These tests verify record operations: filtering by field type, sorting, the record method surface (transfer, captions, filters, range bounds, keys, system id), Validate semantics, and the native rules for Get and Clear. Record tests read the Customer table, so they expect a company with demo data.
Test List
| Test | What it verifies |
|---|---|
RecordFilterTypeTests |
SetRange per field type (Integer/Code/Text/Date/Boolean/Option and clearing a filter), SetFilter with patterns and placeholders, FilterGroup, Copy/Reset, and IsEmpty/Count on an empty set. |
RecordValidateCurrentValueTests |
Validate(Field) with no value validates the field's current value (running the trigger — e.g. populating Search Name), and the two-argument Validate(Field, value) assigns and validates. (Audit spec.) |
RecordSurfaceBuiltinTests |
The broader record surface: TransferFields (with and without the primary key), FieldCaption/TableCaption, SetRecFilter/GetFilters, GetRangeMin/GetRangeMax, SetCurrentKey (sort order, keeps filters, multiple/quoted fields), Ascending (getter default and descending setter, surviving a key change), GetBySystemId/RecordId, TestField (with expected value), and FieldError. |
RecordGetIgnoresFiltersTests |
Record.Get ignores active filters — a record excluded by a SetRange filter is still found by Get. (Audit spec.) |
ClearRecordResetsFiltersTests |
Clear(Record) removes filters as well as resetting field values, matching native AL — a filtered-to-empty record returns to its full count after Clear. (Audit spec.) |
TemporaryRecordNativeMirrorTests |
The native temporary-record semantics the interpreter must reproduce: IsTemporary, in-memory isolation from the database, filters over the temp dataset, Clear keeping both the temporary state and the rows (only DeleteAll empties it), and SetCurrentKey/Ascending sorting the in-memory dataset by a non-key field. Native-mirrored. |
TemporaryRecordScriptTests |
Temporary records in scripts: the temporary marker and IsTemporary, in-memory writes invisible to the database, Get/Modify/Delete/DeleteAll on the dataset, Clear keeping the data, independent procedure-local datasets, var temporary parameters sharing the dataset (and a database record rejected for a var temporary parameter), by-value temporary parameters, SetCurrentKey/Ascending, and that temporary is not a reserved word. |