Files
Christoph Schwörer f045b99a25 Codebasis als Dateien ins Arbeitsrepo statt als Gitlink
QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
2026-08-26 07:43:51 +02:00

52 lines
2.4 KiB
C#

using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Profiling;
using Centron.BusinessLogic.Administration.Settings;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.Data.WebServices.Sales.Receipts;
using Centron.Interfaces;
using Centron.Interfaces.Sales.Receipts;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Sales.Receipts.Log;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Administration.Profiling;
public class CommonProfilerTests : EndToEndTest
{
public CommonProfilerTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
Verifier.Settings.CleanupDateTimeValues = true;
Verifier.Settings.IgnoreProperty((ReceiptLogDTO c) => c.CentronVersion);
}
public override void Execute()
{
using var session = new BLSession();
SetupProfilingForReceipts(session);
var receiptBL = session.GetBL<ReceiptWebServiceBL>();
receiptBL.GetReceiptByI3D(151, CentronObjectKindNumeric.InvoiceClass, base.GetLoggedInUser());
receiptBL.GetReceiptByI3D(151, CentronObjectKindNumeric.InvoiceClass, base.GetLoggedInUser());
receiptBL.GetReceiptByI3D(152, CentronObjectKindNumeric.InvoiceClass, base.GetLoggedInUser());
// Test unreorganized log entries
var logResult = session.GetBL<ReceiptLogWebServiceBL>().GetLogsByFilter(new ReceiptLogsFilter() { LogKind = ReceiptLogKind.ProfilerAccessTracking });
Verifier.Verify("CommonProfilerTests_ProfilerAccessTracking", logResult);
// Reorganize the profile log entries
session.GetBL<ProfilerBL>().ReorganizeProfilerEntries();
// Test reorganization of the log entries
logResult = session.GetBL<ReceiptLogWebServiceBL>().GetLogsByFilter(new ReceiptLogsFilter() { LogKind = ReceiptLogKind.ProfilerAccessTracking });
Verifier.Verify("CommonProfilerTests_ProfilerAccessTracking_AfterReorg", logResult);
}
internal void SetupProfilingForReceipts(BLSession session)
{
// Settings test on the side of the road :-)
var settings = session.GetBL<AppSettingsGroupBL>().GetProfilerSettings();
settings.IsExtendedReceiptProfilingActive = true;
settings.KeepExtendedProfilingRecordsForXDays = 0; // we want immediate data aggregation for our test
session.GetBL<AppSettingsGroupBL>().UpdateProfilerSettings(settings);
}
}