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
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,112 @@
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using Centron.Data.Entities.DataExchange.BookKeeping.Export;
using Centron.Gateway.DataExchange.BookKeeping.Abacus;
using Centron.Interfaces.DataExchange.BookKeeping;
using NSubstitute;
namespace Centron.Tests.BL.DataExchange.BookKeeping.Abacus;
public class BookKeepingExportAbacusTest
{
[Theory]
[InlineData("2024.00")]
[InlineData("2023.00")]
[InlineData("2020.00")]
public void SupplierReceiptExport_DoesNotWriteTaxTransferTypeForModernKreditorVersions(string kreditorReceiptVersion)
{
var result = CreateExport(kreditorReceiptVersion);
var document = XDocument.Parse((string)result.File);
Assert.Empty(document.Descendants("TaxTransferType"));
Assert.Equal("KRED", document.Root?.Element("Task")?.Element("Parameter")?.Element("Application")?.Value);
Assert.Equal("Document", document.Root?.Element("Task")?.Element("Parameter")?.Element("Id")?.Value);
Assert.Equal(kreditorReceiptVersion, document.Root?.Element("Task")?.Element("Parameter")?.Element("Version")?.Value);
}
[Theory]
[InlineData("2018.00")]
[InlineData("2015.00")]
public void SupplierReceiptExport_WritesTaxTransferTypeForLegacyKreditorVersions(string kreditorReceiptVersion)
{
var result = CreateExport(kreditorReceiptVersion);
var document = XDocument.Parse((string)result.File);
var taxTransferType = Assert.Single(document.Descendants("TaxTransferType"));
Assert.Equal("0", taxTransferType.Value);
Assert.Equal(kreditorReceiptVersion, document.Root?.Element("Task")?.Element("Parameter")?.Element("Version")?.Value);
}
private static IBookKeepingReceiptExportFileGeneratorResult CreateExport(string kreditorReceiptVersion)
{
var sut = new BookKeepingExportAbacus();
var result = sut.GetReceiptsBookingData(
new[] { CreateSupplierReceipt() },
CreateSettings(kreditorReceiptVersion),
CreateUserSettings(),
customInterfaceSettings: null,
customInterfaceColumns: null);
Assert.True(result.IsSuccessful, result.Message);
Assert.Empty(result.FailedList);
return result;
}
private static BookKeepingExportConfiguration CreateSettings(string kreditorReceiptVersion)
{
return new BookKeepingExportConfiguration
{
KreditorReceiptVersion = kreditorReceiptVersion,
ReceiptsExportAllPositions = true
};
}
private static BookKeepingExportUserSettings CreateUserSettings()
{
return new BookKeepingExportUserSettings
{
ExportDateFrom = new DateTime(2026, 1, 1),
ExportDateTo = new DateTime(2026, 1, 31)
};
}
private static IBookKeepingReceipt CreateSupplierReceipt()
{
var receipt = Substitute.For<IBookKeepingReceipt>();
receipt.Number.Returns(4711);
receipt.Date.Returns(new DateTime(2026, 1, 15));
receipt.ExternalReceiptDate.Returns(new DateTime(2026, 1, 14));
receipt.ExternalReceiptNumber.Returns("EXT-4711");
receipt.Type.Returns(BookKeepingReceiptKind.SupplierInvoice);
receipt.AddressBookKeepingNumber.Returns("70001");
receipt.CurrencyISOCode.Returns("CHF");
receipt.PaymentTypeNumber.Returns("30");
receipt.BankNumber.Returns(1);
receipt.NetPriceComplete.Returns(100m);
receipt.TaxPriceComplete.Returns(8.1m);
receipt.NetPriceFCComplete.Returns(100m);
receipt.TaxPriceFCComplete.Returns(8.1m);
var item = CreateReceiptItem();
receipt.Items.Returns(new List<IBookKeepingReceiptItem> { item });
return receipt;
}
private static IBookKeepingReceiptItem CreateReceiptItem()
{
var item = Substitute.For<IBookKeepingReceiptItem>();
item.Position.Returns(1);
item.ProfitAndLossAccount.Returns(4000);
item.NetPriceTotalComplete.Returns(100m);
item.TaxPriceTotalComplete.Returns(8.1m);
item.NetPriceTotalFCComplete.Returns(100m);
item.TaxPriceTotalFCComplete.Returns(8.1m);
item.TaxRate.Returns(8.1m);
item.VATCode.Returns("81");
item.Text.Returns("Test position");
return item;
}
}
@@ -0,0 +1,432 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Centron.Data.Entities.DataExchange.BookKeeping.Export;
using Centron.Gateway.DataExchange.BookKeeping.DatevXMLOnline2020;
using Centron.Interfaces.BL;
using Centron.Interfaces.DataExchange.BookKeeping;
using CentronSoftware.Centron.WebServices.Entities.DataExchange.Exports;
using NSubstitute;
namespace Centron.Tests.BL.DataExchange.BookKeeping.DatevXMLOnline2020;
/// <summary>
/// Verifies that the new DATEV-Belegtransfer ApplicationSetting
/// <c>UseAccountFromDifferentInvoiceAddress</c> (Ticket 160066) is correctly honoured
/// in <see cref="BookKeepingExportDatevXmlOnline_2020.CreateReceivableLedger"/> and
/// has no effect on <see cref="BookKeepingExportDatevXmlOnline_2020.CreatePayableLedger"/>.
/// </summary>
public class BookKeepingExportDatevXmlOnline_2020Test
{
private const string CustomerAccount = "10000";
private const string AlternateInvoiceAccount = "20000";
private const string CustomerNumberAtSupplier = "ZZZ-99";
private const string CustomerName = "Customer GmbH";
private const string AlternateInvoiceName = "Alt Recipient AG";
private const string CustomerCity = "Berlin";
private const string AlternateInvoiceCity = "Hamburg";
// ---------- CreateReceivableLedger: gating of partyId ----------
[Fact]
public void Receivable_FlagTrue_AltSet_UsesAlternateAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(AlternateInvoiceAccount, result.Data.partyId);
}
[Fact]
public void Receivable_FlagFalse_AltSet_UsesCustomerAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: false);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerAccount, result.Data.partyId);
}
[Fact]
public void Receivable_FlagTrue_AltEmpty_FallsBackToCustomerAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: string.Empty);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerAccount, result.Data.partyId);
}
[Fact]
public void Receivable_FlagTrue_AltWhitespaceOnly_FallsBackToCustomerAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: " ");
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerAccount, result.Data.partyId);
}
[Fact]
public void Receivable_FlagFalse_NoAddressBookKeepingNumber_PartyIdIsNull()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: string.Empty,
altInvoiceAccount: null);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: false);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Null(result.Data.partyId);
}
// ---------- CreateReceivableLedger: name / city / bpAccountNo + bookingText follow the alternate recipient ----------
[Fact]
public void Receivable_FlagTrue_AltSet_UsesAlternateNameAndCityAndBpAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
altInvoiceName: AlternateInvoiceName,
altInvoiceCity: AlternateInvoiceCity);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(AlternateInvoiceName, result.Data.customerName);
Assert.Equal(AlternateInvoiceCity, result.Data.customerCity);
Assert.Equal(int.Parse(AlternateInvoiceAccount), result.Data.bpAccountNo);
}
[Fact]
public void Receivable_FlagFalse_AltSet_KeepsPrimaryNameCityBpAccount()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
altInvoiceName: AlternateInvoiceName,
altInvoiceCity: AlternateInvoiceCity);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: false);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerName, result.Data.customerName);
Assert.Equal(CustomerCity, result.Data.customerCity);
Assert.Equal(int.Parse(CustomerAccount), result.Data.bpAccountNo);
}
[Fact]
public void Receivable_FlagTrue_AltAccountEmpty_FallsBackForAllFields()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: string.Empty,
altInvoiceName: AlternateInvoiceName,
altInvoiceCity: AlternateInvoiceCity);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerName, result.Data.customerName);
Assert.Equal(CustomerCity, result.Data.customerCity);
Assert.Equal(int.Parse(CustomerAccount), result.Data.bpAccountNo);
}
[Fact]
public void Receivable_FlagTrue_AltAccountSet_AltNameAndCityEmpty_FallsBackForNameAndCity()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
altInvoiceName: null,
altInvoiceCity: "");
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerName, result.Data.customerName);
Assert.Equal(CustomerCity, result.Data.customerCity);
Assert.Equal(int.Parse(AlternateInvoiceAccount), result.Data.bpAccountNo);
Assert.Equal(AlternateInvoiceAccount, result.Data.partyId);
}
[Fact]
public void Receivable_FlagTrue_BookingTextUsesAlternateName()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
altInvoiceName: AlternateInvoiceName,
altInvoiceCity: AlternateInvoiceCity);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true, useIndividualBookingText: false);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Contains(AlternateInvoiceName, result.Data.bookingText);
Assert.DoesNotContain(CustomerName, result.Data.bookingText);
}
[Fact]
public void Receivable_FlagFalse_BookingTextUsesPrimaryName()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
altInvoiceName: AlternateInvoiceName,
altInvoiceCity: AlternateInvoiceCity);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: false, useIndividualBookingText: false);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Contains(CustomerName, result.Data.bookingText);
Assert.DoesNotContain(AlternateInvoiceName, result.Data.bookingText);
}
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
public void Receivable_EmptyIndividualBookingText_UsesDefaultBookingText(string? bookingText)
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: null);
var settings = CreateSettings(
useAccountFromDifferentInvoiceAddress: false,
useIndividualBookingText: true,
individualBookingText: bookingText);
var result = sut.CreateReceivableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerName + " - 1", result.Data.bookingText);
}
// ---------- CreatePayableLedger: regression — flag must not affect supplier path ----------
[Theory]
[InlineData(true)]
[InlineData(false)]
public void Payable_FlagToggle_DoesNotChangePartyId_AlwaysAddressBookKeepingNumber(bool flag)
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateSupplierReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
customerNumberAtSupplier: null);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: flag);
var result = sut.CreatePayableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerAccount, result.Data.partyId);
}
[Fact]
public void Payable_CustomerNumberAtSupplier_OverridesAddressBookKeepingNumber()
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateSupplierReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: AlternateInvoiceAccount,
customerNumberAtSupplier: CustomerNumberAtSupplier);
var settings = CreateSettings(useAccountFromDifferentInvoiceAddress: true);
var result = sut.CreatePayableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal(CustomerNumberAtSupplier, result.Data.partyId);
}
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
public void Payable_EmptyIndividualBookingText_UsesDefaultBookingText(string? bookingText)
{
var sut = new BookKeepingExportDatevXmlOnline_2020();
var receipt = CreateSupplierReceipt(addressBookKeepingNumber: CustomerAccount,
altInvoiceAccount: null,
customerNumberAtSupplier: null);
var settings = CreateSettings(
useAccountFromDifferentInvoiceAddress: false,
useIndividualBookingText: true,
individualBookingText: bookingText);
var result = sut.CreatePayableLedger(CreateSplit(), splitCostCentre: null, receipt, settings);
Assert.True(result.IsSuccess);
Assert.Equal("Supplier GmbH - EXT-1", result.Data.bookingText);
}
[Fact]
public void Split_UsesItemServicePeriodToAsDeliveryDate_WhenItemServicePeriodIsSingleDate()
{
var (receipt, item) = CreateReceiptForSplit();
item.ServicePeriodFrom.Returns(new DateTime(2026, 6, 2, 10, 0, 0));
item.ServicePeriodTo.Returns(new DateTime(2026, 6, 2, 13, 30, 0));
var split = Assert.Single(GetSplits(receipt));
Assert.Equal(new DateTime(2026, 6, 2), split.DeliveryDate);
}
[Fact]
public void Split_UsesReceiptServicePeriodToAsDeliveryDate_WhenItemServicePeriodIsEmpty()
{
var (receipt, item) = CreateReceiptForSplit();
item.DeliveryDate.Returns((DateTime?)null);
receipt.ServicePeriodFrom.Returns(new DateTime(2026, 6, 3, 8, 0, 0));
receipt.ServicePeriodTo.Returns(new DateTime(2026, 6, 3, 18, 0, 0));
var split = Assert.Single(GetSplits(receipt));
Assert.Equal(new DateTime(2026, 6, 3), split.DeliveryDate);
}
[Fact]
public void Split_UsesItemDeliveryDate_WhenItemServicePeriodIsRange()
{
var (receipt, item) = CreateReceiptForSplit();
item.ServicePeriodFrom.Returns(new DateTime(2026, 6, 2, 10, 0, 0));
item.ServicePeriodTo.Returns(new DateTime(2026, 6, 3, 13, 30, 0));
item.DeliveryDate.Returns(new DateTime(2026, 6, 6));
receipt.ServicePeriodFrom.Returns(new DateTime(2026, 6, 4, 8, 0, 0));
receipt.ServicePeriodTo.Returns(new DateTime(2026, 6, 4, 18, 0, 0));
var split = Assert.Single(GetSplits(receipt));
Assert.Equal(new DateTime(2026, 6, 3), split.DeliveryDate);
}
// ---------- helpers ----------
private static BookKeepingExportAccountSplitDTO CreateSplit() => new()
{
Account = 8400,
Amount = 100m,
TaxAmount = 19m,
AmountFC = 100m,
TaxAmountFC = 19m,
TaxRate = 19m,
TaxId = "9"
};
private static DatevOnlineExportSettingsDTO CreateSettings(bool useAccountFromDifferentInvoiceAddress, bool useIndividualBookingText = true, string? individualBookingText = "Test") => new()
{
UseAccountFromDifferentInvoiceAddress = useAccountFromDifferentInvoiceAddress,
ExportCaption = false,
ExportDeliveryDate = false,
// Use individual booking texts to keep CreateBookingText on the explicit-template branch — safer with mocks.
UseIndividualBookingTextForCustomerReceipts = useIndividualBookingText,
IndividualBookingTextForCustomerReceipts = individualBookingText,
UseIndividualBookingTextForSupplierReceipts = useIndividualBookingText,
IndividualBookingTextForSupplierReceipts = individualBookingText
};
private static IList<BookKeepingExportAccountSplitDTO> GetSplits(IBookKeepingReceipt receipt)
{
var helperType = typeof(BookKeepingExportDatevXmlOnline_2020).Assembly.GetType("Centron.Gateway.DataExchange.BookKeeping.BookKeepingExportHelper");
Assert.NotNull(helperType);
var helper = helperType.GetProperty("Instance", BindingFlags.Public | BindingFlags.Static)?.GetValue(null);
Assert.NotNull(helper);
var method = helperType.GetMethod("GetPositionsThroughSplit", BindingFlags.Public | BindingFlags.Instance);
Assert.NotNull(method);
var result = (Result<IList<BookKeepingExportAccountSplitDTO>>)method.Invoke(helper, new object[]
{
receipt,
new BookKeepingExportConfiguration { ExportPerformanceDate = true },
false,
false
})!;
Assert.True(result.IsSuccess, result.Message);
return result.Data;
}
private static (IBookKeepingReceipt Receipt, IBookKeepingReceiptItem Item) CreateReceiptForSplit()
{
var receipt = CreateCustomerReceipt(addressBookKeepingNumber: CustomerAccount, altInvoiceAccount: null);
receipt.NetPriceComplete.Returns(100m);
receipt.TaxPriceComplete.Returns(19m);
receipt.NetPriceFCComplete.Returns(100m);
receipt.TaxPriceFCComplete.Returns(19m);
var item = Substitute.For<IBookKeepingReceiptItem>();
item.ProfitAndLossAccount.Returns(8400);
item.TaxRate.Returns(19m);
item.VATCode.Returns("9");
item.DeliveryDate.Returns(new DateTime(2026, 6, 4));
item.NetPriceTotalComplete.Returns(100m);
item.TaxPriceTotalComplete.Returns(19m);
item.NetPriceTotalFCComplete.Returns(100m);
item.TaxPriceTotalFCComplete.Returns(19m);
receipt.Items.Returns(new List<IBookKeepingReceiptItem> { item });
return (receipt, item);
}
private static IBookKeepingReceipt CreateCustomerReceipt(string addressBookKeepingNumber, string? altInvoiceAccount,
string? altInvoiceName = null, string? altInvoiceCity = null,
string addressCity = CustomerCity)
{
var r = Substitute.For<IBookKeepingReceipt>();
r.Number.Returns(1);
r.Date.Returns(new DateTime(2026, 1, 15));
r.Type.Returns(BookKeepingReceiptKind.Invoice);
r.CurrencyISOCode.Returns("EUR");
r.CurrencyFactor.Returns(1.0);
r.AddressName.Returns(CustomerName);
r.AddressCity.Returns(addressCity);
r.AddressBookKeepingNumber.Returns(addressBookKeepingNumber);
r.BookKeepingNumberDifferentInvoiceAddress.Returns(altInvoiceAccount);
r.AddressNameDifferentInvoiceAddress.Returns(altInvoiceName);
r.AddressCityDifferentInvoiceAddress.Returns(altInvoiceCity);
return r;
}
private static IBookKeepingReceipt CreateSupplierReceipt(string addressBookKeepingNumber, string? altInvoiceAccount, string? customerNumberAtSupplier)
{
var r = Substitute.For<IBookKeepingReceipt>();
r.Number.Returns(1);
r.Date.Returns(new DateTime(2026, 1, 15));
r.ExternalReceiptDate.Returns(new DateTime(2026, 1, 14));
r.ExternalReceiptNumber.Returns("EXT-1");
r.Type.Returns(BookKeepingReceiptKind.SupplierInvoice);
r.CurrencyISOCode.Returns("EUR");
r.CurrencyFactor.Returns(1.0);
r.AddressName.Returns("Supplier GmbH");
r.AddressCity.Returns("Berlin");
r.AddressBookKeepingNumber.Returns(addressBookKeepingNumber);
r.BookKeepingNumberDifferentInvoiceAddress.Returns(altInvoiceAccount);
r.CustomerNumberAtSupplier.Returns(customerNumberAtSupplier);
return r;
}
}