---
title: "Codeunit 130002 Library Assert"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/130002-library-assert/
type: codeunit
id: 130002
name: "Library Assert"
app: "Library Assert"
namespace: System.TestLibraries.Utilities
versions: "17-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/?v=24 https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/?v=25 https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/?v=26 https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/?v=27 https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/?v=28 https://jonas-paprotka.de/ref/codeunit/130002-library-assert/source/"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 130002 Library Assert

JOP-AL, https://jonas-paprotka.de/ref/codeunit/130002-library-assert/

| | |
| --- | --- |
| App | Library Assert |
| Namespace | System.TestLibraries.Utilities |
| Versions | 17-29 |
| Minors | W1 17.0-29.0; DE 17.0-29.0; US 17.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/130002-library-assert/editions.json) |
| Source file | src/LibraryAssert.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| IsTrue | (Condition: Boolean; Msg: Text) | - | public | 17-29 | - | - |
| IsFalse | (Condition: Boolean; Msg: Text) | - | public | 17-29 | - | - |
| AreEqual | (ExpectedVariant: Variant; ActualVariant: Variant; Msg: Text) | - | public | 17-29 | - | - |
| AreEqualDateTime | (Expected: DateTime; Actual: DateTime; Msg: Text) | - | public | 17-29 | - | - |
| AreNotEqual | (ExpectedVariant: Variant; ActualVariant: Variant; Msg: Text) | - | public | 17-29 | - | - |
| AreNearlyEqual | (Expected: Decimal; Actual: Decimal; Delta: Decimal; Msg: Text) | - | public | 17-29 | - | - |
| AreNotNearlyEqual | (Expected: Decimal; Actual: Decimal; Delta: Decimal; Msg: Text) | - | public | 17-29 | - | - |
| Fail | (Msg: Text) | - | public | 17-29 | - | - |
| RecordIsEmpty | (RecVariant: Variant) | - | public | 17-29 | - | - |
| RecordIsNotEmpty | (RecVariant: Variant) | - | public | 17-29 | - | - |
| TableIsEmpty | (TableNo: Integer) | - | public | 17-29 | - | - |
| TableIsNotEmpty | (TableNo: Integer) | - | public | 17-29 | - | - |
| RecordCount | (RecVariant: Variant; ExpectedCount: Integer) | - | public | 17-29 | - | - |
| KnownFailure | (Expected: Text; WorkItemNo: Integer) | - | public | 17-29 | - | - |
| ExpectedError | (Expected: Text) | - | public | 17-29 | - | - |
| ExpectedErrorCode | (Expected: Text) | - | public | 17-29 | - | - |
| ExpectedMessage | (Expected: Text; Actual: Text) | - | public | 17-29 | - | - |
| AssertRecordNotFound | () | - | public | 17-29 | - | - |
| AssertRecordAlreadyExists | () | - | public | 17-29 | - | - |
| AssertNothingInsideFilter | () | - | public | 17-29 | - | - |
| AssertNoFilter | () | - | public | 17-29 | - | - |
| AssertPrimRecordNotFound | () | - | public | 17-29 | - | - |
| AreEqual | (Expected: Dictionary of [Text, Text]; Actual: Dictionary of [Text, Text]) | - | public | 20-29 | - | - |
| AreEqualDateTime | (Expected: DateTime; Actual: DateTime; Delta: Duration; Msg: Text) | - | public | 23-29 | - | - |
| ExpectedConfirm | (Expected: Text; Actual: Text) | - | public | 29 | - | - |
| ExpectedStrMenu | (ExpectedInstruction: Text; ExpectedOptions: Text; ActualInstruction: Text; ActualOptions: Text) | - | public | 29 | - | - |
| ExpectedTestFieldError | (FieldCaptionTested: Text; ExpectedValue: Text) | - | public | 29 | - | - |
| ExpectedTestFieldError | (FieldCaptionTested: Text; ExpectedValue: Text; ActualValue: Text; TableCaptionTested: Text) | - | public | 29 | - | - |
| ExpectedTestFieldMessage | (LastErrorText: Text; FieldCaptionTested: Text; ExpectedValue: Text; ActualValue: Text; TableCaptionTested: Text) | - | public | 29 | - | - |
| MatchesTestFieldMessageFormat | (ErrorMessage: Text) | Boolean | internal | 29 | - | - |
| ExpectedErrorCannotFind | (TableID: Integer) | - | public | 29 | - | - |
| ExpectedErrorCannotFind | (TableID: Integer; RecordIndentificationText: Text) | - | public | 29 | - | - |
| ExpectedMessageCannotFind | (LastErrorText: Text; TableID: Integer; RecordIndentificationText: Text) | - | public | 29 | - | - |

## Source

Symbols: Microsoft.LibraryAssert.symbols.dd0be2ea-f733-4d65-bb34-a28f4624fb14, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 24: https://github.com/microsoft/BCApps, MIT, releases/24.x at fe14d3e6db00d28df3a69c7bba830813d70794e2.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 8fd089973d4be7f6224d0845f41bec221fdda7dc.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at ad459712441b2fe6cb0cf1c560563f8ec7188a93.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
