use of com.helger.peppol.wsclient2.RequestType in project UVMS-Docker by UnionVMS.
the class FluxMessageReceiverBeanIT method postRequestTypeEmptyRequestFailureTest.
/**
* Post request type empty request failure test.
*/
@Test
public void postRequestTypeEmptyRequestFailureTest() {
BridgeConnectorPortType bridgeConnectorPortType = createBridgeConnector();
RequestType requestType = new RequestType();
ResponseType responseType = bridgeConnectorPortType.post(requestType);
assertNotNull(responseType);
assertEquals("NOK", responseType.getStatus());
}
use of com.helger.peppol.wsclient2.RequestType in project ddf by codice.
the class XacmlPdpTest method testSameAccessRedaction.
@Test
public void testSameAccessRedaction() throws PdpException {
HashMap<String, List<String>> security = new HashMap<String, List<String>>();
security.put(RESOURCE_ACCESS, Arrays.asList(ACCESS_TYPE_A, ACCESS_TYPE_B));
KeyValueCollectionPermission resourcePermissions = new KeyValueCollectionPermissionImpl(CollectionPermission.READ_ACTION, security);
RequestType request = testRealm.createXACMLRequest(USER_NAME, generateSubjectInfo(TEST_COUNTRY), resourcePermissions);
assertThat(testRealm.isPermitted(request), equalTo(true));
}
use of com.helger.peppol.wsclient2.RequestType in project ddf by codice.
the class XacmlPdpTest method testActionGoodSiteName.
@Test
public void testActionGoodSiteName() {
SimpleAuthorizationInfo blankUserInfo = new SimpleAuthorizationInfo(new HashSet<String>());
blankUserInfo.setObjectPermissions(new HashSet<Permission>());
RequestType request = testRealm.createXACMLRequest(USER_NAME, blankUserInfo, new KeyValueCollectionPermissionImpl(SITE_NAME_ACTION));
assertThat(testRealm.isPermitted(request), equalTo(true));
}
use of com.helger.peppol.wsclient2.RequestType in project ddf by codice.
the class XacmlPdpTest method testActionGoodCountry.
@Test
public void testActionGoodCountry() {
RequestType request = testRealm.createXACMLRequest(USER_NAME, generateSubjectInfo(TEST_COUNTRY), new KeyValueCollectionPermissionImpl(QUERY_ACTION));
assertThat(testRealm.isPermitted(request), equalTo(true));
}
use of com.helger.peppol.wsclient2.RequestType in project ddf by codice.
the class XacmlPdpTest method testResourceIsPermitted.
@Test
public void testResourceIsPermitted() {
HashMap<String, List<String>> security = new HashMap<String, List<String>>();
security.put(RESOURCE_ACCESS, Arrays.asList(ACCESS_TYPE_A));
KeyValueCollectionPermission resourcePermissions = new KeyValueCollectionPermissionImpl(CollectionPermission.READ_ACTION, security);
RequestType request = testRealm.createXACMLRequest(USER_NAME, generateSubjectInfo(TEST_COUNTRY), resourcePermissions);
assertThat(testRealm.isPermitted(request), equalTo(true));
}
Aggregations