+ mock request/response

pull/1/head
Ivan Olexyn 5 years ago
parent c7cf89f8a9
commit f92d3778e2

@ -0,0 +1,36 @@
package exchange;
import java.util.ArrayList;
import java.util.List;
public class ExchangeMock {
public static List<ExchangeMock> exchangeList = new ArrayList<>();
private static int next_id=0;
public int id;
public RequestMock request =new RequestMock(this);
public ResponseMock response = new ResponseMock(this);
public ExchangeMock(){
id = next_id++;
exchangeList.add(this);
}
}

@ -0,0 +1,13 @@
package exchange;
import org.springframework.mock.web.MockHttpServletRequest;
public class RequestMock extends MockHttpServletRequest {
public ExchangeMock exchange;
public RequestMock(ExchangeMock exchange){
super();
this.exchange = exchange;
}
}

@ -0,0 +1,17 @@
package exchange;
import org.springframework.mock.web.MockHttpServletResponse;
public class ResponseMock extends MockHttpServletResponse {
public ExchangeMock exchange;
public ResponseMock(ExchangeMock exchange){
super();
this.exchange = exchange;
}
}
Loading…
Cancel
Save