use of net.java.slee.resource.diameter.cxdx.events.UserAuthorizationAnswer in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method isProxiableCopiedUAA.
@Test
public void isProxiableCopiedUAA() throws Exception {
UserAuthorizationRequest uar = cxdxMessageFactory.createUserAuthorizationRequest();
serverSession.fetchSessionData(uar);
UserAuthorizationAnswer uaa = serverSession.createUserAuthorizationAnswer();
assertEquals("The 'P' bit is not copied from request in User-Authorization-Answer, it should. [RFC3588/6.2]", uar.getHeader().isProxiable(), uaa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) uar).getGenericData().setProxiable(!uar.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in User-Authorization-Request, it should.", uar.getHeader().isProxiable() != uaa.getHeader().isProxiable());
serverSession.fetchSessionData(uar);
uaa = serverSession.createUserAuthorizationAnswer();
assertEquals("The 'P' bit is not copied from request in User-Authorization-Answer, it should. [RFC3588/6.2]", uar.getHeader().isProxiable(), uaa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.cxdx.events.UserAuthorizationAnswer in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method isAnswerUAA.
@Test
public void isAnswerUAA() throws Exception {
serverSession.fetchSessionData(cxdxMessageFactory.createUserAuthorizationRequest());
UserAuthorizationAnswer uaa = serverSession.createUserAuthorizationAnswer();
assertFalse("Request Flag in Server-Assignment-Answer is set.", uaa.getHeader().isRequest());
}
use of net.java.slee.resource.diameter.cxdx.events.UserAuthorizationAnswer in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method hasDestinationHostUAA.
@Test
public void hasDestinationHostUAA() throws Exception {
serverSession.fetchSessionData(cxdxMessageFactory.createUserAuthorizationRequest());
UserAuthorizationAnswer uaa = serverSession.createUserAuthorizationAnswer();
assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", uaa.getDestinationHost());
}
Aggregations