correction test
continuous-integration/drone/push Build is failing Details

pull/32/head
parent 7ec752b8c5
commit f9f08a9f9f

@ -22,7 +22,6 @@ namespace Persistance
public static void sauvegarderListUsers()
{
throw new NotImplementedException();
}
List<Monstre> IMonsterDataManager.loadMonsters()

@ -25,7 +25,7 @@ namespace Persistance
}
void IMonsterDataManager.saveMonsters(List<Monstre> monstres)
{
throw new NotImplementedException();
}
List<Monstre> IMonsterDataManager.loadMonsters()

@ -1,4 +1,5 @@
using Model;
using Modèle;
namespace Tests
@ -7,20 +8,27 @@ namespace Tests
{
[Fact]
public void TestFullConstructor()
{
Monstre a = new Monstre(0, "Name", "Hostility", "This is my description", new List<string> { "Carac 1", "Carac 2", "Carac 3" }, new List<string> { "App 1", "App 2", "App 3" });
{
Monstre a = new Monstre(0, "Name", "Hostility", "This is my description", new List<string> { "Carac 1", "Carac 2", "Carac 3" }, new List<string> { "App 1", "App 2", "App 3" }, new List<Conseil>());
User usetUT = new User("pseudo", "nom", "prenom", "mdp", new List<Monstre>());
Conseil conseilUT = new Conseil(usetUT, "conseil de fou furieux", a);
Assert.NotNull(a);
Assert.Equal("Name", a.Name);
Assert.Equal("Hostility", a.Dangerosite);
Assert.Equal("This is my description", a.Description);
Assert.Equal(new List<string> { "Carac 1", "Carac 2", "Carac 3" }, a.CharacteristicsList);
Assert.Equal(new List<string> { "App 1", "App 2", "App 3" }, a.AppearanceList);
}
[Fact]
public void TestVoidConstructor()
{
Assert.Throws<ArgumentException>(() => new Monstre(0, "", "", "", new List<string> { "" }, new List<string> { "" }));
{
Monstre a = new Monstre(0, "Name", "Hostility", "This is my description", new List<string> { "Carac 1", "Carac 2", "Carac 3" }, new List<string> { "App 1", "App 2", "App 3" }, new List<Conseil>());
User usetUT = new User("pseudo", "nom", "prenom", "mdp", new List<Monstre>());
Conseil conseilUT = new Conseil(usetUT, "conseil de fou furieux", a);
Assert.Throws<ArgumentException>(() => new Monstre(0, "", "", "", new List<string> { "" }, new List<string> { "" }, new List<Conseil> {conseilUT}));
}
}
}
Loading…
Cancel
Save