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
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: 'Der Beleg ist von dem Benutzer bla gesperrt und Sie haben nicht das Recht um von anderen Benutzern gesperrte Belege zu entsperren.',
MessageCode: 10000,
Status: 2
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,67 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Rights;
using Centron.BusinessLogic.EmployeeArea;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.Interfaces;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.ReceiptLock
{
public class ReceiptLockTests : EndToEndTest
{
public ReceiptLockTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
private const int OfferI3D = 123;
private const int AppUserI3D = 21;
public override void Execute()
{
var isOfferLockedInput = new[] { false, true };
var lockedByDifferentUserInput = new[] { false, true };
var hasUserRightInput = new[] { false, true };
this.ExecuteMatrix(isOfferLockedInput, lockedByDifferentUserInput, hasUserRightInput, (isOfferLocked, lockedByDifferentUser, hasUserRight) =>
{
this.SetupDatabase(isOfferLocked, lockedByDifferentUser, hasUserRight);
bool expectSuccess = isOfferLocked == false || lockedByDifferentUser == false || hasUserRight;
this.TryRemoveLock($"IsOfferLocked_{isOfferLocked}_LockedByDifferentUser_{lockedByDifferentUser}_HasUserRight_{hasUserRight}", expectSuccess);
});
}
private void SetupDatabase(bool isOfferLocked, bool useDifferentUser, bool hasUserRight)
{
string employeeShortSign = useDifferentUser
? "bla"
: this.Sql<string>($"SELECT P.KurzZeich " +
$"FROM dbo.Sichbenu S " +
$"INNER JOIN dbo.Personal P ON P.I3D = S.Personal " +
$"WHERE S.I3D = {AppUserI3D}");
this.Sql(isOfferLocked
? $"UPDATE dbo.AngKopf SET LockUser = '{employeeShortSign}' WHERE I3D = {OfferI3D}"
: $"UPDATE dbo.AngKopf SET LockUser = NULL WHERE I3D = {OfferI3D}");
this.Sql(hasUserRight
? $"INSERT INTO dbo.Sichtrus (Gruppe, Recht) VALUES (40, {(int)UserRightsConst.Sales.Customer.CustomerCommon.UNLOCK_CUSTOMER_ATTACHMENTS})"
: $"DELETE FROM dbo.Sichtrus WHERE Recht = {UserRightsConst.Sales.Customer.CustomerCommon.UNLOCK_CUSTOMER_ATTACHMENTS}");
}
private void TryRemoveLock(string name, bool expectSuccess)
{
using var session = new BLSession();
var currentUser = session.GetBL<AppUserBL>().GetAppUser(f => f.I3D == AppUserI3D);
var removeLockResult = session.GetBL<ReceiptWebServiceBL>().RemoveLock(CentronObjectKindNumeric.OfferClass, OfferI3D, onlyIfLockedByCurrentUser:false, currentUser);
Assert.Equal(expectSuccess ? ResultStatus.Success : ResultStatus.Error, removeLockResult.Status);
this.Verifier.Verify(name, removeLockResult);
}
}
}