- remove custom xml view, use springboot builtin xml view
- remove oxm maven dependency
- remove json-simple maven dependency (seems not relevant anymore)
- update vetsXml test using xpath
- In the Jdbc implementation: pets belonging to a visit were not added.
- In the Jpa implementation: query variable was wrong.
- Test case: AbstractClinicServiceTests.shouldFindVisitsByPetId()
There seems to be a conflict between the following:
1) New MVC namespace syntax:
<mvc:content-negotiation use-not-acceptable="true">
<mvc:default-views>
<bean class="org.springframework.web.servlet.view.JstlView">
<property name="url" value="" />
</bean>
</mvc:default-views>
</mvc:content-negotiation>
2) Inside my Unit test:
ResultActions actions =
this.mockMvc.perform(get("/vets.xml").accept(MediaType.TEXT_XML));
actions.andDo(print()); // action is logged into the console
actions.andExpect(status().isOk());
Test in error with french default Locale:
org.junit.ComparisonFailure: expected:<[ne peut pas être vide]> but was:<[may not be empty]>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.springframework.samples.petclinic.model.ValidatorTests.emptyFirstName(ValidatorTests.java:39)
- test didn't have the suffix "Tests" so it was not taken into account
when running Maven in the comand line
- the POM was not configured so it can find Spring config files placed
inside src/test/java
- migrated to Spring 3.2.1
- added hamcrest to the POM so it can be used with the Spring MVC Test
Framework
- Started migrating a JUnit test to Spring MVC Test Framework (at this
stage, it stills doesn't work. It could be because of a conflict with
ContentNegotiatingViewResolver)