use of com.opensymphony.xwork2.mock.MockInterceptor in project emfcloud-modelserver by eclipse-emfcloud.
the class ModelServerClientV1Test method before.
@Before
public void before() {
interceptor = new MockInterceptor();
jsonCodec = new DefaultJsonCodec();
baseHttpUrlBuilder = new HttpUrl.Builder().scheme("http").host("fake-url.com").addPathSegment("api").addPathSegment("v1");
eClass = EcoreFactory.eINSTANCE.createEClass();
eClass.setName("AbstractTestClass");
eClass.setAbstract(true);
}
use of com.opensymphony.xwork2.mock.MockInterceptor in project emfcloud-modelserver by eclipse-emfcloud.
the class ModelServerClientTest method before.
@Before
public void before() {
interceptor = new MockInterceptor();
jsonCodec = new JsonCodecV2();
baseHttpUrlBuilder = new HttpUrl.Builder().scheme("http").host("fake-url.com").addPathSegment("api").addPathSegment("v2");
eClass = EcoreFactory.eINSTANCE.createEClass();
eClass.setName("AbstractTestClass");
eClass.setAbstract(true);
}
use of com.opensymphony.xwork2.mock.MockInterceptor in project java-sdk by dapr.
the class DaprClientHttpTest method setUp.
@Before
public void setUp() {
mockInterceptor = new MockInterceptor(Behavior.UNORDERED);
okHttpClient = new OkHttpClient.Builder().addInterceptor(mockInterceptor).build();
daprHttp = new DaprHttp(Properties.SIDECAR_IP.get(), 3000, okHttpClient);
daprClientHttp = new DaprClientProxy(new DaprClientHttp(daprHttp));
daprClientHttpXML = new DaprClientProxy(new DaprClientHttp(daprHttp, new XmlSerializer(), new XmlSerializer()));
}
use of com.opensymphony.xwork2.mock.MockInterceptor in project java-sdk by dapr.
the class DaprHttpTest method setUp.
@Before
public void setUp() {
mockInterceptor = new MockInterceptor(Behavior.UNORDERED);
okHttpClient = new OkHttpClient.Builder().addInterceptor(mockInterceptor).build();
}
use of com.opensymphony.xwork2.mock.MockInterceptor in project struts by apache.
the class ConfigurationTest method testInterceptorParamInehritanceOverride.
public void testInterceptorParamInehritanceOverride() {
try {
ActionProxy proxy = actionProxyFactory.createActionProxy("/foo/bar", "TestInterceptorParamInehritanceOverride", null, null);
assertEquals(1, proxy.getConfig().getInterceptors().size());
MockInterceptor testInterceptor = (MockInterceptor) proxy.getConfig().getInterceptors().get(0).getInterceptor();
assertEquals("foo123", testInterceptor.getExpectedFoo());
proxy.execute();
assertTrue(testInterceptor.isExecuted());
} catch (Exception e) {
e.printStackTrace();
fail();
}
}
Aggregations