Exemplo n.º 1
0
        public async Task PersonasBusiness_BuscarPersona_ShouldSearch()
        {
            PersonasBusiness personaBusiness = new PersonasBusiness();

            SecureMessagesHelper secure = new SecureMessagesHelper();

            Personas persona = await secure.DecryptMessageToEntity <Personas>(@"PaT8TpwHeIZqCLQGQGhIHCX4xp2SUym5EqCt3gV/C/yDZH7LR8SUNZoHj470ajGREMgwBzZtFuWMYT2uwvvyn3hOmejf8VGQxYsjwaDvWnabanQm7MlVwHOUau+mQa2FtwfWTNaVDk6YkQc24Ns8398rXZqrk/ccgkOzFWVmuBAA3pU3pBPDQME2EooCglMSWp3xEZb9OVBkAKN66hM9D/0CVdTlDXPKO9sHb3L76b9dNdEoQkW0wtTm6r0nqr8/elh7EPBBe4gpdyNCZKMQRxwAB1HgXKfenUF281TnCrxK+IgdS3Wkh3yY7LhVWlrWwDg1d7eNdRLGQxEKGsAOpbJloZgfpapmwZFlNT6br4nM8clf3mDojpK6Mpp0qdhI7zWbBZ3C0u4VQz3iB9dVGwyGqTlZnnbr1lWM+kTUjO/m+gCav2RbpBoVjQ2fq84pRpUl8qZr87t0DuXu+ZGgWZ1Er8bprxClV9aGF4YD+817Vw6aFUjWyzZXq2wZrxy6/ySKMSZOYO/0K+hk7dSQtDT7DwUIk+hXrSwkmtaFLHl0LSSZzB45cL8Zf84oSDBiRFU8Vl43nE8/8TGMjbPiBdSV0zDjAGoZJ0zVczUnwAjYZJM0tu3rKlQJrwxzAfmNJTEPkxAx5OZa4AJp2M5h57ZBu8DL1XeUviKrYBgBg+Y8xejMHbdPCQIde/wa/R3s0rO/XZ32kom2SN7njyoZj+afbZCdpi9k4tXYW7F7YANGcm1psx1/Ogq4DRxlPt+Y8hFKu5LetxOYAkYBa6hAmuczRnb/JmC/gheEhSepbDSbORHMXWZpIKSNxdT+INV8dT0xUM7MAV7eT3Nx17RG9H5oIoQet5amUpc5T8m0kEx1syFypW/cKZCxOO6thk6WASqJTi/TUj2xMdcALWQ7rw3gMpxs5jk7ryvSy07f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+Tum4LNKzZwqqwtG3kSYbRX9CGYFrhR6MLOibdQ+2+iCkRKAp2AKE2hKdtrRWpZ+9GVpCgQ77OATUdUNVuNBwrqOWA39BeAIuq9sLQHpr5YJi+5Rn5pDUHcK0/01NE4CCvpwZ+WJzfIfg+EtlRNvUIF982Vl5k24fL4MqCiD2MkCZIZG2G+wGhh+yN/6icVQVpK1QYhwF4KrQ6nzd0ykbwd9GRVjTt6WImXwLuZz05ZS3meD5/iwq5akH3/bY8YLkzN2HL2KUeGUi4QP3TOgC3tiXhDMGFuvMllbezmvAodjCvKCTvyS8fXgpfO+HgMhiyKH0M9uwAzP9vRQWoknfbQmUjiEfRNGQdCUpfjyLf+E/kPs1Bf8Jk0HfWG74B3QfFAXOq1kYJWoIaEjpovixYT+wV357zEv6+3gapOyUCwNlcLgmnWAsGvOXIIgqoVaLsEF9PIKQ==");

            PersonasDTO personaBuscada = await personaBusiness.BuscarPersona(persona);

            Assert.IsNotNull(personaBuscada);
        }
Exemplo n.º 2
0
        public async Task <IHttpActionResult> BuscarPersona(Personas personaParaBuscar)
        {
            if (personaParaBuscar == null || personaParaBuscar.Consecutivo <= 0 || personaParaBuscar.IdiomaDeLaPersona == Idioma.SinIdioma)
            {
                return(BadRequest("personaParaBuscar vacio y/o invalido!."));
            }

            try
            {
                PersonasDTO personaBuscada = await _personasBusiness.BuscarPersona(personaParaBuscar);

                return(Ok(personaBuscada));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }