Methods Summary |
---|
protected void | setUp()
this.mockControl = MockControl.createControl(HttpServletRequest.class);
this.mockedRequest = this.mockControl.getMock();
this.provider = new HessianSkeletonProviderImpl();
this.mapping = new HashMap<String, WebserviceMappingBean>();
WebserviceMappingBean bean = new WebserviceMappingBean();
bean.setServiceImpl(new TestService());
bean.setServiceInterface(Serializable.class);
this.mapping.put(mapKey, bean);
this.provider.setMapping(this.mapping);
|
protected void | tearDown()
super.tearDown();
|
public void | testGetMappingFromPath()
try {
this.provider.getMappingFromPath(testPathFail);
fail("Service should not be found");
} catch (NoSuchServiceException e) {
//
}
HessianSkeleton retVal = this.provider
.getMappingFromPath(testPathSuccess);
assertNotNull(retVal);
HessianSkeleton retVal1 = this.provider
.getMappingFromPath(testPathSuccess + "/");
assertEquals(retVal, retVal1);
assertNotNull(retVal);
assertEquals(Serializable.class.getName(), retVal.getAPIClassName());
|
public void | testGetServiceSkeletonInvoker()
this.mockControl.expectAndDefaultReturn(this.mockedRequest
.getPathInfo(), testPathSuccess);
this.mockControl.replay();
assertNotNull(this.provider
.getServiceSkeletonInvoker(this.mockedRequest));
this.mockControl.verify();
this.mockControl.reset();
this.mockControl.expectAndDefaultReturn(this.mockedRequest
.getPathInfo(), testPathFail);
this.mockControl.replay();
try {
assertNotNull(this.provider
.getServiceSkeletonInvoker(this.mockedRequest));
fail("Service should not be found");
} catch (NoSuchServiceException e) {
//
}
this.mockControl.verify();
this.mockControl.reset();
|
public void | testVerifyInterfaceImpl()
this.mapping.get(mapKey).setServiceImpl(new WebserviceMappingBean());
try {
this.provider.getMappingFromPath(testPathSuccess);
fail("Impl is not assignable to Interface");
} catch (RuntimeException e) {
//
}
|