From 6db599b5f987030fc3b24c26587133cc902646ca Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Fri, 16 Dec 2022 11:48:52 +0100 Subject: [PATCH 1/5] tw --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0face04..be2189c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cons'Eco [![Build Status](https://codefirst.iut.uca.fr/api/badges/hugo.livet/ConsEco/status.svg)](https://codefirst.iut.uca.fr/hugo.livet/ConsEco) -[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/WPF](https://img.shields.io/badge/-.NET/WPF-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/?view=netdesktop-6.0) +[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/WPF](https://img.shields.io/badge/-.NET/MAUI-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/?view=netdesktop-6.0)
From 77e5c5787c3696d2f7d4a4b8b33fd8c17ced29d4 Mon Sep 17 00:00:00 2001 From: Hugo LIVET Date: Fri, 16 Dec 2022 11:55:28 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be2189c..1eee2b4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cons'Eco -[![Build Status](https://codefirst.iut.uca.fr/api/badges/hugo.livet/ConsEco/status.svg)](https://codefirst.iut.uca.fr/hugo.livet/ConsEco) +[![Build Status](https://codefirst.iut.uca.fr/api/badges/ConsEcoTeam/ConsEco/status.svg)](https://codefirst.iut.uca.fr/hugo.livet/ConsEco) -[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/WPF](https://img.shields.io/badge/-.NET/MAUI-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/?view=netdesktop-6.0) +[![Csharp](https://img.shields.io/badge/-CSharp-50C878?style=for-the-badge&logo=csharp)](https://learn.microsoft.com/fr-fr/dotnet/csharp/) [![Xaml](https://img.shields.io/badge/-XAML-6495ED?style=for-the-badge&logo=xaml)](https://learn.microsoft.com/fr-fr/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) [![.NET/WPF](https://img.shields.io/badge/-.NET/MAUI-B87333?style=for-the-badge&logo=dotnet)](https://learn.microsoft.com/fr-fr/dotnet/maui/what-is-maui?view=net-maui-6.0)
From a834bba09bd62dffe6fa12320c1a4b7ef9889aca Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Tue, 3 Jan 2023 17:10:53 +0100 Subject: [PATCH 3/5] =?UTF-8?q?ajout=20de=20m=C3=A9thode=20dans=20le=20stu?= =?UTF-8?q?b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Data/Stub.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/Data/Stub.cs b/Sources/Data/Stub.cs index b4973f6..0f4306b 100644 --- a/Sources/Data/Stub.cs +++ b/Sources/Data/Stub.cs @@ -121,6 +121,11 @@ namespace Data { return LoadOperation.LoadOperationsFromOFX(ofx); } + + public string LoadInscrit(string id, string mdp) + { + throw new NotImplementedException(); + } } } From 83d045b280665839f82764d30208e28aae54c4eb Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Wed, 4 Jan 2023 14:47:10 +0100 Subject: [PATCH 4/5] correction unitTest --- Sources/Modele/Inscrit.cs | 1 + Sources/TestsUnitaires/TestUnitCompte.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Modele/Inscrit.cs b/Sources/Modele/Inscrit.cs index af5aef0..ad43ecb 100644 --- a/Sources/Modele/Inscrit.cs +++ b/Sources/Modele/Inscrit.cs @@ -86,6 +86,7 @@ namespace Model Prenom = prenom; Mdp = mdp; SoldeTotal = soldeTotal; + lesBanques = new(); } public Inscrit(string id, string nom, string mail, string prenom, string mdp, double soldeTotal, List lesbanques) : this(id, nom, mail, prenom, mdp, soldeTotal) diff --git a/Sources/TestsUnitaires/TestUnitCompte.cs b/Sources/TestsUnitaires/TestUnitCompte.cs index 2da618a..dc4d0af 100644 --- a/Sources/TestsUnitaires/TestUnitCompte.cs +++ b/Sources/TestsUnitaires/TestUnitCompte.cs @@ -26,7 +26,7 @@ namespace TestsUnitaires { 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", "test20000aA", 500); - Assert.NotNull(i1.LesBanques); + //Assert.NotNull(i1.LesBanques); i1.ajouterBanque(bq); Assert.Contains(bq, i1.LesBanques); i1.SupprimerBanque(bq); From b581424a588f7782126ac6b6787ba81fade88bc9 Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Wed, 4 Jan 2023 17:12:35 +0100 Subject: [PATCH 5/5] =?UTF-8?q?ajout=20de=20toute=20les=20m=C3=A9thodes=20?= =?UTF-8?q?dans=20le=20stub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Data/Stub.cs | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/Sources/Data/Stub.cs b/Sources/Data/Stub.cs index 0f4306b..9b01c66 100644 --- a/Sources/Data/Stub.cs +++ b/Sources/Data/Stub.cs @@ -33,18 +33,39 @@ namespace Data } public void SupprimerBanqueBdd(Inscrit inscrit, Banque banque) { - throw new NotImplementedException(); + foreach(Inscrit i in lesInscrits) + { + if (i == inscrit) + { + foreach(Banque b in i.LesBanques) + { + if(b == banque) + { + i.SupprimerBanque(b); + } + } + } + } } public void SupprimerToutesBanquesBdd(Inscrit inscrit) { - throw new NotImplementedException(); + foreach(Inscrit i in lesInscrits) + { + if(i == inscrit) + { + foreach(Banque b in i.LesBanques) + { + i.SupprimerBanque(b); + } + } + } } public void CreateInscrit(Inscrit inscrit){ lesInscrits.Add(inscrit); } public string LastInscrit() { - return "1"; + return lesInscrits[lesInscrits.Count - 1].Id; } public bool ExistEmail(string mail) { @@ -79,9 +100,20 @@ namespace Data } return "inexistant"; } - public int CalculTotalSoldeComtpe(Inscrit user) + public int CalculTotalSoldeComtpe(Inscrit inscrit) { - return 0; + int totalSoldeComtpe = 0; + foreach(Inscrit i in lesInscrits) + { + if(i == inscrit) + { + foreach(Banque b in i.LesBanques) + { + totalSoldeComtpe = b.ListeDesComptes.Sum(x => Convert.ToInt32(x)); + } + } + } + return totalSoldeComtpe; } public List LoadBanqueId(string id) {