a6d493b61152b996bb8bdc31858e79578fa1f219
[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.CustomBindingExampleRequest;
8 import de.spring.webservices.auto.CustomBindingExampleResponse;
9 import de.spring.webservices.operations.Operations;
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 }