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
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using Centron.BusinessLogic;
|
|
using Centron.BusinessLogic.Mail.Factory;
|
|
using Centron.BusinessLogic.WebServices.Mail;
|
|
using Centron.Data.WebServices.Mail;
|
|
using Centron.Interfaces.Mail.Enums;
|
|
using Centron.Tests.EndToEnd.Infrastructure;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Centron.Tests.EndToEnd.Tests.Mails;
|
|
|
|
public class TestMailsTest : EndToEndTest
|
|
{
|
|
public TestMailsTest(ITestOutputHelper testOutputHelper)
|
|
: base(testOutputHelper)
|
|
{
|
|
}
|
|
|
|
public override void Execute()
|
|
{
|
|
var mails = TestMails.Start(() =>
|
|
{
|
|
this.SendMail("Betreff", "HalloWelt", "to@c-entron.de", "cc@c-entron.de", "bcc@c-entron.de");
|
|
this.SendMail("Another one!", "Hallo Universe", "to@c-entron.de", "cc@c-entron.de", "bcc@c-entron.de");
|
|
});
|
|
|
|
this.Verifier.Verify("SentMails", mails);
|
|
}
|
|
|
|
private void SendMail(string subject, string body, string to, string cc, string bcc)
|
|
{
|
|
using var session = new BLSession();
|
|
|
|
session.GetBL<SendMailWebserviceBL>().SendMail(
|
|
this.GetLoggedInUser(),
|
|
new[] { new MailRecipientDTO { RecipientAddress = to } },
|
|
new[] { new MailRecipientDTO { RecipientAddress = cc } },
|
|
new[] { new MailRecipientDTO { RecipientAddress = bcc } },
|
|
new MailSubjectDTO { SubjectText = subject },
|
|
new MailBodyDTO
|
|
{
|
|
Type = CentronMailBodyType.Plain,
|
|
Text = body
|
|
},
|
|
new MailAttachmentDTO[0],
|
|
generateCRM: null,
|
|
kinds: null,
|
|
settingsKind: null);
|
|
}
|
|
} |