Example #1
0
        public async Task GivenEditPacienteCommand_ReturnsSuccessStatusCode()
        {
            var client = _factory.GetClient();

            var command = new UpsertPacienteCommand
            {
                Id               = 1
                , PrimerNombre   = "Daniel"
                , PrimerApellido = "Aguilar"
                , Cedula         = "1028999"
                , TipoCedula     = "CE"
            };

            var content = Utilities.GetRequestContent(command);

            var response = await client.PostAsync($"/api/Pacientes/Upsert", content);

            response.EnsureSuccessStatusCode();
        }
Example #2
0
        //[ProducesDefaultResponseType]
        public async Task <ActionResult <int> > Upsert(UpsertPacienteCommand command)
        {
            var id = await Mediator.Send(command);

            return(Ok(id));
        }