Files
Christoph Schwörer f045b99a25 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
2026-08-26 07:43:51 +02:00

100 lines
3.5 KiB
C#

using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Warehousing.InventoryManagement;
using Centron.BusinessLogic.WebServices.Warehousing.InventoryManagement;
using Centron.Data.WebServices.Merchandise.MaterialGroups;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.MaterialGroups;
public class MaterialGroupTests : EndToEndTest
{
public MaterialGroupTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public const int MaterialGroupI3D = 3; // Dienstleistung
public const int SecondaryMaterialGroupI3D = 3; // Kulanz
public override void Execute()
{
this.SetGoodWillMaterialGroup();
this.SetGoodWillSecondaryMaterialGroup();
}
private void SetGoodWillMaterialGroup()
{
// Load material group
MaterialGroupDTO materialGroup;
using (var session = new BLSession())
{
var materialGroups = session.GetBL<MaterialGroupWebServiceBL>().GetMaterialGroups(new MaterialGroupFilter
{
I3D = MaterialGroupI3D
});
this.Verifier.Verify("MaterialGroups", materialGroups);
materialGroup = materialGroups.Single();
}
// Set GoodWill to true
materialGroup.IsGoodWillMaterialGroup = true;
// Save material group
using (var session = new BLSession())
{
var saveResult = session.GetBL<MaterialGroupWebServiceBL>().UpdateMaterialGroup(materialGroup, this.GetLoggedInUser().User);
this.Verifier.Verify("MaterialGroupSaveResult", saveResult);
}
// Load it again
using (var session = new BLSession())
{
var materialGroups = session.GetBL<MaterialGroupWebServiceBL>().GetMaterialGroups(new MaterialGroupFilter
{
I3D = MaterialGroupI3D
});
this.Verifier.Verify("MaterialGroupsAfterSave", materialGroups);
}
}
private void SetGoodWillSecondaryMaterialGroup()
{
// Load secondary material group
SecondaryMaterialGroupDTO secondaryMaterialGroup;
using (var session = new BLSession())
{
var materialGroups = session.GetBL<MaterialGroupWebServiceBL>().GetSecondaryMaterialGroups(new SecondaryMaterialGroupFilter
{
I3D = SecondaryMaterialGroupI3D
});
this.Verifier.Verify("SecondaryMaterialGroups", materialGroups);
secondaryMaterialGroup = materialGroups.Single();
}
// Set GoodWill to true
secondaryMaterialGroup.IsGoodWillMaterialGroup = true;
// Save secondary material group
using (var session = new BLSession())
{
var saveResult = session.GetBL<MaterialGroupWebServiceBL>().UpdateSecondaryMaterialGroup(secondaryMaterialGroup, this.GetLoggedInUser().User);
this.Verifier.Verify("SecondaryMaterialGroupSaveResult", saveResult);
}
// Load it again
using (var session = new BLSession())
{
var materialGroups = session.GetBL<MaterialGroupWebServiceBL>().GetSecondaryMaterialGroups(new SecondaryMaterialGroupFilter
{
I3D = MaterialGroupI3D
});
this.Verifier.Verify("SecondaryMaterialGroupsAfterSave", materialGroups);
}
}
}