Exemple #1
0
        public void AddDossier_ReturnsFalse_Test()
        {
            var dossierDto = new DossierDto();
            var dossierBll = new DossiersBLL();
            var addOrUpdateDossierResult = dossierBll.AddOrUpdateDossier(dossierDto);

            Assert.IsFalse(addOrUpdateDossierResult.Success);
        }
Exemple #2
0
        public void AddDossier_WithoutSavingMedecinAppelantFirst_ReturnFalse_Test()
        {
            var medecinAppelantDto = MedecinAppelantTestHelper.GetFakeMedecinAppelantDto();
            var newDossierDto      = new DossierDto
            {
                IdMedecinAppelant  = 0,
                MedecinAppelantDto = medecinAppelantDto
            };
            var dossierBll = new DossiersBLL();
            var addOrUpdateDossierResult = dossierBll.AddOrUpdateDossier(newDossierDto);

            Assert.IsFalse(addOrUpdateDossierResult.Success);
        }
Exemple #3
0
        public void AddDossier_WithSavingMedecinAppelantFirst_ReturnTrue_Test()
        {
            var medecinAppelantDto = MedecinAppelantTestHelper.GetFakeMedecinAppelantDto();
            var medecinAppelantBll = new MedecinAppelantBLL();
            var addOrUpdateMedecinAppelantResult = medecinAppelantBll.AddOrUpdateMedecinAppelant(medecinAppelantDto);

            Assert.IsTrue(addOrUpdateMedecinAppelantResult.Success);
            var medecinAppelantDtoSaved = addOrUpdateMedecinAppelantResult.Result;

            var newDossierDto = new DossierDto
            {
                IdMedecinAppelant  = medecinAppelantDtoSaved.Id,
                MedecinAppelantDto = medecinAppelantDto
            };
            var dossierBll = new DossiersBLL();
            var addOrUpdateDossierResult = dossierBll.AddOrUpdateDossier(newDossierDto);

            Assert.IsTrue(addOrUpdateDossierResult.Success);
        }