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
41 lines
1.9 KiB
C#
41 lines
1.9 KiB
C#
using Centron.Data.Entities.Accounts;
|
|
using FluentNHibernate.Mapping;
|
|
|
|
namespace Centron.Tests.BL.DatabaseMappings
|
|
{
|
|
/// <summary>
|
|
/// <b>IMPORTANT</b>: This is a replacement class for the real <see cref="Centron.DAO.Mappings.Accounts.AccountSearchItemAccMaps"/> class for running in-memory unit tests.
|
|
/// The real mapping maps to a database view (cvw_AccountSearchAcc) which cannot be created in an in-memory SQLite database.
|
|
/// This test mapping creates a simple table with only the columns needed for the tests.
|
|
/// Make sure to keep this class in sync with the columns needed for your tests.
|
|
/// </summary>
|
|
public class AccountSearchItemAccMapsForTest : ClassMap<AccountSearchItemAcc>
|
|
{
|
|
public AccountSearchItemAccMapsForTest()
|
|
{
|
|
// Mark as read-only like the production mapping
|
|
ReadOnly();
|
|
|
|
// Use a simple table name instead of the view name
|
|
Table("AccountSearchItemAccTest");
|
|
|
|
// Map RowNumber as the ID (same as production mapping)
|
|
// Using Assigned generator since we won't be inserting via NHibernate
|
|
Id(m => m.RowNumber).Column("RowNumber").GeneratedBy.Assigned();
|
|
|
|
// Map AccountI3D as I3D (this is how it's queried in SetAccountReferenceProperties)
|
|
// This is the key property that the business logic queries by
|
|
Map(m => m.I3D).Column("AccountI3D");
|
|
|
|
// Map the columns used in SetAccountReferenceProperties
|
|
Map(m => m.CustomerNumber).Column("CustomerNumber").Nullable();
|
|
Map(m => m.SupplierNumber).Column("SupplierNumber").Nullable();
|
|
|
|
// Additional commonly used columns - add more as needed for tests
|
|
Map(m => m.AccountNumber).Column("AccountNumber").Nullable();
|
|
Map(m => m.AccountName).Column("AccountName").Nullable();
|
|
Map(m => m.IsActive).Column("IsActive").Nullable();
|
|
}
|
|
}
|
|
}
|