Hey Andrey,

If you want to do it that way, you’ll have to create your own test harness.
You can look at Fineract-CN-Anubis in the test module and in
fineract-cn-test to get a feel for what’s required.

Best Regards,
Myrle

On Fri 23. Mar 2018 at 17:38 Andrey Mochalov <[email protected]>
wrote:

> Hello Myrle,
>
> I can say the reason why I want to use MockMVC. Spring Rest Docs is
> supposed to be used for generating documentation.
> For this we must use MockMVC, WebTestCliend or REST Assured. See more:
>
> https://docs.spring.io/spring-restdocs/docs/2.0.1.BUILD-SNAPSHOT/reference/html5/#getting-started-documentation-snippets
>
> What do you think about it?
>
> 2018-03-23 14:29 GMT+03:00 Andrey Mochalov <[email protected]>:
>
> > Hello everyone,
> >
> > My name is Andrey Mochalov. I'm from Russia. I want to participate GSOC
> > 2018.
> >
> > I have several questions about the project Fineract CN.
> >
> > I try to run project fineract-cn-customer and get error:
> >
> > *org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'io.mifos.anubis.config.AnubisSecurityConfigurerAdapter':
> > Injection of autowired dependencies failed; nested exception is
> > java.lang.IllegalArgumentException: Could not resolve placeholder
> > 'system.publicKey.timestamp' in string value
> > "${system.publicKey.timestamp}"*
> >
> > How can I fix this?
> >
> > Also I want to write tests using the Spring Rest Docs for generating
> > documentation. For this, I write a test:
> >
> > ```
> > @Test
> > public void should_CreateCustomer() throws Exception {
> > ObjectMapper objectMapper = new ObjectMapper();
> > mockMvc.perform(post("/customer")
> >         .header("X-Tenant-Identifier", "12345")
> >         .contentType(APPLICATION_JSON_VALUE)
> >         .content(objectMapper.writeValueAsString(CustomerGenerator.
> > createRandomCustomer())))
> >         .andDo(print())
> >         .andExpect(status().isAccepted());
> > }
> > ```
> >
> > And I get error:
> > *java.lang.AssertionError: Status Expected :202 Actual :404*
> >
> > What error did I make in creating the query?
> >
> > --
> > Andrey Mochalov
> >
>
>
>
> --
> Andrey Mochalov
>

Reply via email to