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
61 lines
2.2 KiB
C#
61 lines
2.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Centron.BusinessLogic;
|
|
using Centron.BusinessLogic.WebServices.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 Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.TicketTests.Ticket134784;
|
|
|
|
public class Ticket134784Tests : EndToEndTest
|
|
{
|
|
public Ticket134784Tests(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public override void Execute()
|
|
{
|
|
var property = this.PrepareDatabase();
|
|
|
|
using var session = new BLSession();
|
|
var values = new List<ModuleCustomPropertyValueDTO>
|
|
{
|
|
new ModuleCustomPropertyValueDTO
|
|
{
|
|
ValueDecimal = 1.5m,
|
|
ModuleCustomPropertyI3D = property.I3D
|
|
}
|
|
};
|
|
|
|
session.GetBL<ModuleCustomPropertyValueWebServiceBL>().SaveCustomPropertyValues(
|
|
this.GetLoggedInUser(),
|
|
objectI3D: 1,
|
|
CentronObjectKindNumeric.OfferClass,
|
|
values).ThrowIfError();
|
|
|
|
this.Verifier.VerifyTable("CustomPropertyValues", "dbo.ModuleCustomPropertyValues", $"ModuleCustomPropertyI3D = {property.I3D}");
|
|
}
|
|
|
|
private ModuleCustomPropertyDTO PrepareDatabase()
|
|
{
|
|
var customProperties = new List<ModuleCustomPropertyDTO>
|
|
{
|
|
new ModuleCustomPropertyDTO
|
|
{
|
|
DataType = CustomizationDataTypes.Decimal,
|
|
Name = "Gleitkommazahl",
|
|
Category = "Allgemein",
|
|
IsVisible = true,
|
|
}
|
|
};
|
|
this.WithSession(s => s.GetBL<ModuleCustomPropertyWebServiceBL>().SaveCustomPropertyStructure(this.GetLoggedInUser(), customProperties, CentronObjectKindNumeric.OfferClass).ThrowIfError());
|
|
|
|
var properties = this.WithSession(s => s.GetBL<ModuleCustomPropertyWebServiceBL>().GetCustomPropertyStructureForModule(this.GetLoggedInUser(), new CustomPropertyFilter { ObjectKind = CentronObjectKindNumeric.OfferClass }).ThrowIfError());
|
|
return properties.First();
|
|
}
|
|
} |