Files
webzine/Webzine.Entity.Tests/StyleTests.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

49 lines
1.4 KiB
C#

namespace Webzine.Entity.Tests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
/// <summary>
/// Tests de l'entité <see cref="Style"/>.
/// 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 StyleTests
{
[TestMethod]
public void StyleHasIdStyle()
{
Common.HasProperty(typeof(Style), nameof(Style.IdStyle));
}
[TestMethod]
public void StyleHasLibelle()
{
Common.HasProperty(typeof(Style), nameof(Style.Libelle));
}
[TestMethod]
public void StyleHasLibelleDisplayValid()
{
Common.AttributDisplay(typeof(Style), nameof(Style.Libelle), "Libellé");
}
[TestMethod]
public void StyleHasLibelleRequis()
{
Common.AttributRequis(typeof(Style), nameof(Style.Libelle));
}
[TestMethod]
public void StyleHasLibelleTailleMin2()
{
Common.AttributLongueurMin(typeof(Style), nameof(Style.Libelle), 2);
}
[TestMethod]
public void StyleHasLibelleTailleMax50()
{
Common.AttributLongueurMax(typeof(Style), nameof(Style.Libelle), 50);
}
}
}