réparation de la branche connexion
continuous-integration/drone/push Build is passing Details

connexion
Lucas EVARD 2 years ago
parent 474726bbd4
commit 717a5d5eea

@ -11,7 +11,7 @@ namespace Model
public string Nom { get; private set; } public string Nom { get; private set; }
public string UrlSite { get; private set; } public string UrlSite { get; private set; }
public string UrlLogo { get; private set; } public string UrlLogo { get; private set; }
private List<Compte> ListeDesComptes { get; set; } = new List<Compte>(); public List<Compte> ListeDesComptes { get; private set; } = new List<Compte>();
public Banque(string nom, string urlSite, string urlLogo) public Banque(string nom, string urlSite, string urlLogo)
{ {

@ -48,7 +48,7 @@ namespace Model
public string Mdp { get; private set; } public string Mdp { get; private set; }
public double SoldeTotal { get; private set; } public double SoldeTotal { get; private set; }
public Devises Dev { get; private set; } public Devises Dev { get; private set; }
private List<Banque> LesBanques { get; set; } = new List<Banque>(); public List<Banque> LesBanques { get; private set; } = new List<Banque>();

@ -1,35 +1,35 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Model; using Model;
namespace TestsUnitaires namespace TestsUnitaires
{ {
public class TestUnitCompte public class TestUnitCompte
{ {
[Fact] [Fact]
public void TestConstructeurCompte() public void TestConstructeurCompte()
{ {
Compte c1 = new("Livret A", 234); Compte c1 = new("Livret A", 234);
Compte c2 = new("&e23R_te7", 1245.34); Compte c2 = new("&e23R_te7", 1245.34);
Assert.Equal("Livret A", c1.Nom); Assert.Equal("Livret A", c1.Nom);
Assert.Equal("&e23R_te7", c2.Nom); Assert.Equal("&e23R_te7", c2.Nom);
Assert.Equal(234, c1.Solde); Assert.Equal(234, c1.Solde);
Assert.Equal(1245.34, c2.Solde); Assert.Equal(1245.34, c2.Solde);
} }
[Fact] [Fact]
public void testSupprimerBanque() public void testSupprimerBanque()
{ {
Banque bq = new Banque("Crédit Agricole", "https://creditagricole.fr", "https://yt3.ggpht.com/a/AGF-l7_mEfX2eQaGm8GefLOg5ZMRciNw-pESE3gUWg=s900-c-k-c0xffffffff-no-rj-mo"); Banque bq = new Banque("Crédit Agricole", "https://creditagricole.fr", "https://yt3.ggpht.com/a/AGF-l7_mEfX2eQaGm8GefLOg5ZMRciNw-pESE3gUWg=s900-c-k-c0xffffffff-no-rj-mo");
Inscrit i1 = new Inscrit("A1001", "Smith", "smith@gmail.com", "luke", "test", 500); Inscrit i1 = new Inscrit("A1001", "Smith", "smith@gmail.com", "luke", "test", 500);
Assert.NotNull(i1.LesBanques); Assert.NotNull(i1.LesBanques);
i1.ajouterBanque(bq); i1.ajouterBanque(bq);
Assert.Contains(bq, i1.LesBanques); Assert.Contains(bq, i1.LesBanques);
i1.SupprimerBanque(bq); i1.SupprimerBanque(bq);
Assert.DoesNotContain(bq, i1.LesBanques); Assert.DoesNotContain(bq, i1.LesBanques);
} }
} }
} }

Loading…
Cancel
Save