You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ConsEco/Code/TestsUnitaires/TU_Compte.cs

32 lines
956 B

2 years ago
using Model;
namespace TestsUnitaires
{
public class TU_Compte
{
2 years ago
[Fact]
public void Ctor_Compte()
{
Compte c = new Compte("Cr<43>dit Agricole", 20000);
Assert.NotNull(c);
Assert.Equal("Cr<43>dit Agricole", c.Nom);
Assert.Equal(20000, c.Solde);
}
[Fact]
public void testSupprimerBanque()
{
Banque bq = new Banque("Cr<43>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);
}
2 years ago
}
}