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
61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Centron.BusinessLogic;
|
|
using Centron.BusinessLogic.WebServices.Sales.CustomerAssets.Shared;
|
|
using Centron.Data.WebServices.Warehousing;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using CentronSoftware.Centron.WebServices.Entities.Warehousing;
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.SecialAgreement;
|
|
|
|
public class SpecialAgreementTest : EndToEndTest
|
|
{
|
|
public SpecialAgreementTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public override void Execute()
|
|
{
|
|
var testI3D = this.SaveSpecialAgreement();
|
|
this.DeleteSpecialAgreement(testI3D);
|
|
}
|
|
|
|
private int SaveSpecialAgreement()
|
|
{
|
|
var testAgreement = new SpecialAgreementDTO
|
|
{
|
|
Text = "Wo war Gondor als die Westfold fiel?",
|
|
Number = "007",
|
|
ValidFrom = new DateTime(2020, 8, 4),
|
|
ValidUntil = new DateTime(2022, 7, 3)
|
|
};
|
|
testAgreement.Articles = new List<SpecialAgreementArticleDTO>();
|
|
|
|
using var session = new BLSession();
|
|
|
|
var result = session.GetBL<SpecialAgreementWebServiceBL>().SaveOrUpdate(testAgreement, this.GetLoggedInUser().User);
|
|
|
|
this.Verifier.Verify($"Save_SpecialAgreement", result);
|
|
|
|
//Test it again as Global
|
|
testAgreement.IsGlobal = true;
|
|
|
|
var resultGlobal = session.GetBL<SpecialAgreementWebServiceBL>().SaveOrUpdate(testAgreement, this.GetLoggedInUser().User);
|
|
|
|
this.Verifier.Verify($"Save_SpecialAgreement_IsGlobal", resultGlobal);
|
|
|
|
return resultGlobal.Data.I3D;
|
|
}
|
|
|
|
private void DeleteSpecialAgreement(int specialAgreementI3D)
|
|
{
|
|
using var session = new BLSession();
|
|
|
|
var result = session.GetBL<SpecialAgreementWebServiceBL>().Delete(specialAgreementI3D, this.GetLoggedInUser().User);
|
|
|
|
this.Verifier.Verify($"Delete_SpecialAgreement", result);
|
|
}
|
|
|
|
} |