Correction
continuous-integration/drone/push Build is failing Details

pull/60/head
Augustin AFFOGNON 3 years ago
parent 6f5864a562
commit 185863c7e9

@ -13,8 +13,8 @@ namespace BowlingLib.Model
/// </summary>
public class Equipe
{
public string Nom { get; private set; };
public long Id { get; private set; };
public string Nom { get; private set; }
public long Id { get; private set; }
public ReadOnlyCollection<Joueur> Joueurs { get; private set; }
@ -30,17 +30,14 @@ namespace BowlingLib.Model
public Equipe(string nom, params Joueur[] joueurs)
/* public Equipe(string nom, params Joueur[] joueurs)
{
this.nom = nom;
this.Nom = nom;
AjouterJoueurs(joueurs);
// foreach (Joueur nouv in joueurs) AjouterJoueur(nouv);
}
public long Id
{
get { return id; }
}
}*/
public Equipe(string nom)
@ -54,10 +51,10 @@ namespace BowlingLib.Model
// Joueurs = joueurs;
Nom = nom;
Joueurs = new ReadOnlyCollection<Joueur>(this.joueurs);
AjouterJoueurs(artists);
AjouterJoueurs(joueurs);
}
public Equipe(long id, string nom, params Joueur[] joueurs)
public Equipe(string nom, params Joueur[] joueurs)
: this(0, nom, joueurs) {}
/// <summary>

@ -43,10 +43,14 @@ namespace BowlingLib.Model
}
public bool Equals(Joueur other)
{
{
return Pseudo.Equals(other.Pseudo);
}
public void setNom(string nom)
{
Pseudo = nom;
}
public override bool Equals(object obj)
{

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BowlingLib.Model;
using Xunit;

@ -93,13 +93,17 @@ namespace Test.BowlingAppUnitTest
}
/*
* TEST AVEC LE STUB
*/
[Fact]
public void TestUpdate()
{
StubJoueur stub = new StubJoueur();
Joueur j = new Joueur("Paul");
stub.Add(j);
j.Pseudo = "Augustin";
j.setNom("Augustin");
stub.Update(j);
Assert.Equal("Augustin", stub.GetAll().First().Pseudo);
}

Loading…
Cancel
Save