Esempio n. 1
0
        public void Should_Delete_Professional_With_Success()
        {
            //Act
            _professionalAppService.DeleteProfessional(new ComposeKey <Guid, decimal>(_professionalPoco.Code, 1));

            var successResponse = _professionalAppService.GetAllProfessionals(new GetAllProfessionalsDto()
            {
                PageSize = 10
            });

            //Assert
            Assert.False(LocalNotification.HasNotification());
            successResponse.Items.ShouldBeEmpty();
        }
Esempio n. 2
0
        public IActionResult Delete(decimal professionalId, Guid code)
        {
            _professionalAppService.DeleteProfessional(new ComposeKey <Guid, decimal>(code, professionalId));

            return(CreateResponse <ProfessionalDto, ComposeKey <Guid, decimal> >()
                   .FromErrorEnum(ProfessionalDto.Error.DeleteProfessional)
                   .WithMessage(AppConsts.LocalizationSourceName, ProfessionalDto.Error.DeleteProfessional)
                   .Build());
        }