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
68 lines
2.5 KiB
C#
68 lines
2.5 KiB
C#
using System.Linq;
|
|
using Centron.BusinessLogic.Sales.Receipts.DataAndResults;
|
|
using Centron.BusinessLogic.WebServices.Sales.Receipts;
|
|
using Centron.Core.Extensions;
|
|
using Centron.Data.WebServices.Sales.Receipts.Offers;
|
|
using Centron.Interfaces;
|
|
using Centron.Interfaces.Administration.Environment;
|
|
using Centron.Interfaces.BL;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using CentronSoftware.Centron.WebServices.Connections;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.TicketTests.Ticket145215;
|
|
|
|
public class Ticket145215Tests : EndToEndTest
|
|
{
|
|
public Ticket145215Tests(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public const int CustomerI3D = 10022;
|
|
public const int ItemCount = 2500;
|
|
|
|
public override void Execute()
|
|
{
|
|
// In this ticket, the problem appeared when saving a receipt with more than 2100 positions
|
|
// The SaveReceiptRepository would construct a SQL statement that had all position I3Ds as parameters
|
|
// and thus exceeded the 2100 parameter limit from MSSQL Server
|
|
|
|
var offer = (ReceiptOfferDTO)this.WithSession(s => s.GetBL<ReceiptWebServiceBL>().CreateNewReceipt(
|
|
CentronObjectKindNumeric.OfferClass,
|
|
this.GetLoggedInUser(),
|
|
CustomerI3D,
|
|
new CreateReceiptData
|
|
{
|
|
IgnoreCallbacks = true,
|
|
},
|
|
addressI3D: null,
|
|
contactPersonI3D: null,
|
|
insertSalutationAndAgreement: true,
|
|
ignoreDefaultContract: false,
|
|
insertCustomerDiscount: true)).ThrowIfError().Receipt;
|
|
offer.Items.Clear();
|
|
|
|
var item = (ReceiptOfferItemDTO)this.WithSession(s => s.GetBL<ReceiptItemWebServiceBL>().CreateFreetextReceiptItem(offer, "Hallo Welt"));
|
|
|
|
for (int i = 0; i < ItemCount; i++)
|
|
{
|
|
offer.Items.Add(CopyExtensions.Clone(item, KnownTypes.GetKnownTypes(null).ToArray()));
|
|
}
|
|
|
|
var savedReceipt = (ReceiptOfferDTO)this.WithSession(s => s.GetBL<ReceiptWebServiceBL>().SaveReceipt(
|
|
offer,
|
|
this.GetLoggedInUser().User,
|
|
new SaveReceiptData
|
|
{
|
|
IgnoreCallbacks = true,
|
|
},
|
|
autoLockIfNewReceipt: false,
|
|
CreatedThroughApplication.WebServices,
|
|
receiptTemplateFolderI3D: null)).ThrowIfError().Receipt;
|
|
|
|
Assert.NotNull(savedReceipt);
|
|
Assert.Equal(ItemCount, savedReceipt.Items.Count);
|
|
}
|
|
} |