Skip to content

Test Codeunit: PTE0007: Assertion function 'AssertError' must not be invoked. #2478

@richardrobberse

Description

@richardrobberse

Using the AssertError function in an AL test codeunit results in the following error:
PTE0007: Assertion function 'AssertError' must not be invoked.

PTE0007 says: Test assertion functions are not allowed in a non-test context.
So it looks like codeunits with SubType = Test are not recognized as a test context.

DockerImage: bcinsider.azurecr.io/bcsandbox-master:13.0.22070.0-nl
AL Lanuage: 0.15.14407

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions