493c76dd8578c40f64999b945799daad20e400f0
[SpringWebServicesForFun/.git] /
1 package de.spring.webservices.services;
2
3 import org.junit.Assert;
4 import org.junit.Before;
5 import org.junit.Test;
6
7 import de.spring.webservices.auto.ExampleRequest;
8 import de.spring.webservices.auto.ExampleResponse;
9 import de.spring.webservices.services.impl.ExampleServiceImpl;
10
11 public class ExampleServiceTest {
12
13     private ExampleService exampleService;
14         
15         @Before
16     public void init() {
17                 exampleService = new ExampleServiceImpl();
18         }
19
20         @Test
21         public void givenExampleRequestThenReturnExampleResponse() {
22                 ExampleRequest request = new ExampleRequest();
23                 request.setData("SCARLETT");
24                 ExampleResponse expected = new ExampleResponse();
25                 expected.setData("SNAKE EYES AND " + request.getData());
26                 
27         ExampleResponse actual = exampleService.doResponse(request);
28         
29                 Assert.assertEquals(expected.getData(), actual.getData());
30         }
31
32 }