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,420 @@
{
AdditionalText2: null,
AddressI3D: 26,
AdressContactI3D: 35,
ArticleWorkItemCaption: null,
ArticleWorkItemI3D: null,
BilledCalculableNotPlannedTimesInSeconds: 0,
BranchI3D: null,
BranchName: null,
CalcuableTimersCount: 0,
CalculableNotPlannedTimesInSeconds: 0,
CalculableTimesInSeconds: 0,
CFlowStateI3D: null,
ChangedDate: DateTime,
ClosedDate: null,
ConnectionNumber: 0,
ContactEmail: 'info@incas-voice.de',
ContactName: ' Rapp',
ContactTelephoneNumber: '02151.620100',
ContactTitle: 'Herr',
ContractCaption: '',
ContractId: 0,
ContractName: null,
ContractNumber: null,
ContractTypeCaption: null,
CreatedBy: {
Availability: 0,
BranchI3D: null,
DefaultStorageI3D: null,
Dispatcher: false,
DisplayText: 'CentronSystemUser (CenSU)',
Email: null,
Employeenumber: 0,
FirstName: null,
FullName: 'CentronSystemUser, (CenSU)',
I3D: 47,
IsActive: false,
LastAvailabilityChange: null,
LastName: 'CentronSystemUser',
LeavingDate: null,
Phone1: null,
RemainingDaysOfVacation: 0.0,
ShortSign: 'CenSU',
State: 0,
SupportLevel: null,
Template1: false,
Template2: false,
Template3: false,
Template4: false,
VacationEntitlement: 0.0
},
CreatedDate: DateTime,
CreatedFrom: 0,
CreatedFromObjectI3D: 0,
CreatedFromObjectKind: null,
CreatedFromTicketPatternI3D: null,
CustomerAdviser1: 'ABO',
CustomerAdviser2: 'ABO',
CustomerAdviser3: '',
CustomerAdviser4: '',
CustomerCity: 'Krefeld',
CustomerHasSlaContract: false,
CustomerI3D: 10006,
CustomerName: 'INCASO Voice Solution GmbH',
CustomerOrderProcessingContractState: null,
CustomerStreet: 'Europark Fichtenhain A 15',
CustomerZip: '47807',
Description: 'Test-Description',
Documentation: null,
DueDate: DateTime,
EditEndDate: null,
EditorI3Ds: null,
Editors: [
{
Availability: 0,
BranchI3D: null,
DefaultStorageI3D: null,
Dispatcher: false,
DisplayText: 'Bauer, Elisabeth (EBA)',
Email: 'zeller@c-entron.de',
Employeenumber: null,
FirstName: 'Elisabeth',
FullName: 'Bauer, Elisabeth (EBA)',
I3D: 35,
IsActive: false,
LastAvailabilityChange: null,
LastName: 'Bauer',
LeavingDate: null,
Phone1: null,
RemainingDaysOfVacation: 0.0,
ShortSign: 'EBA',
State: null,
SupportLevel: null,
Template1: false,
Template2: false,
Template3: false,
Template4: false,
VacationEntitlement: 0.0
},
{
Availability: 0,
BranchI3D: null,
DefaultStorageI3D: null,
Dispatcher: false,
DisplayText: 'Lehnert, Volker (VL)',
Email: 'lehnert@c-entron.de',
Employeenumber: null,
FirstName: 'Volker',
FullName: 'Lehnert, Volker (VL)',
I3D: 44,
IsActive: false,
LastAvailabilityChange: null,
LastName: 'Lehnert',
LeavingDate: null,
Phone1: null,
RemainingDaysOfVacation: 0.0,
ShortSign: 'VL',
State: null,
SupportLevel: null,
Template1: false,
Template2: false,
Template3: false,
Template4: false,
VacationEntitlement: 0.0
}
],
EditorsSingleLine: null,
EditStartDate: null,
EscalationLevel: 0,
FreeText1: null,
HelpdeskMarked: false,
HelpdeskPriorityCaption: 'sehr wichtig',
HelpdeskPriorityI3D: 5,
HelpdeskStatusCaption: 'offen',
HelpdeskStatusI3D: 1,
HelpdeskType: {
Color: null,
Description: null,
I3D: 3,
IsDeactivated: null,
Name: 'Garantiefall',
Number: 3,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null
},
HelpdeskTypeCaption: 'Garantiefall',
HelpdeskTypeI3D: 3,
HistoryCount: 3,
I3D: 10492,
InternalNote: null,
IsCalculable: false,
IsLinkedWithDocBee: false,
IsOnlyInternalVisible: false,
IsRMA: false,
IsTicketRefused: null,
LastAction: null,
LastCommentDate: null,
LastEmailDate: DateTime,
LockUser: null,
MainCategory: {
Description: null,
I3D: 5,
IsDeactivated: null,
IsPrivate: null,
Name: 'Notebook',
Number: 3,
ParentI3D: null,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: [
{
Description: null,
I3D: 20,
IsDeactivated: null,
IsPrivate: null,
Name: 'Hardware',
Number: 1,
ParentI3D: 5,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: [
{
Description: null,
I3D: 22,
IsDeactivated: null,
IsPrivate: null,
Name: 'Panel',
Number: 1,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 23,
IsDeactivated: null,
IsPrivate: null,
Name: 'Tastatur',
Number: 2,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 24,
IsDeactivated: null,
IsPrivate: null,
Name: 'Festplatte',
Number: 3,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
}
]
},
{
Description: null,
I3D: 21,
IsDeactivated: null,
IsPrivate: null,
Name: 'Software',
Number: 2,
ParentI3D: 5,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: [
{
Description: null,
I3D: 25,
IsDeactivated: null,
IsPrivate: null,
Name: 'Windows XP',
Number: 1,
ParentI3D: 21,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 26,
IsDeactivated: null,
IsPrivate: null,
Name: 'Office',
Number: 2,
ParentI3D: 21,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 27,
IsDeactivated: null,
IsPrivate: null,
Name: 'Grafiktreiber',
Number: 3,
ParentI3D: 21,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 54,
IsDeactivated: null,
IsPrivate: null,
Name: 'Vista',
Number: 4,
ParentI3D: 21,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 55,
IsDeactivated: null,
IsPrivate: null,
Name: 'Windows 7',
Number: 5,
ParentI3D: 21,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
}
]
}
]
},
MainCategoryCaption: null,
MainCategoryI3D: 5,
Matchcode: null,
NotBilledCalculableNotPlannedTimesInSeconds: 0,
NotCalculableNotPlannedTimesInSeconds: 0,
NotCalculableTimesInSeconds: 0,
Number: 12506,
ParentHelpdeskI3D: null,
PlannedDurationInHours: null,
PlannedTimesInSeconds: 0,
ProjectHelpdeskI3D: null,
ProjectNumber: null,
ResponsiblePerson: {
Availability: 0,
BranchI3D: 0,
DefaultStorageI3D: null,
Dispatcher: false,
DisplayText: 'Administrator, c-entron (ADMIN)',
Email: 'vertrieb@c-entron.de',
Employeenumber: 0,
FirstName: 'c-entron',
FullName: 'Administrator, c-entron (ADMIN)',
I3D: 22,
IsActive: true,
LastAvailabilityChange: null,
LastName: 'Administrator',
LeavingDate: DateTime,
Phone1: '0731-140399-0',
RemainingDaysOfVacation: 28.0,
ShortSign: 'ADMIN',
State: 1,
SupportLevel: null,
Template1: false,
Template2: false,
Template3: false,
Template4: false,
VacationEntitlement: 30.0
},
RMANumber: null,
ShortDescription: 'Test-Short-Description',
SubCategory1: {
Description: null,
I3D: 20,
IsDeactivated: null,
IsPrivate: null,
Name: 'Hardware',
Number: 1,
ParentI3D: 5,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: [
{
Description: null,
I3D: 22,
IsDeactivated: null,
IsPrivate: null,
Name: 'Panel',
Number: 1,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 23,
IsDeactivated: null,
IsPrivate: null,
Name: 'Tastatur',
Number: 2,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
{
Description: null,
I3D: 24,
IsDeactivated: null,
IsPrivate: null,
Name: 'Festplatte',
Number: 3,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
}
]
},
SubCategory1Caption: null,
SubCategory1I3D: 20,
SubCategory2: {
Description: null,
I3D: 23,
IsDeactivated: null,
IsPrivate: null,
Name: 'Tastatur',
Number: 2,
ParentI3D: 20,
ServiceBoardWebColor: null,
ServiceBoardWebIcon: null,
SkillAssignments: [],
SubCategories: []
},
SubCategory2Caption: null,
SubCategory2I3D: 23,
TicketTags: [],
TimersCount: 0,
TotalTimer: 0,
Version: null
}
@@ -0,0 +1,178 @@
using System.Collections.Generic;
using Centron.BusinessLogic.Administration.FileManagement;
using Centron.BusinessLogic.RiverDivo;
using Centron.BusinessLogic.WebServices.DataExchange.Rmm;
using CentronSoftware.Centron.WebServices.Entities.DataExchange.Rmm;
using Centron.BusinessLogic.WebServices.Administration.FileManagement;
using Centron.BusinessLogic.WebServices.Devices;
using Centron.BusinessLogic.WebServices.Sales.Support;
using Centron.Data.Entities.Administration.FileManagement;
using Centron.Interfaces;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Devices;
using CentronSoftware.Centron.WebServices.Entities.RiverDivo;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.RiverDivo;
public class RiverDivoTests : EndToEndTest
{
private const int _centronCustomerNumber = 10006;
private const int _riverbirdCustomerReference = 123;
private const string _helpdeskAttachmentFileName = "RiverDivoAttachment.txt";
private static readonly byte[] _helpdeskAttachmentFileContent = { 1, 2, 3, 4, 5 };
public RiverDivoTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
this.PrepareDataBase();
this.TestCreateHelpdesk();
this.TestCreateHelpdeskWithDeviceLink();
this.TestValidateRmmAccessKey();
}
private void PrepareDataBase()
{
this.Sql($"UPDATE dbo.Kunden SET RiverbirdCustomerReference = {_riverbirdCustomerReference} WHERE I3D = {_centronCustomerNumber}");
}
private void TestCreateHelpdesk()
{
var data = new CentronConnectionCreateHelpdeskRequestDTO
{
ShortDescription = "Test-Short-Description",
Description = "Test-Description",
PriorityI3D = 5, // Sehr wichtig
StateI3D = 1, // offen
HelpdeskTypeI3D = 3, // Garantiefall
MainCategoryI3D = 5, // Notebook
SubCategory1I3D = 20, // Hardware
SubCategory2I3D = 23, // Tastatur
CustomerI3D = _riverbirdCustomerReference,
Adviser1 = true,
Adviser2 = true,
Adviser3 = true,
Adviser4 = true,
Adviser5 = true,
Adviser6 = true,
AssignDefaultDepartment = true,
AddToGeneralAgreementContract = true,
EditorI3Ds = new List<int> { 34 },
DefaultState = false,
Files = new List<HelpdeskFileDTO>
{
new()
{
FileName = _helpdeskAttachmentFileName,
FileContent = _helpdeskAttachmentFileContent,
},
},
};
var ticketI3D = this.WithSession(s => s.GetBL<RiverDivoBL>().CreateHelpdeskRequest(data, true));
var ticket = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetHelpdeskByI3D(ticketI3D, this.GetLoggedInUser())).ThrowIfError();
var rootDirectory = this.WithSession(s => s.GetBL<DirectoryReferenceBL>().GetDirectoryReference(ticketI3D,
CentronObjectKindNumeric.HelpdeskClass, DirectoryReferenceKind.RootDirI3D));
Assert.NotNull(rootDirectory);
var documents = this.WithSession(s => s.GetBL<DocumentWebServiceBL>()
.GetDocumentsByDirectory(rootDirectory.DirectoryI3D)).ThrowIfError();
var attachment = Assert.Single(documents, document => document.Name == _helpdeskAttachmentFileName);
Assert.Equal(CentronObjectKindNumeric.HelpdeskClass, attachment.DocumentReferenceObjectKind);
var savedAttachment = this.WithSession(s => s.GetBL<DocumentWebServiceBL>()
.GetDocument(this.GetLoggedInUser(), attachment.I3D)).ThrowIfError();
Assert.Equal(_helpdeskAttachmentFileContent, savedAttachment.FileData);
this.Verifier.Verify("CreatedTicket", ticket);
}
private void TestCreateHelpdeskWithDeviceLink()
{
var ownDevice = this.WithSession(s => s.GetBL<AccountDeviceWebServiceBL>()
.SaveAccountDevice(this.GetLoggedInUser(), new AccountDeviceDTO
{
AccountI3D = 5,
ShortName = "Own-Device",
DeviceId = "OWN-DEVICE-001"
})).ThrowIfError();
var foreignDevice = this.WithSession(s => s.GetBL<AccountDeviceWebServiceBL>()
.SaveAccountDevice(this.GetLoggedInUser(), new AccountDeviceDTO
{
AccountI3D = 99999,
ShortName = "Foreign-Device",
DeviceId = "FOREIGN-DEVICE-001"
})).ThrowIfError();
var data = new CentronConnectionCreateHelpdeskRequestDTO
{
ShortDescription = "Test-Short-Description",
Description = "Test-Description",
PriorityI3D = 5,
StateI3D = 1,
HelpdeskTypeI3D = 3,
MainCategoryI3D = 5,
SubCategory1I3D = 20,
SubCategory2I3D = 23,
CustomerI3D = _riverbirdCustomerReference,
AssignDefaultDepartment = true,
AddToGeneralAgreementContract = true,
EditorI3Ds = new List<int> { 34 },
DefaultState = false,
AccountDeviceIDs = new List<string> { "OWN-DEVICE-001", "FOREIGN-DEVICE-001" },
};
var ticketI3D = this.WithSession(s => s.GetBL<RiverDivoBL>().CreateHelpdeskRequest(data, true));
var linkedDevices = this.WithSession(s => s.GetBL<AccountDeviceWebServiceBL>().SearchAccountDevices(new GetAccountDeviceFilter { TicketI3D = ticketI3D })).ThrowIfError();
Assert.Contains(linkedDevices, d => d.I3D == ownDevice.I3D);
Assert.DoesNotContain(linkedDevices, d => d.I3D == foreignDevice.I3D);
}
private void TestValidateRmmAccessKey()
{
// Without configured settings every access key is invalid.
Assert.False(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRmmAccessKey("test-access-key")));
// Activate the RMM interface and configure an access key.
this.WithSession(s => s.GetBL<RmmConnectionSettingsWebServiceBL>().UpdateRmmConnectionSettings(new RmmConnectionSettingsDTO
{
IsEnabled = true,
AccessKey = "test-access-key"
}, this.GetLoggedInUser())).ThrowIfError();
Assert.True(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRmmAccessKey("test-access-key")));
Assert.False(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRmmAccessKey("wrong-access-key")));
Assert.False(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRmmAccessKey(null)));
// The combined check of the legacy RiverDivo endpoints accepts a valid RMM access key.
Assert.True(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRiverTicketOrRmmAccessKey("test-access-key")));
// Deactivated RMM interface: access key is no longer accepted.
this.WithSession(s => s.GetBL<RmmConnectionSettingsWebServiceBL>().UpdateRmmConnectionSettings(new RmmConnectionSettingsDTO
{
IsEnabled = false,
AccessKey = "test-access-key"
}, this.GetLoggedInUser())).ThrowIfError();
Assert.False(this.WithSession(s => s.GetBL<RiverDivoBL>().ValidateRmmAccessKey("test-access-key")));
}
}