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,140 @@
using System.Collections.Generic;
using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Rights;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.Interfaces.Accounts;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account.AccountAddresses
{
public class AccountAddressTests : EndToEndTest
{
public AccountAddressTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.ChangedVersion);
}
public override void Execute()
{
TestLoadWithContacts();
GetSingleAccountAddressWithContacts();
GetDefaultAddressForAccount();
TestUserHasNoShowRightsForAccounts();
PrepareUserWithSpecialRights();
TestUserHasRightOnlyToSeeOwnAccountsSuccessful();
TestUserHasRightOnlyToSeeOwnAccountsFailed();
}
private void TestUserHasRightOnlyToSeeOwnAccountsFailed()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(16),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 5, 11 }
});
Assert.True(result.Status == ResultStatus.Error, "Expected error, because user should have no show rights");
Assert.True(result.MessageCode == DefaultMessageCodes.RightCheckFailed, "Expected right check failed message code");
Assert.True(result.Data == null || !result.Data.Any(), "Expected empty result list");
}
private void TestUserHasRightOnlyToSeeOwnAccountsSuccessful()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(16),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 5 }
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 1, "Expected 1 address");
}
private void PrepareUserWithSpecialRights()
{
using var session = new BLSession();
session.GetBL<AppRightsBL>().AddRightToRightGroup(
UserRightsConst.Sales.Customer.CustomerCommon.SHOW_ONLY_OWN_CUSTOMER, 40, GetLoggedInUser().User);
}
private void TestUserHasNoShowRightsForAccounts()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(18),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 10, 16 }
});
Assert.True(result.Status == ResultStatus.Error, "Expected error, because user should have no show rights");
Assert.True(result.MessageCode == DefaultMessageCodes.RightCheckFailed, "Expected right check failed message code");
Assert.True(result.Data == null || !result.Data.Any(), "Expected empty result list");
}
private void GetDefaultAddressForAccount()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 10, 16 }
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 2, "Expected 2 addresses");
Assert.True(result.Data.All(f => f.IsDefault), "Expected only default addresses");
Assert.True(result.Data.All(f => f.Contacts == null || !f.Contacts.Any()), "Expected empty contact list");
}
private void GetSingleAccountAddressWithContacts()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(),
new GetAccountAddressesFilter()
{
AddressI3Ds = new List<int>()
{
25
},
IncludeContacts = true
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 1 && result.Data.All(f => f.I3D == 25), "Expected 1 item with I3D = 25");
Assert.True(result.Data.First().Contacts.Any(), "Expected a contact list for account address");
}
public void TestLoadWithContacts()
{
var result = this.WithSession(s => s.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(this.GetLoggedInUser(), new GetAccountAddressesFilter
{
AccountI3Ds = new List<int>
{
10,
16
},
IncludeClosedAddresses = true,
IncludeContacts = true
})).ThrowIfError();
this.Verifier.Verify("AddressesWithContacts", result);
}
}
}
@@ -0,0 +1,560 @@
[
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Frankfurt',
Comment: '',
Contacts: [
{
AccountAddressI3D: 18,
Birthday: DateTime,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: 'am besten erreichbar zwischen 10-12 Uhr',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'mw@c-entron.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Markus',
FullName: 'Walter, Markus',
I3D: 25,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: true,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Walter',
OldReferenceI3D: 45,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: {
Latitude: 50.1309033,
Longitude: 8.7369357
},
GeoInfoUpdateFailed: false,
I3D: 18,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 35,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Liststrasse 1',
VariableBoolField01: false,
Zip: '40506'
},
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
City: 'Blaustein',
Comment: '',
Contacts: [
{
AccountAddressI3D: 19,
Birthday: null,
ChangedByI3D: 40,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Fischer, ',
I3D: 26,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Fischer',
OldReferenceI3D: 46,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 4,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
},
{
AccountAddressI3D: 19,
Birthday: null,
ChangedByI3D: 40,
ChangedDate: DateTime,
Comment: null,
CreatedByI3D: 40,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: 'info@c-entron.de',
Email2: null,
Fax1: '',
Fax2: '',
Firstname: 'Ru',
FullName: 'Kakau, Ru',
I3D: 27,
IsActive: true,
IsDefault: false,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: 'Kakau',
OldReferenceI3D: 78,
OldReferenceKind: 0,
Phone1: '01701234567',
Phone2: '',
Phone3: '',
Phone4: null,
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: null,
GeoInfoUpdateFailed: true,
I3D: 19,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 36,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Rechnungsadresse 1',
VariableBoolField01: false,
Zip: '89134'
},
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 20,
Birthday: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 28,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 47,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: null,
GeoInfoUpdateFailed: true,
I3D: 20,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 37,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 27,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'info@tuttlingen.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Weber, ',
I3D: 35,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Weber',
OldReferenceI3D: 68,
OldReferenceKind: 0,
Phone1: '07461-99-0',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
},
{
AccountAddressI3D: 27,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'eva.schulze@tuttlingen.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Eva',
FullName: 'Schulze, Eva',
I3D: 36,
IsActive: true,
IsDefault: false,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Schulze',
OldReferenceI3D: 69,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 1,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Rathaus',
GeoInfo: {
Latitude: 47.98479,
Longitude: 8.81799
},
GeoInfoUpdateFailed: false,
I3D: 27,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 54,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Rathausstrasse 1',
VariableBoolField01: false,
Zip: '78532'
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 28,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Kern, ',
I3D: 37,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Kern',
OldReferenceI3D: 70,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Lehramt',
GeoInfo: {
Latitude: 47.97895,
Longitude: 8.81794
},
GeoInfoUpdateFailed: false,
I3D: 28,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 55,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Talstrasse 12',
VariableBoolField01: false,
Zip: '78532'
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 29,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: 'Technischer Leiter',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Karl',
FullName: 'Huber, Karl',
I3D: 38,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Huber',
OldReferenceI3D: 71,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Bauhof',
GeoInfo: {
Latitude: 48.073356,
Longitude: 8.7391238
},
GeoInfoUpdateFailed: false,
I3D: 29,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 56,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Hauptstrasse 100',
VariableBoolField01: false,
Zip: '78534'
}
]