Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Layers/AT/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/AU/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/BE/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/CA/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -213,6 +214,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure HistoricalSalesDataForAllItems()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/DE/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/DK/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/ES/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
15 changes: 14 additions & 1 deletion src/Layers/ES/Tests/TestLibraries/LibrarySII.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,19 @@ codeunit 143006 "Library - SII"
exit(ApplicationPath + '\..\..\..\');
end;

[Scope('OnPrem')]
procedure ResolveTestAssetPath(RelativePath: Text): Text
var
FileManagement: Codeunit "File Management";
BCAppsAssetPath: Text;
begin
// Test assets moved under App\BCApps\src during the submodule migration; probe there first, fall back to the legacy layout.
BCAppsAssetPath := GetInetRoot() + '\App\BCApps\src' + RelativePath;
if FileManagement.ServerFileExists(BCAppsAssetPath) then
exit(BCAppsAssetPath);
exit(GetInetRoot() + RelativePath);
end;

local procedure GetSignOfVATEntry(DocType: Enum "Gen. Journal Document Type"): Integer
var
VATEntry: Record "VAT Entry";
Expand Down Expand Up @@ -1067,7 +1080,7 @@ codeunit 143006 "Library - SII"
XMLDoc.Save(XmlStream);
XmlFile.Close();

XsdPath := GetInetRoot() + '\GDL\ES\App\Test\SIIxmlschema\SuministroLR.xsd';
XsdPath := ResolveTestAssetPath('\GDL\ES\App\Test\SIIxmlschema\SuministroLR.xsd');
Assert.IsTrue(LibraryVerifyXMLSchema.VerifyXMLAgainstSchema(XmlPath, XsdPath, Message), Message);
end;

Expand Down
11 changes: 9 additions & 2 deletions src/Layers/FI/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/GB/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -165,6 +166,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
11 changes: 9 additions & 2 deletions src/Layers/IS/Tests/Misc/RSPackContentEvaluation.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ codeunit 138400 "RS Pack Content - Evaluation"
// [SCENARIO] The data on itemsales.xml are consistent
Initialize();

TempXMLBuffer.Load(FileManagement.CombinePath(
ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));
// Demo data moved under App\BCApps\src during the submodule migration; try the new location, fall back to the legacy layout.
if not TryLoadXmlBuffer(TempXMLBuffer, FileManagement.CombinePath(ApplicationPath, '../../App/BCApps/src/DemoTool/Pictures/MachineLearning/itemsales.xml')) then
TempXMLBuffer.Load(FileManagement.CombinePath(ApplicationPath, '../../App/Demotool/Pictures/MachineLearning/itemsales.xml'));

Item.SetRange("Assembly BOM", false);
Evaluate(Periods, TempXMLBuffer.GetAttributeValueAsText('Periods'));
Expand All @@ -166,6 +167,12 @@ codeunit 138400 "RS Pack Content - Evaluation"
until TempXMLBuffer.Next() = 0;
end;

[TryFunction]
local procedure TryLoadXmlBuffer(var TempXMLBuffer: Record "XML Buffer" temporary; FilePath: Text)
begin
TempXMLBuffer.Load(FilePath);
end;

[Test]
[Scope('OnPrem')]
procedure AnyCustomerHaveSalespersonCode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ codeunit 12182 "Datifattura Export"
if FileNameCounter = 0 then
exit;

TempNameValueBuffer.FindSet();
if not TempNameValueBuffer.FindSet() then
exit;
if FileNameCounter > 1 then begin
DataCompression.CreateZipArchive();
repeat
Expand Down
3 changes: 2 additions & 1 deletion src/Layers/IT/Tests/Local/FatturaPATest.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ codeunit 144200 "FatturaPA Test"
SignatureXSDRelativePathTxt: Label '\GDL\IT\App\Test\XMLSchemas\xmldsig-core-schema.xsd', Locked = true;
XSDRelativePathTxt: Label '\GDL\IT\App\Test\XMLSchemas\FatturaPA_1_2.xsd', Locked = true;
InetRootRelativePathTxt: Label '..\', Locked = true;
BCAppsRelativePathTxt: Label '\App\BCApps\src', Locked = true;
DescriptionTxt: Label 'Description Text';

[Test]
Expand Down Expand Up @@ -2913,7 +2914,7 @@ codeunit 144200 "FatturaPA Test"
XsdPath: Text;
InetRoot: Text;
BEGIN
InetRoot := LibraryUtilityOnPrem.GetInetRoot() + InetRootRelativePathTxt;
InetRoot := LibraryUtilityOnPrem.GetInetRoot() + InetRootRelativePathTxt + BCAppsRelativePathTxt;
SignatureXsdPath := InetRoot + SignatureXSDRelativePathTxt;
XsdPath := InetRoot + XSDRelativePathTxt;
LibraryVerifyXMLSchema.SetAdditionalSchemaPath(SignatureXsdPath);
Expand Down
Loading