diff --git a/Code/Model/Banque.cs b/Code/Model/Banque.cs index 9181513..43fd4e2 100644 --- a/Code/Model/Banque.cs +++ b/Code/Model/Banque.cs @@ -11,7 +11,7 @@ namespace Model public string Nom { get; private set; } public string UrlSite { get; private set; } public string UrlLogo { get; private set; } - private List ListeDesComptes { get; set; } = new List(); + public List ListeDesComptes { get; private set; } = new List(); public Banque(string nom, string urlSite, string urlLogo) { diff --git a/Code/Model/Inscrit.cs b/Code/Model/Inscrit.cs index 7de9d73..c952c38 100644 --- a/Code/Model/Inscrit.cs +++ b/Code/Model/Inscrit.cs @@ -48,7 +48,7 @@ namespace Model public string Mdp { get; private set; } public double SoldeTotal { get; private set; } public Devises Dev { get; private set; } - private List LesBanques { get; set; } = new List(); + public List LesBanques { get; private set; } = new List(); diff --git a/Code/TestsUnitaires/TestUnitCompte.cs b/Code/TestsUnitaires/TestUnitCompte.cs index 739b9f7..2a152c8 100644 --- a/Code/TestsUnitaires/TestUnitCompte.cs +++ b/Code/TestsUnitaires/TestUnitCompte.cs @@ -1,35 +1,35 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Model; - -namespace TestsUnitaires -{ - public class TestUnitCompte - { - [Fact] - public void TestConstructeurCompte() - { - Compte c1 = new("Livret A", 234); - Compte c2 = new("&e23R_te7", 1245.34); - Assert.Equal("Livret A", c1.Nom); - Assert.Equal("&e23R_te7", c2.Nom); - Assert.Equal(234, c1.Solde); - Assert.Equal(1245.34, c2.Solde); +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Model; + +namespace TestsUnitaires +{ + public class TestUnitCompte + { + [Fact] + public void TestConstructeurCompte() + { + Compte c1 = new("Livret A", 234); + Compte c2 = new("&e23R_te7", 1245.34); + Assert.Equal("Livret A", c1.Nom); + Assert.Equal("&e23R_te7", c2.Nom); + Assert.Equal(234, c1.Solde); + Assert.Equal(1245.34, c2.Solde); } - [Fact] - 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"); - Inscrit i1 = new Inscrit("A1001", "Smith", "smith@gmail.com", "luke", "test", 500); - Assert.NotNull(i1.LesBanques); - i1.ajouterBanque(bq); - Assert.Contains(bq, i1.LesBanques); - i1.SupprimerBanque(bq); + [Fact] + 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"); + Inscrit i1 = new Inscrit("A1001", "Smith", "smith@gmail.com", "luke", "test", 500); + Assert.NotNull(i1.LesBanques); + i1.ajouterBanque(bq); + Assert.Contains(bq, i1.LesBanques); + i1.SupprimerBanque(bq); Assert.DoesNotContain(bq, i1.LesBanques); - } - } -} + } + } +}