problème boucle infini réglé
continuous-integration/drone/push Build is passing Details

pull/32/head
Yannis DOUMIR FERNANDES 2 years ago
parent af5237bb4c
commit 697c9fd23b

@ -26,55 +26,58 @@ namespace Model
[DataMember(Order = 3)]
public string Pseudo
{
get => Pseudo;
get => pseudo;
set
{
if (Pseudo == value)
if (pseudo == value)
return;
Pseudo = value;
pseudo = value;
OnPropertyChanged();
}
}
private string pseudo;
[DataMember(Order = 1)]
public string Nom
{
get => Nom;
get => nom;
set
{
if (Nom == value)
if (nom == value)
return;
Nom = value;
nom = value;
OnPropertyChanged();
}
}
private string nom;
[DataMember(Order = 2)]
public string Prenom
{
get => Prenom;
get => prenom;
set
{
if (Prenom == value)
if (prenom == value)
return;
Prenom = value;
prenom = value;
OnPropertyChanged();
}
}
private string prenom;
[DataMember(Order = 4)]
private string Mdp
{
get => Mdp;
get => mdp;
set
{
if (Mdp == value)
if (mdp == value)
return;
Mdp = value;
mdp = value;
OnPropertyChanged();
}
}
private string mdp;
[DataMember]
public List<Monstre>? monstresDejaVu { get; private set; }

@ -26,22 +26,6 @@ namespace Persistance
static string fichierUserXML = "users.xml";
static string fichierMonstreXML = "monsters.xml";
/*static string path = "/Saves/";
//static string path = Directory.GetCurrentDirectory() + "/../../";
static string fichierUserXML = "users.xml";
static string fichierMonstreXML = "monsters.xml";
*/
bool exists = System.IO.Directory.Exists(Path.Combine(path, "/Saves/"));
// Serialisation / Deserialisation de Monstres
public void Chargement()
{
if (!exists)
{
Directory.CreateDirectory(path + "/Saves/");
}
}
void IMonsterDataManager.saveMonsters(List<Monstre> monstres)
{
//Chargement();
@ -94,7 +78,7 @@ namespace Persistance
}
public List<User> loadUsers()
{
Chargement();
//Chargement();
Directory.SetCurrentDirectory(Path.Combine(Directory.GetCurrentDirectory(), path));
var serialiserXML = new DataContractSerializer(typeof(List<User>));
List<User>? users;

@ -33,6 +33,7 @@ namespace Tests
Assert.False(u.verifyPssw(mdp));
}
[Theory]
[MemberData(nameof(MissingData_NoList))]
public void TestConstructorWithMissingData_NoList(string pseudo, string nom, string prenom, string mdp)
@ -40,7 +41,6 @@ namespace Tests
Assert.Throws<ArgumentException>(() => new User(pseudo, nom, prenom, mdp));
}
/*[Theory]
[MemberData(nameof(DataWithList))]
public void TestConstructorWithList(string pseudo, string nom, string prenom, string mdp, List<Monstre> monstresVus)

Loading…
Cancel
Save