use of org.jboss.arquillian.container.test.api.RunAsClient in project wildfly by wildfly.
the class TwoModulesJarTestCase method testConnection2.
/**
* Tests connection in pool
*
* @throws Exception in case of error
*/
@Test
@RunAsClient
public void testConnection2() throws Exception {
final ModelNode address1 = ModuleAcDeploymentTestCaseSetup.address1.clone();
address1.add("connection-definitions", cf1);
address1.protect();
final ModelNode operation1 = new ModelNode();
operation1.get(OP).set("test-connection-in-pool");
operation1.get(OP_ADDR).set(address1);
executeOperation(operation1);
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project wildfly by wildfly.
the class TwoRaFlatTestCase method testConnection2.
/**
* Tests connection in pool
*
* @throws Exception in case of error
*/
@Test
@RunAsClient
public void testConnection2() throws Exception {
final ModelNode address1 = ModuleAcDeploymentTestCaseSetup.address1.clone();
address1.add("connection-definitions", cf1);
address1.protect();
final ModelNode operation1 = new ModelNode();
operation1.get(OP).set("test-connection-in-pool");
operation1.get(OP_ADDR).set(address1);
executeOperation(operation1);
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project wildfly by wildfly.
the class TwoRaJarTestCase method testConnection2.
/**
* Tests connection in pool
*
* @throws Exception in case of error
*/
@Test
@RunAsClient
public void testConnection2() throws Exception {
final ModelNode address1 = ModuleAcDeploymentTestCaseSetup1.address1.clone();
address1.add("connection-definitions", cf1);
address1.protect();
final ModelNode operation1 = new ModelNode();
operation1.get(OP).set("test-connection-in-pool");
operation1.get(OP_ADDR).set(address1);
executeOperation(operation1);
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project wildfly by wildfly.
the class WSTrustTestCase method testHolderOfKey.
@Test
@RunAsClient
@OperateOnDeployment(HOLDER_OF_KEY_SERVER_DEP)
@WrapThreadContextClassLoader
public void testHolderOfKey() throws Exception {
Bus bus = BusFactory.newInstance().createBus();
try {
BusFactory.setThreadDefaultBus(bus);
final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy", "HolderOfKeyService");
final URL wsdlURL = new URL("https", serviceURL.getHost(), serviceURL.getPort() - 8080 + 8444, "/jaxws-samples-wsse-policy-trust-holderofkey/HolderOfKeyService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
HolderOfKeyIface proxy = (HolderOfKeyIface) service.getPort(HolderOfKeyIface.class);
WSTrustTestUtils.setupWsseAndSTSClientHolderOfKey((BindingProvider) proxy, bus);
assertEquals("Holder-Of-Key WS-Trust Hello World!", proxy.sayHello());
} finally {
bus.shutdown(true);
}
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project wildfly by wildfly.
the class WSTrustTestCase method testUsingEPR.
/**
* WS-Trust test with the STS information coming from EPR specified in service endpoint contract policy
*
* @throws Exception
*/
@Test
@RunAsClient
@OperateOnDeployment(SERVER_DEP)
@WrapThreadContextClassLoader
public void testUsingEPR() throws Exception {
Bus bus = BusFactory.newInstance().createBus();
try {
BusFactory.setThreadDefaultBus(bus);
final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
final URL wsdlURL = new URL(serviceURL + "SecurityService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
WSTrustTestUtils.setupWsse(proxy, bus);
try {
assertEquals("WS-Trust Hello World!", proxy.sayHello());
} catch (Exception e) {
throw e;
}
} finally {
bus.shutdown(true);
}
}
Aggregations