You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Andrey Mochalov <mo...@gmail.com> on 2018/03/22 16:35:57 UTC

Integration tests for fineract-cn-customer

Hello everyone,

I have few questions about project fineract-cn-customer. I want to add
integration tests in project. I use MockMVC for testing.

For example,

mockMvc.perform(MockMvcRequestBuilders.post("/customers")
        .header("X-Tenant-Identifier", "TENANT")
        .contentType(MediaType.APPLICATION_JSON_VALUE)
        .content(objectMapper.writeValueAsString(CustomerGenerator.createRandomCustomer())))
        .andDo(MockMvcResultHandlers.print())
        .andExpect(MockMvcResultMatchers.status().isAccepted());

I get 404 instead 202. Can anyone tell me what my mistake is?

-- 
Andrey Mochalov

Re: Integration tests for fineract-cn-customer

Posted by Isaac Kamga <is...@mifos.org>.
Hi Andrey,

The microservices in Apache Fineract CN are a little more complex, they're
using a feign client such as CustomerManager in the api submodule. So
you'll have to do a little more research on how you would want to implement
API Documentation.

Can you give me a link to any PoC's you've done on using MockMVC for
integration tests/documentation.

Cheers,
Isaac Kamga.





On Thu, Mar 22, 2018 at 5:35 PM, Andrey Mochalov <mo...@gmail.com>
wrote:

> Hello everyone,
>
> I have few questions about project fineract-cn-customer. I want to add
> integration tests in project. I use MockMVC for testing.
>
> For example,
>
> mockMvc.perform(MockMvcRequestBuilders.post("/customers")
>         .header("X-Tenant-Identifier", "TENANT")
>         .contentType(MediaType.APPLICATION_JSON_VALUE)
>         .content(objectMapper.writeValueAsString(CustomerGenerator.c
> reateRandomCustomer())))
>         .andDo(MockMvcResultHandlers.print())
>         .andExpect(MockMvcResultMatchers.status().isAccepted());
>
> I get 404 instead 202. Can anyone tell me what my mistake is?
>
> --
> Andrey Mochalov
>