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
56 lines
2.0 KiB
C#
56 lines
2.0 KiB
C#
using Centron.BusinessLogic.Administration.Settings;
|
|
using Centron.BusinessLogic.Mail.Factory;
|
|
using Centron.BusinessLogic.WebServices.Sales.Receipts;
|
|
using Centron.BusinessLogic.WebServices.Sales.Support;
|
|
using Centron.Data.WebServices.Sales.Support;
|
|
using Centron.Interfaces;
|
|
using Centron.Interfaces.Administration.Settings;
|
|
using Centron.Interfaces.BL;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.ReceiptTicketPattern;
|
|
|
|
public class ReceiptTicketPatternTests : EndToEndTest
|
|
{
|
|
public ReceiptTicketPatternTests(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public const int OrderI3D = 120;
|
|
|
|
public override void Execute()
|
|
{
|
|
this.PrepareDatabase();
|
|
|
|
using (TestMails.Start(out var mails))
|
|
{
|
|
var ticketInfos = this.WithSession(s => s.GetBL<ReceiptWebServiceBL>().GetHelpdeskInfosForReceipt(CentronObjectKindNumeric.OrderClass, OrderI3D, this.GetLoggedInUser().User)).ThrowIfError();
|
|
this.Verifier.Verify("TicketInfos", ticketInfos);
|
|
}
|
|
}
|
|
|
|
private void PrepareDatabase()
|
|
{
|
|
// Set up AutomHelpdeskProcessorI3Ds to ensure correct employee assignment
|
|
this.WithSession(s =>
|
|
{
|
|
var settingsBL = s.GetBL<AppSettingsBL>();
|
|
var settings = settingsBL.GetSettingsForUpdate(ApplicationSettingID.AutomHelpdeskProcessorI3Ds);
|
|
settings.UpdateString(ApplicationSettingID.AutomHelpdeskProcessorI3Ds, "44");
|
|
});
|
|
|
|
// Add Ticket-Pattern to article X
|
|
var user = this.GetLoggedInUser();
|
|
this.WithSession(s => s.GetBL<HelpdeskPatternWebserviceBL>().SaveTicketPattern(new TicketPatternDTO
|
|
{
|
|
Caption = "Eine Ticketvorlage",
|
|
InternalNote = "Interne-Notiz aus dem Pattern",
|
|
Description = "Beschreibung aus dem Pattern",
|
|
ArticleI3D = 84,
|
|
IsActive = true,
|
|
DurationInDays = 7,
|
|
}, user));
|
|
}
|
|
} |