Skip to content

Commit

Permalink
Tests are important
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasblunck authored Nov 7, 2024
1 parent bf59cea commit 839dcaa
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
26 changes: 26 additions & 0 deletions CustomerApp.Test/CustomerListExtension.test.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codeunit 50000 "HelloWorld Test"
{
Subtype = Test;

[Test]
[HandlerFunctions('HelloWorldMessageHandler')]
procedure TestHelloWorldMessage()
var
CustList: TestPage "Customer List";
begin
CustList.OpenView();
CustList.Close();
if (not MessageDisplayed) then
ERROR('Message was not displayed!');
end;

[MessageHandler]
procedure HelloWorldMessageHandler(Message: Text[1024])
begin
MessageDisplayed := MessageDisplayed or (Message = 'App published: Hello AL-Go!');
end;

var
MessageDisplayed: Boolean;
}

45 changes: 45 additions & 0 deletions CustomerApp.Test/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "95243812-3ac9-4456-86aa-129f8df55db0",
"name": "CustomerApp.Test",
"publisher": "Jonas",
"version": "1.0.0.0",
"brief": "",
"description": "",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"dependencies": [
{
"publisher": "Microsoft",
"name": "Library Assert",
"id": "dd0be2ea-f733-4d65-bb34-a28f4624fb14",
"version": "22.0.0.0"
},
{
"publisher": "Microsoft",
"name": "Any",
"id": "e7320ebb-08b3-4406-b1ec-b4927d3e280b",
"version": "22.0.0.0"
}
],
"screenshots": [],
"platform": "1.0.0.0",
"application": "22.0.0.0",
"idRanges": [
{
"from": 50000,
"to": 99999
}
],
"features": [
"NoImplicitWith"
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
}
}

0 comments on commit 839dcaa

Please sign in to comment.