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
56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using Centron.BusinessLogic;
|
|
using Centron.BusinessLogic.Sales.Receipts.DataAndResults;
|
|
using Centron.BusinessLogic.WebServices.Sales.Receipts;
|
|
using Centron.Data.WebServices.Sales.Receipts.Offers;
|
|
using Centron.Interfaces;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.ReceiptReminderDate
|
|
{
|
|
public class ReceiptReminderDateTests : EndToEndTest
|
|
{
|
|
public ReceiptReminderDateTests(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public override void Execute()
|
|
{
|
|
const int OfferI3D = 6690;
|
|
|
|
var offer = this.GetOffer(OfferI3D);
|
|
var newOfferVersion = this.GetNewOfferVersion(OfferI3D);
|
|
|
|
Assert.NotEqual(offer.Date, newOfferVersion.Date); //Receipt.Date should be updated
|
|
Assert.NotEqual(offer.ReminderDate, newOfferVersion.ReminderDate); //Receipt.ReminderDate should be updated as well
|
|
}
|
|
|
|
private ReceiptOfferDTO GetOffer(int offerI3D)
|
|
{
|
|
using var session = new BLSession();
|
|
var result = session.GetBL<ReceiptWebServiceBL>().GetReceiptByI3D(offerI3D, CentronObjectKindNumeric.OfferClass);
|
|
|
|
return (ReceiptOfferDTO)result.Data;
|
|
}
|
|
|
|
private ReceiptOfferDTO GetNewOfferVersion(int offerI3D)
|
|
{
|
|
using var session = new BLSession();
|
|
|
|
var result = session.GetBL<ReceiptWebServiceBL>().CreateNewVersion(
|
|
CentronObjectKindNumeric.OfferClass,
|
|
offerI3D,
|
|
version: null,
|
|
newContactPersonI3D: null,
|
|
this.GetLoggedInUser().User,
|
|
new CreateNewVersionData
|
|
{
|
|
IgnoreCallbacks = true,
|
|
});
|
|
|
|
return (ReceiptOfferDTO)result.Data.Receipt;
|
|
}
|
|
}
|
|
} |