use of net.java.slee.resource.diameter.cxdx.events.ServerAssignmentRequest in project jain-slee.diameter by RestComm.
the class CxDxClientSessionImpl method createServerAssignmentRequest.
/* (non-Javadoc)
* @see net.java.slee.resource.diameter.cxdx.CxDxClientSession#createServerAssignmentRequest()
*/
public ServerAssignmentRequest createServerAssignmentRequest() {
// Create the request
ServerAssignmentRequest sar = cxdxMessageFactory.createServerAssignmentRequest(super.getSessionId());
// Fill session related AVPs, if present
fillSessionAVPs(sar);
return sar;
}
use of net.java.slee.resource.diameter.cxdx.events.ServerAssignmentRequest in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method testGettersAndSettersSAR.
@Test
public void testGettersAndSettersSAR() throws Exception {
ServerAssignmentRequest sar = cxdxMessageFactory.createServerAssignmentRequest();
int nFailures = CxDxAvpAssistant.INSTANCE.testMethods(sar, ServerAssignmentRequest.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.cxdx.events.ServerAssignmentRequest in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method isProxiableCopiedSAA.
@Test
public void isProxiableCopiedSAA() throws Exception {
ServerAssignmentRequest sar = cxdxMessageFactory.createServerAssignmentRequest();
serverSession.fetchSessionData(sar);
ServerAssignmentAnswer saa = serverSession.createServerAssignmentAnswer();
assertEquals("The 'P' bit is not copied from request in Server-Assignment-Answer, it should. [RFC3588/6.2]", sar.getHeader().isProxiable(), saa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) sar).getGenericData().setProxiable(!sar.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Server-Assignment-Request, it should.", sar.getHeader().isProxiable() != saa.getHeader().isProxiable());
serverSession.fetchSessionData(sar);
saa = serverSession.createServerAssignmentAnswer();
assertEquals("The 'P' bit is not copied from request in Server-Assignment-Answer, it should. [RFC3588/6.2]", sar.getHeader().isProxiable(), saa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.cxdx.events.ServerAssignmentRequest in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method hasTFlagSetSAA.
@Test
public void hasTFlagSetSAA() throws Exception {
ServerAssignmentRequest sar = cxdxMessageFactory.createServerAssignmentRequest();
((DiameterMessageImpl) sar).getGenericData().setReTransmitted(true);
assertTrue("The 'T' flag should be set in Server-Assignment-Request", sar.getHeader().isPotentiallyRetransmitted());
serverSession.fetchSessionData(sar);
ServerAssignmentAnswer saa = serverSession.createServerAssignmentAnswer();
assertFalse("The 'T' flag should not be set in Server-Assignment-Answer", saa.getHeader().isPotentiallyRetransmitted());
}
use of net.java.slee.resource.diameter.cxdx.events.ServerAssignmentRequest in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method isProxiableSAR.
@Test
public void isProxiableSAR() throws Exception {
ServerAssignmentRequest sar = cxdxMessageFactory.createServerAssignmentRequest();
assertTrue("The 'P' bit is not set by default in Server-Assignment-Request, it should.", sar.getHeader().isProxiable());
}
Aggregations