Esempio n. 1
0
        public void Should_Get_Professional_With_Success()
        {
            //Act
            var response = _professionalAppService.GetProfessional(new RequestDto <ComposeKey <Guid, decimal> >(new ComposeKey <Guid, decimal>(_professionalPoco.Code, 1)));

            //Assert
            Assert.False(LocalNotification.HasNotification());
            response.ProfessionalId.ShouldBe(1);
            response.Code.ShouldBe(_professionalPoco.Code);
        }
Esempio n. 2
0
        public IActionResult Get(decimal professionalId, Guid code, [FromQuery] RequestDto <ComposeKey <Guid, decimal> > requestDto)
        {
            var response = _professionalAppService.GetProfessional(requestDto.WithId(new ComposeKey <Guid, decimal>(code, professionalId)));

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