MaBibli 1.0.0
Gestion de bibliothèque personnelle auto-hébergée : catalogue, prêts, scan de code-barres, consultation hors-ligne. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using MaBibli.Shared.Dtos;
|
||||
using MaBibli.Shared.Entites;
|
||||
|
||||
namespace MaBibli.Tests;
|
||||
|
||||
public class ThemesTests
|
||||
{
|
||||
[Fact]
|
||||
public void La_saisie_des_themes_separe_par_virgules_et_dedoublonne_sans_accents()
|
||||
{
|
||||
var themes = EnregistrementLivre.DecouperThemes(
|
||||
"Dark Fantasy, science-fiction, dark fantasy, , SCIENCE FICTION");
|
||||
|
||||
Assert.Equal(["Dark Fantasy", "science-fiction"], themes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Un_theme_recalcule_sa_forme_normalisee()
|
||||
{
|
||||
var theme = new Theme { Nom = " Cœur d'aventure " };
|
||||
|
||||
theme.RecalculerFormes();
|
||||
|
||||
Assert.Equal("Cœur d'aventure", theme.Nom);
|
||||
Assert.Equal("coeur d aventure", theme.NomNormalise);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user