Files
Christoph Schwörer f045b99a25 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
2026-08-26 07:43:51 +02:00

114 lines
3.7 KiB
C#

using Centron.BusinessLogic;
using Centron.BusinessLogic.Urls;
using Centron.Data.Entities.Administration.Logins;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Urls;
using System;
using System.Collections.Generic;
using System.Linq;
using Centron.Interfaces.BL;
using System.Text;
using System.Threading.Tasks;
using Xunit.Abstractions;
using Centron.Interfaces.Urls;
using Centron.Interfaces;
namespace Centron.Tests.EndToEnd.Tests.Urls
{
public class SimpleUrlTest : EndToEndTest
{
private List<SimpleUrlDTO> _simpleUrls = new List<SimpleUrlDTO>();
public SimpleUrlTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
this.CreateSimpleUrls();
this.LoadSimpleUrlWithFilter();
this.LoadSimpleUrlByI3D();
}
private void CreateSimpleUrls()
{
using var session = new BLSession();
var simpleUrlWebServiceBL = session.GetBL<SimpleUrlWebServiceBL>();
var user = GetLoggedInUser();
var simpleUrls1 = new SimpleUrlDTO
{
ObjectI3D = 1,
ObjectKind = CentronObjectKindNumeric.Account,
Caption = "Test URL 1",
URL = "https://www.example.com",
IsVisible = true,
};
var simpleUrls2 = new SimpleUrlDTO
{
ObjectI3D = 2,
ObjectKind = CentronObjectKindNumeric.Account,
Caption = "Test URL 2",
URL = "https://www.example2.com",
IsVisible = true,
};
var simpleUrls3 = new SimpleUrlDTO
{
ObjectI3D = 3,
ObjectKind = CentronObjectKindNumeric.Account,
Caption = "Test URL 3",
URL = "https://www.example3.com",
IsVisible = false,
};
var savedResult1 = simpleUrlWebServiceBL.SaveOrUpdateSimpleUrl(simpleUrls1, user).ThrowIfError();
var savedResult2 = simpleUrlWebServiceBL.SaveOrUpdateSimpleUrl(simpleUrls2, user).ThrowIfError();
var savedResult3 = simpleUrlWebServiceBL.SaveOrUpdateSimpleUrl(simpleUrls3, user).ThrowIfError();
this._simpleUrls.Add(savedResult1);
this._simpleUrls.Add(savedResult2);
this._simpleUrls.Add(savedResult3);
}
private void LoadSimpleUrlWithFilter()
{
using var session = new BLSession();
var simpleUrlWebServiceBL = session.GetBL<SimpleUrlWebServiceBL>();
var user = GetLoggedInUser();
var filter = new SimpleUrlFilter()
{
ObjectKind = CentronObjectKindNumeric.Account,
IsVisible = true
};
var result = simpleUrlWebServiceBL.GetSimpleUrlsByFilter(filter).ThrowIfError();
this.Verifier.Verify("GetSimpleUrlWithFilter", result);
}
private void LoadSimpleUrlByI3D()
{
using var session = new BLSession();
var simpleUrlWebServiceBL = session.GetBL<SimpleUrlWebServiceBL>();
var user = GetLoggedInUser();
var result1 = simpleUrlWebServiceBL.GetSimpleUrlByI3D(1,user).ThrowIfError();
var result2 = simpleUrlWebServiceBL.GetSimpleUrlByI3D(2, user).ThrowIfError();
var result3 = simpleUrlWebServiceBL.GetSimpleUrlByI3D(3, user).ThrowIfError();
this.Verifier.Verify("GetSimpleUrlByI3D", new[] { result1, result2, result3 });
}
}
}