public static class ZplAssert
Entry point of the semantic label assertions. ZplAssert.Label(zpl) renders the label once and returns a fluent LabelAssertions object; every assertion checks what the label prints (decoded barcodes, measured positions, compliance rules) and throws a ZplAssertionException with the element position, the ZPL line and an annotated image path when it fails.
Properties
| Property | Type | Description |
static Settings { get; } | ZplAssertSettings | Process-wide defaults (snapshot folder, failure images, exception adapter). Set them once, e.g. in a module initializer. |
Methods
| Method Signature | Returns | Description |
static # Label(string zpl, ZplTestOptions? options = default) | LabelAssertions | Starts assertions on ZPL code (all labels of the job; assertions apply to label 0 unless LabelAssertions.OnLabel selects another). zpl: ZPL II code (one or more ^XA…^XZ formats). · options: Resolution, label size, ^FN values …; null uses ZplAssert.Settings. · testName: Filled by the compiler: the calling test method, used to name failure images. · testFile: Filled by the compiler: the calling source file, used to find the snapshot folder. |
static # Label(Label label, ZplTestOptions? options = default) | LabelAssertions | Starts assertions on a label model (Label), converted with Label.ToZpl at the test resolution. |
static # LabelFile(string path, ZplTestOptions? options = default) | LabelAssertions | Starts assertions on a .zpl file or a label JSON file (Label.FromJson). |