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>
28 lines
724 B
C#
28 lines
724 B
C#
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);
|
|
}
|
|
}
|