From eb39ce7ef4827de892c3770d5b03613360583dc1 Mon Sep 17 00:00:00 2001 From: Raphael LACOTE Date: Fri, 14 Oct 2022 14:20:18 +0200 Subject: [PATCH 1/2] Ajout de Test unitaires pour compte --- Code/TestsUnitaires/TestUnitCompte.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Code/TestsUnitaires/TestUnitCompte.cs diff --git a/Code/TestsUnitaires/TestUnitCompte.cs b/Code/TestsUnitaires/TestUnitCompte.cs new file mode 100644 index 0000000..0732a85 --- /dev/null +++ b/Code/TestsUnitaires/TestUnitCompte.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Model; + +namespace TestsUnitaires +{ + public class TestUnitCompte + { + readonly Compte c1 = new("Livret A", 234); + readonly Compte c2 = new("&e23R_te7", 1245.34); + [Fact] + public void TestConstructeurCompte() + { + Assert.Equal("Livret A", c1.Nom); + Assert.Equal("&e23R_te7", c2.Nom); + Assert.Equal(234, c1.Solde); + Assert.Equal(1245.34, c2.Solde); + } + } +} From 5da1701e34365e5ad7aa4c45d67ad62d333a7f1b Mon Sep 17 00:00:00 2001 From: Raphael LACOTE Date: Fri, 14 Oct 2022 14:22:48 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Rectification=20test=20pr=C3=A9c=C3=A9dent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Code/TestsUnitaires/TestUnitCompte.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/TestsUnitaires/TestUnitCompte.cs b/Code/TestsUnitaires/TestUnitCompte.cs index 0732a85..3f93b41 100644 --- a/Code/TestsUnitaires/TestUnitCompte.cs +++ b/Code/TestsUnitaires/TestUnitCompte.cs @@ -9,11 +9,11 @@ namespace TestsUnitaires { public class TestUnitCompte { - readonly Compte c1 = new("Livret A", 234); - readonly Compte c2 = new("&e23R_te7", 1245.34); [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);