Files
webzine/Webzine.Entity.Tests/ArtisteTests.cs
mirage 86a87f75ce Add initial project structure and implement basic functionality
- Created MSTestSettings.cs to enable parallel test execution.
- Added StyleTests.cs and TitreTests.cs for unit testing of Style and Titre entities.
- Implemented Webzine.Entity.Tests project with necessary configurations.
- Created SeedDataLocal.cs and SeedDataSpotify.cs for local and Spotify data seeding.
- Established repository contracts for Artiste, Commentaire, Style, and Titre.
- Developed DbEntityRepository and LocalEntityRepository classes.
- Set up Webzine.WebApplication with controllers, logging, and Docker support.
- Configured NLog for logging and added necessary appsettings for development.
- Created initial views and layout for the web application.
- Added Dockerfile and docker-compose configuration for containerization.
2026-03-03 16:22:37 +01:00

55 lines
1.5 KiB
C#

namespace Webzine.Entity.Tests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
/// <summary>
/// Tests de l'entité <see cref="Artiste"/>.
/// Vérifie que les contraintes imposées (nom du champ, longueur max du champ,
/// champ obligatoire, libellé du champ, clé primaire...) sont bien respectées.
/// </summary>
[TestClass]
public class ArtisteTests
{
[TestMethod]
public void ArtisteHasIdArtiste()
{
Common.HasProperty(typeof(Artiste), nameof(Artiste.IdArtiste));
}
[TestMethod]
public void ArtisteHasNom()
{
Common.HasProperty(typeof(Artiste), nameof(Artiste.Nom));
}
[TestMethod]
public void ArtisteHasNomTailleMin1()
{
Common.AttributLongueurMin(typeof(Artiste), nameof(Artiste.Nom), 2);
}
[TestMethod]
public void ArtisteHasNomTailleMax50()
{
Common.AttributLongueurMax(typeof(Artiste), nameof(Artiste.Nom), 50);
}
[TestMethod]
public void ArtisteHasNomDisplayValid()
{
Common.AttributDisplay(typeof(Artiste), nameof(Artiste.Nom), "Nom de l'artiste");
}
[TestMethod]
public void ArtisteHasBiographie()
{
Common.HasProperty(typeof(Artiste), nameof(Artiste.Biographie));
}
[TestMethod]
public void ArtisteHasTitres()
{
Common.HasProperty(typeof(Artiste), nameof(Artiste.Titres));
}
}
}