public void TiersEstValide_TiersPrenomVide()
        {
            ITiersService tiersService = new TiersService();

            Assert.AreEqual(false, tiersService.TiersEstValide(null, new Tiers()
            {
                Nom = "NomTiers", Prenom = string.Empty
            }));
        }
        public void TiersEstValide_ServiceAdresseOk()
        {
            Mock <IUnitOfWork> mockUnitOfWork = new Mock <IUnitOfWork>();

            mockUnitOfWork
            .Setup(x => x.Repository <Tiers>().Where(It.IsAny <Func <Tiers, bool> >(), null))
            .Returns(new List <Tiers>()
            {
            });

            Mock <IAdresseService> mockAdresseService = new Mock <IAdresseService>();

            mockAdresseService
            .Setup(x => x.AdresseEstValide(It.IsAny <Adresse>()))
            .Returns(true);

            ITiersService tiersService = new TiersService(mockAdresseService.Object);

            Assert.AreEqual(true, tiersService.TiersEstValide(mockUnitOfWork.Object, new Tiers()
            {
                Nom = "NomTiers", Prenom = "PrenomTiers"
            }));
        }
        public void TiersEstValide_TiersNull()
        {
            ITiersService tiersService = new TiersService();

            Assert.AreEqual(false, tiersService.TiersEstValide(null, null));
        }