generated from microsoft/AL-Go-PTE
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from NovoaDev/30-test-temporarytablestest
- Loading branch information
Showing
29 changed files
with
1,169 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
/// <summary> | ||
/// permissionset DepGraphTest_ANJ (ID 99990). | ||
/// </summary> | ||
permissionset 99990 DepGraphTest_ANJ | ||
{ | ||
Access = Public; | ||
Assignable = true; | ||
Permissions = codeunit GenerateFiguresTest_ANJ = X, | ||
codeunit GraphAndMarkdownTest_ANJ = X, | ||
Permissions = codeunit ExpectedValues_ANJ = X, | ||
codeunit FillingProTablesMock_ANJ = X, | ||
codeunit GenerateFiguresTest_ANJ = X, | ||
codeunit NumberSequenceTest_ANJ = X, | ||
codeunit TemporaryTablesTest_ANJ = X; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
44 changes: 44 additions & 0 deletions
44
Dependency-Graph.Test/src/Test/ExpectedValuesANJ.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/// <summary> | ||
/// Codeunit ExpectedValues_ANJ (ID 99994). | ||
/// </summary> | ||
codeunit 99994 ExpectedValues_ANJ | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetExpectedMarkdownText. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
procedure GetExpectedMarkdownText(): Text; | ||
var | ||
ExpectedValueTextBuilder: TextBuilder; | ||
begin | ||
ExpectedValueTextBuilder.AppendLine(Header1Lbl); | ||
ExpectedValueTextBuilder.AppendLine(Header2Lbl); | ||
ExpectedValueTextBuilder.AppendLine(ExpectedRelationLbl); | ||
ExpectedValueTextBuilder.AppendLine(); | ||
ExpectedValueTextBuilder.AppendLine(FooterLbl); | ||
|
||
exit(ExpectedValueTextBuilder.ToText()); | ||
end; | ||
|
||
/// <summary> | ||
/// GetExpectedMarkdownMermaidText. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
procedure GetExpectedMarkdownMermaidText(): Text; | ||
var | ||
ExpectedValueTextBuilder: TextBuilder; | ||
begin | ||
ExpectedValueTextBuilder.AppendLine(Header2Lbl); | ||
ExpectedValueTextBuilder.AppendLine(ExpectedRelationLbl); | ||
|
||
exit(ExpectedValueTextBuilder.ToText()); | ||
end; | ||
|
||
var | ||
ExpectedRelationLbl: Label 'E1[Take Order Sample] --> E2[DependencyGraph]'; | ||
FooterLbl: Label '```'; | ||
Header1Lbl: Label '```mermaid'; | ||
Header2Lbl: Label 'graph BT'; | ||
} |
116 changes: 116 additions & 0 deletions
116
Dependency-Graph.Test/src/Test/FillingProTablesMockANJ.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/// <summary> | ||
/// Codeunit "FillingProTablesMock_ANJ" (ID 99993). | ||
/// </summary> | ||
codeunit 99993 FillingProTablesMock_ANJ implements FillingProcessingTables_ANJ | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetExtensions. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
procedure GetExtensions(): Text; | ||
var | ||
ExtensionArry: JsonArray; | ||
AuxJsonObject: JsonObject; | ||
Extensions: Text; | ||
begin | ||
AddNewExtensionToJsonArry( | ||
ExtensionArry, | ||
Ext01IDLbl, | ||
Ext01NameLbl, | ||
Ext01PublisherLbl, | ||
ScopeLbl); | ||
|
||
AddNewExtensionToJsonArry( | ||
ExtensionArry, | ||
Ext02IDLbl, | ||
Ext02NameLbl, | ||
Ext02PublisherLbl, | ||
ScopeLbl); | ||
|
||
AuxJsonObject.Add(ValueLbl, ExtensionArry); | ||
AuxJsonObject.WriteTo(Extensions); | ||
|
||
exit(Extensions); | ||
end; | ||
|
||
/// <summary> | ||
/// GetRelations. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
procedure GetRelations(): Text; | ||
var | ||
RelationsArry: JsonArray; | ||
Relations: Text; | ||
begin | ||
AddNewRelationToJsonArry(RelationsArry, | ||
Ext01IDLbl, | ||
Ext02IDLbl); | ||
RelationsArry.WriteTo(Relations); | ||
|
||
exit(Relations); | ||
end; | ||
|
||
/// <summary> | ||
/// AddNewExtensionToJsonArry. | ||
/// </summary> | ||
/// <param name="ExtensionArry">VAR JsonArray.</param> | ||
/// <param name="PackageId">Text.</param> | ||
/// <param name="DisplayName">Text.</param> | ||
/// <param name="Publisher">Text.</param> | ||
/// <param name="PublishedAs">Text.</param> | ||
internal procedure AddNewExtensionToJsonArry( | ||
var ExtensionArry: JsonArray; | ||
PackageId: Text; | ||
DisplayName: Text; | ||
Publisher: Text; | ||
PublishedAs: Text); | ||
var | ||
ExtensionJsonObject: JsonObject; | ||
begin | ||
ExtensionJsonObject.Add(IdLbl, PackageId); | ||
ExtensionJsonObject.Add(PackageIdLbl, PackageId); | ||
ExtensionJsonObject.Add(DisplayNameLbl, DisplayName); | ||
ExtensionJsonObject.Add(PublisherLbl, Publisher); | ||
ExtensionJsonObject.Add(PublishedAsLbl, PublishedAs); | ||
ExtensionJsonObject.Add(IsInstalledLbl, true); | ||
|
||
ExtensionArry.Add(ExtensionJsonObject); | ||
end; | ||
|
||
/// <summary> | ||
/// AddNewRelationToJsonArry. | ||
/// /// </summary> | ||
/// <returns>Return variable NewRelationsLine of type Integer.</returns> | ||
local procedure AddNewRelationToJsonArry( | ||
var RelationsArry: JsonArray; | ||
SourceAppID: Guid; | ||
DestinationAppID: Guid); | ||
var | ||
RelationJsonObject: JsonObject; | ||
begin | ||
RelationJsonObject.Add(SourceAppIDLbl, SourceAppID); | ||
RelationJsonObject.Add(DestinationAppIDLbl, DestinationAppID); | ||
|
||
RelationsArry.Add(RelationJsonObject); | ||
end; | ||
|
||
var | ||
DestinationAppIDLbl: Label 'DestinationAppID'; | ||
DisplayNameLbl: Label 'displayName'; | ||
Ext01IDLbl: Label 'a1f81352-6244-48a4-96a0-a81c5aaaa581'; | ||
Ext01NameLbl: Label 'Take Order Sample'; | ||
Ext01PublisherLbl: Label 'BusinessCentralDemos'; | ||
Ext02IDLbl: Label '3c9a4c22-42f6-4e8f-8b96-744c7fef331f'; | ||
Ext02NameLbl: Label 'Dependency-Graph'; | ||
Ext02PublisherLbl: Label 'ANJ'; | ||
IdLbl: Label 'id'; | ||
IsInstalledLbl: Label 'isInstalled'; | ||
PackageIdLbl: Label 'packageId'; | ||
PublishedAsLbl: Label 'publishedAs'; | ||
PublisherLbl: Label 'publisher'; | ||
ScopeLbl: Label 'PTE'; | ||
SourceAppIDLbl: Label 'SourceAppID'; | ||
ValueLbl: Label 'value'; | ||
} |
11 changes: 11 additions & 0 deletions
11
Dependency-Graph.Test/src/Test/FillingProcessTablesMockANJ.EnumExt.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <summary> | ||
/// EnumExtension FillingProcessingTablesMock_ANJ (ID 99990) extends Record FillingProcessingTables_ANJ. | ||
/// </summary> | ||
enumextension 99990 FillingProcessTablesMock_ANJ extends FillingProcessingTables_ANJ | ||
{ | ||
value(99990; Mock_ANJ) | ||
{ | ||
Caption = 'Mock', comment = 'ESP="WS y Mock"'; | ||
Implementation = FillingProcessingTables_ANJ = FillingProTablesMock_ANJ; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
Dependency-Graph.Test/src/Test/GraphAndMarkdownTestANJ.Codeunit.al
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.