using Model;
using Newtonsoft.Json.Linq;
using NuGet.Frameworks;

namespace TestUnitaires
{

    public class TU_CustomTitle
    {
        [Theory]
        [InlineData("Trajectoire","morceau1.png","Sortie : 2020", "Musique/test.mp3")]
        [InlineData(null, "morceau1.png", "Sortie : 2020", "Musique/test.mp3")]
        [InlineData("Trajectoire", null, "Sortie : 2020", "Musique/test.mp3")]
        [InlineData("Trajectoire", "morceau1.png", null, "Musique/test.mp3")]
        [InlineData("Trajectoire", "morceau1png", "Sortie : 2020", "Musique/test.mp3")]
        [InlineData("Trajectoire", "morceau1. png", "Sortie : 2020", "Musique/test.mp3")]
        [InlineData("Trajectoire", "morceau1.png", "Sortie : 2020", null)]
        public void TU_Attributes(string name, string url, string info, string path)
        {
            CustomTitle ct = new CustomTitle(name, url, info, path);
            Assert.True(ct.Name != null && ct.Name.Length < 75);
            Assert.True(ct.ImageURL != null && ct.ImageURL.Contains('.'));
            Assert.False(ct.ImageURL.Contains(' '));
            Assert.True(ct.Information != null && ct.Information.Length < 500);
            Assert.True(ct.Path != null && ct.Path.Contains('.'));
            Assert.False(ct.Path.Contains(' '));
        }
    }

}