Ajoute les thèmes communs sur les fiches de livres
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
e28d5bce32
commit
c2d408afc6
@@ -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