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.
This commit is contained in:
55
Webzine.Entity.Tests/ArtisteTests.cs
Normal file
55
Webzine.Entity.Tests/ArtisteTests.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user