Compare commits
No commits in common. "c645973b52b800bbd8da783039a50c764fd25dd3" and "4b9b8d5e789583b0f4a1306a750a428c295e8be2" have entirely different histories.
c645973b52
...
4b9b8d5e78
2 changed files with 6 additions and 13 deletions
|
|
@ -115,13 +115,6 @@ Quelques règles non capturées par `.editorconfig` :
|
||||||
- Préférer les types BCL (`int`, `string`) aux types framework
|
- Préférer les types BCL (`int`, `string`) aux types framework
|
||||||
(`Int32`, `String`).
|
(`Int32`, `String`).
|
||||||
- Préférer les expressions de pattern matching aux casts explicites.
|
- Préférer les expressions de pattern matching aux casts explicites.
|
||||||
- **Pas de `object` dans le code source applicatif.** Types de retour,
|
|
||||||
paramètres, champs, propriétés, variables locales : tout doit être
|
|
||||||
typé statiquement. `dynamic` est interdit pour les mêmes raisons.
|
|
||||||
Un cast en `object` est presque toujours le symptôme d'un contrat
|
|
||||||
qu'on a laissé s'effriter (DTO, payload, handler) — refactore
|
|
||||||
le contrat (record typé, DTO dédié, méthode dédiée) au lieu de
|
|
||||||
shimer avec un cast.
|
|
||||||
|
|
||||||
## Branches & commits
|
## Branches & commits
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ namespace Yavsc.Org.Tests
|
||||||
{
|
{
|
||||||
this.output = output;
|
this.output = output;
|
||||||
_serverFixture = serverFixture;
|
_serverFixture = serverFixture;
|
||||||
_logger = serverFixture.Logger!;
|
_logger = serverFixture.Logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task SendEMailSynchrone()
|
public void SendEMailSynchrone()
|
||||||
{
|
{
|
||||||
|
|
||||||
using IServiceScope scope = _serverFixture.Services.CreateScope();
|
using IServiceScope scope = _serverFixture.Services.CreateScope();
|
||||||
|
|
@ -32,12 +32,12 @@ namespace Yavsc.Org.Tests
|
||||||
scope.ServiceProvider.GetRequiredService<ISmtpClientFactory>());
|
scope.ServiceProvider.GetRequiredService<ISmtpClientFactory>());
|
||||||
|
|
||||||
output.WriteLine("SendEMailSynchrone ...");
|
output.WriteLine("SendEMailSynchrone ...");
|
||||||
await mailSender.SendEmailAsync
|
mailSender.SendEmailAsync
|
||||||
(
|
(
|
||||||
_serverFixture.SiteSettings!.Owner.Name,
|
_serverFixture.SiteSettings.Owner.Name,
|
||||||
_serverFixture.SiteSettings!.Owner.EMail,
|
_serverFixture.SiteSettings.Owner.EMail,
|
||||||
$"monthly email",
|
$"monthly email",
|
||||||
"test boby monthly email");
|
"test boby monthly email").Wait();
|
||||||
|
|
||||||
// Assert the SMTP roundtrip was short-circuited by the
|
// Assert the SMTP roundtrip was short-circuited by the
|
||||||
// recording fake installed in WebServerFixture: exactly
|
// recording fake installed in WebServerFixture: exactly
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue