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
48 lines
2.2 KiB
C#
48 lines
2.2 KiB
C#
using Centron.BusinessLogic.WebServices.Sales.Receipts;
|
|
using Centron.Data.WebServices.Sales.Receipts.CreditVouchers;
|
|
using Centron.Interfaces;
|
|
using Centron.Interfaces.BL;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.TicketTests.Ticket136409;
|
|
|
|
public class Ticket136409Test : EndToEndTest
|
|
{
|
|
public Ticket136409Test(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public const int CreditVoucherI3D = 2;
|
|
|
|
public const string Address = "Some address";
|
|
public const int CustomerI3D = 10000;
|
|
public const int AddressI3D = 3;
|
|
public const int ContactPersonI3D = 4;
|
|
|
|
public override void Execute()
|
|
{
|
|
this.PrepareDatabase();
|
|
|
|
// In this ticket the problem was, that for ReceiptCreditVoucher, the DeliveryAddress and InvoiceAddress were not mapped for loading
|
|
|
|
var creditVoucher = (ReceiptCreditVoucherDTO)this.WithSession(s => s.GetBL<ReceiptWebServiceBL>().GetReceiptByI3D(CreditVoucherI3D, CentronObjectKindNumeric.CreditVoucherClass)).ThrowIfError();
|
|
Assert.Equal(Address, creditVoucher.DeliveryAddress);
|
|
Assert.Equal(CustomerI3D, creditVoucher.DeliveryAddressCustomerI3D);
|
|
Assert.Equal(AddressI3D, creditVoucher.DeliveryAddressAddressI3D);
|
|
Assert.Equal(ContactPersonI3D, creditVoucher.DeliveryAddressContactPersonI3D);
|
|
|
|
Assert.Equal(Address, creditVoucher.InvoiceAddress);
|
|
Assert.Equal(CustomerI3D, creditVoucher.InvoiceAddressCustomerI3D);
|
|
Assert.Equal(AddressI3D, creditVoucher.InvoiceAddressAddressI3D);
|
|
Assert.Equal(ContactPersonI3D, creditVoucher.InvoiceAddressContactPersonI3D);
|
|
}
|
|
|
|
private void PrepareDatabase()
|
|
{
|
|
this.Sql($"UPDATE dbo.GutKopf SET LiefKundEmpfaenger = '{Address}', LiefKundI3D = {CustomerI3D}, LiefKundAnschriftI3D = {AddressI3D}, LiefKundPersonI3D = {ContactPersonI3D} WHERE I3D = {CreditVoucherI3D}");
|
|
this.Sql($"UPDATE dbo.GutKopf SET RechKundEmpfaenger = '{Address}', RechKundI3D = {CustomerI3D}, RechKundAnschriftI3D = {AddressI3D}, RechKundPersonI3D = {ContactPersonI3D} WHERE I3D = {CreditVoucherI3D}");
|
|
}
|
|
} |