d3b56be7904977ea20a3260027de35bb508e7f78
[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.operations.Operations;
8 import de.spring.webservices.server.auto.CustomBindingExampleRequest;
9 import de.spring.webservices.server.auto.CustomBindingExampleResponse;
10 import de.spring.webservices.services.impl.CustomBindingExampleServiceImpl;
11
12
13 public class CustomBindingExampleServiceTest {
14
15         private Operations.RequestResponse
16         <CustomBindingExampleResponse, CustomBindingExampleRequest>  customBindingExampleService;
17         
18         @Before
19     public void init() {
20                 customBindingExampleService = new CustomBindingExampleServiceImpl();
21         }
22         
23         @Test
24         public void givenCustomBindingExampleRequestThenReturnCustomBindingExampleResponse() {
25                 CustomBindingExampleRequest request = new CustomBindingExampleRequest();
26                 request.setData("SCARLETT");
27                 CustomBindingExampleResponse expected = new CustomBindingExampleResponse();
28                 expected.setData("CUSTOM BINDING SNAKE EYES AND " + request.getData());
29                 
30                 CustomBindingExampleResponse actual = customBindingExampleService.requestResponse(request);
31         
32                 Assert.assertEquals(expected.getData(), actual.getData());
33         }
34 }