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