Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 764 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 764 Bytes

MockRestServiceServerExample

Example Spring RestTemplate functional / unit testing with MockRestServiceServer.

MockRestServiceServer is a mock server and simple framework for testing RestTemplate calls. RestTemplate is a simple Spring class for making REST web service requests.

MockRestServiceServer is now included in Spring 3.2.x and up: http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/testing.html#spring-mvc-test-client

It can be used with Spring 3.1.x by using the spring-test-mvc jar: https://github.com/SpringSource/spring-test-mvc

You can generate Eclipse project files by using the Maven command:

mvn eclipse:eclipse

Then you can import the project into Eclipse and run the tests.