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,19 @@
[
{
I3D: '79',
ModuleCustomPropertyI3D: '15',
ObjectI3D: '10491',
ObjectKind: '10',
ValueInteger: null,
ValueDecimal: null,
ValueDateTime: null,
ValueString: null,
ValueBoolean: null,
ValueImage: 'System.Byte[]',
ValueText: null,
ValueEncryptedString: 'vqkEOWYpyq5da8hnQNDXVg==',
Sealed: 'True',
ValueBytes: 'System.Byte[]',
ValueEncryptedBytes: null
}
]
@@ -0,0 +1,290 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Administration.Customization;
using Centron.Common.TextCoding;
using Centron.DAO;
using Centron.Data.Entities.Administration.Customization;
using Centron.Data.WebServices.Administration.Customization;
using Centron.Interfaces;
using Centron.Interfaces.Administration.Customization;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.ModuleCustomProperties
{
public class ModuleCustomPropertiesTests : EndToEndTest
{
private CentronObjectKindNumeric _referenceObjectKind = CentronObjectKindNumeric.HelpdeskClass;
private int _referenceObjectI3D = 10491;
private string _testSecuriteyKey = "abcdedfghijklmnopqrstuvwxyz";
private Dictionary<CustomizationDataTypes, int> _propertyDataTypeToI3DMapping;
public ModuleCustomPropertiesTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
this._propertyDataTypeToI3DMapping = new Dictionary<CustomizationDataTypes, int>();
}
public override void Execute()
{
this.SaveCustomPropertyStructure();
this.GetCustomPropertyStructure();
this.SaveCustomPropertyValues();
this.GetCustomPropertyValues();
}
private void SaveCustomPropertyStructure()
{
using var session = new BLSession();
var result = session
.GetBL<ModuleCustomPropertyWebServiceBL>()
.SaveCustomPropertyStructure(
this.GetLoggedInUser(),
new List<ModuleCustomPropertyDTO>
{
new ModuleCustomPropertyDTO
{
Category = "cat",
DataType = CustomizationDataTypes.Hyperlink,
IsVisible = true,
Name = "most fitting subreddit",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 1,
},
new ModuleCustomPropertyDTO
{
Category = "cat",
DataType = CustomizationDataTypes.String,
IsVisible = true,
Name = "description",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 2,
},
new ModuleCustomPropertyDTO
{
Category = "dog",
DataType = CustomizationDataTypes.DateTime,
IsVisible = true,
Name = "date of first tail catching",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 3,
},
new ModuleCustomPropertyDTO
{
Category = "dog",
DataType = CustomizationDataTypes.Integer,
IsVisible = true,
Name = "number of legs",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 4,
},
new ModuleCustomPropertyDTO
{
Category = "trashpanda",
DataType = CustomizationDataTypes.Image,
IsVisible = false,
Name = "picture",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 4,
},
new ModuleCustomPropertyDTO
{
Category = "trashpanda",
DataType = CustomizationDataTypes.File,
IsVisible = false,
Name = "tax file",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 4,
},
new ModuleCustomPropertyDTO
{
Category = "trashpanda",
DataType = CustomizationDataTypes.EncryptedText,
IsVisible = false,
Name = "secret hideout password",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 4,
} ,
new ModuleCustomPropertyDTO
{
Category = "trashpanda",
DataType = CustomizationDataTypes.ComboBox,
IsVisible = false,
Name = "personality",
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
SortOrder = 4,
PossibleValues = new List<ModuleCustomPropertyPossibleValueDTO>
{
new ModuleCustomPropertyPossibleValueDTO
{
IsVisible = true,
Value = "cute"
},
new ModuleCustomPropertyPossibleValueDTO
{
IsVisible = true,
Value = "angery"
},
new ModuleCustomPropertyPossibleValueDTO
{
IsVisible = true,
Value = "trash"
},
}
}
},
this._referenceObjectKind,
this._referenceObjectI3D);
Assert.Equal(ResultStatus.Success, result.Status);
}
private void GetCustomPropertyStructure()
{
using var session = new BLSession();
var result = session
.GetBL<ModuleCustomPropertyWebServiceBL>()
.GetCustomPropertyStructureForModule(this.GetLoggedInUser(), new CustomPropertyFilter
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind
});
this.Verifier.Verify("ModuleCustomPropertyStructure", result);
// we save the type + the new I3Ds here so we can reuse the i3ds when saving values in later tests.
foreach (var currentProperty in result.Data)
{
if (this._propertyDataTypeToI3DMapping.ContainsKey(currentProperty.DataType))
continue;
this._propertyDataTypeToI3DMapping.Add(currentProperty.DataType, currentProperty.I3D);
}
}
private void SaveCustomPropertyValues()
{
using var session = new BLSession();
var textToBeEncrypted = "encryptedText";
var result = session
.GetBL<ModuleCustomPropertyValueWebServiceBL>()
.SaveCustomPropertyValues(
this.GetLoggedInUser(),
this._referenceObjectI3D,
this._referenceObjectKind,
new List<ModuleCustomPropertyValueDTO>
{
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.Hyperlink],
ValueString = "https://www.reddit.com/r/standardissuecat/",
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.String],
ValueString = "standard issue",
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.DateTime],
ValueDateTime = new DateTime(2020, 1, 1),
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.Integer],
ValueInteger = 3,
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.Image],
ValueBytes = new byte[20],
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.File],
ValueBytes = new byte[20],
ValueString = "trash_accounting_numbers.csv",
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
Sealed = true,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.EncryptedText],
ValueEncryptedString = textToBeEncrypted,
},
new ModuleCustomPropertyValueDTO
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind,
Sealed = true,
ModuleCustomPropertyI3D = this._propertyDataTypeToI3DMapping[CustomizationDataTypes.ComboBox],
ValueInteger = 1, // we can safely us I3D 1 here as this table is completely new
},
},
this._testSecuriteyKey);
Assert.Equal(ResultStatus.Success, result.Status);
// we want to test that the values actually get properly encrypted in the database
var encryptedText = new AESCryptoLogic().EncryptText(textToBeEncrypted, this._testSecuriteyKey);
this.Verifier.VerifyTable("EncryptedModuleCustomPropertyValueEntity", "ModuleCustomPropertyValues", $"ValueEncryptedString = '{encryptedText}'");
}
private void GetCustomPropertyValues()
{
using var session = new BLSession();
var result = session
.GetBL<ModuleCustomPropertyValueWebServiceBL>()
.GetCustomPropertyValues(new CustomPropertyValueFilter
{
ObjectI3D = this._referenceObjectI3D,
ObjectKind = this._referenceObjectKind
},
this._testSecuriteyKey);
this.Verifier.Verify("ModuleCustomPropertyValues", result);
}
}
}
@@ -0,0 +1,136 @@
{
Data: [
{
Category: 'cat',
DataType: 10,
I3D: 9,
IsMandatory: false,
IsVisible: true,
Name: 'most fitting subreddit',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 1,
ValueMask: null
},
{
Category: 'cat',
DataType: 4,
I3D: 10,
IsMandatory: false,
IsVisible: true,
Name: 'description',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 2,
ValueMask: null
},
{
Category: 'dog',
DataType: 3,
I3D: 11,
IsMandatory: false,
IsVisible: true,
Name: 'date of first tail catching',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 3,
ValueMask: null
},
{
Category: 'dog',
DataType: 1,
I3D: 12,
IsMandatory: false,
IsVisible: true,
Name: 'number of legs',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 4,
ValueMask: null
},
{
Category: 'trashpanda',
DataType: 6,
I3D: 13,
IsMandatory: false,
IsVisible: true,
Name: 'picture',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 4,
ValueMask: null
},
{
Category: 'trashpanda',
DataType: 9,
I3D: 14,
IsMandatory: false,
IsVisible: true,
Name: 'tax file',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 4,
ValueMask: null
},
{
Category: 'trashpanda',
DataType: 8,
I3D: 15,
IsMandatory: false,
IsVisible: true,
Name: 'secret hideout password',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [],
Sealable: false,
SortOrder: 4,
ValueMask: null
},
{
Category: 'trashpanda',
DataType: 11,
I3D: 16,
IsMandatory: false,
IsVisible: true,
Name: 'personality',
ObjectI3D: 10491,
ObjectKind: 10,
PossibleValues: [
{
I3D: 1,
IsVisible: true,
Value: 'cute'
},
{
I3D: 2,
IsVisible: true,
Value: 'angery'
},
{
I3D: 3,
IsVisible: true,
Value: 'trash'
}
],
Sealable: false,
SortOrder: 4,
ValueMask: null
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,144 @@
{
Data: [
{
I3D: 73,
ModuleCustomPropertyI3D: 9,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: null,
ValueString: 'https://www.reddit.com/r/standardissuecat/',
ValueText: null
},
{
I3D: 74,
ModuleCustomPropertyI3D: 10,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: null,
ValueString: 'standard issue',
ValueText: null
},
{
I3D: 75,
ModuleCustomPropertyI3D: 11,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: DateTime,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: null,
ValueString: null,
ValueText: null
},
{
I3D: 76,
ModuleCustomPropertyI3D: 12,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: 3,
ValueString: null,
ValueText: null
},
{
I3D: 77,
ModuleCustomPropertyI3D: 13,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: 'AAAAAAAAAAAAAAAAAAAAAAAAAAA=',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: null,
ValueString: null,
ValueText: null
},
{
I3D: 78,
ModuleCustomPropertyI3D: 14,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: false,
ValueBoolean: null,
ValueBytes: 'AAAAAAAAAAAAAAAAAAAAAAAAAAA=',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: null,
ValueString: 'trash_accounting_numbers.csv',
ValueText: null
},
{
I3D: 79,
ModuleCustomPropertyI3D: 15,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: true,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: 'encryptedText',
ValueImage: '',
ValueInteger: null,
ValueString: null,
ValueText: null
},
{
I3D: 80,
ModuleCustomPropertyI3D: 16,
ObjectI3D: 10491,
ObjectKind: 10,
Sealed: true,
ValueBoolean: null,
ValueBytes: '',
ValueDateTime: null,
ValueDecimal: null,
ValueEncryptedBytes: null,
ValueEncryptedString: null,
ValueImage: '',
ValueInteger: 1,
ValueString: null,
ValueText: null
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}