use of net.java.slee.resource.diameter.gq.events.GqAbortSessionRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method isProxiableCopiedASA.
@Test
public void isProxiableCopiedASA() throws Exception {
GqAbortSessionRequest asr = gqMessageFactory.createGqAbortSessionRequest();
GqAbortSessionAnswer asa = gqMessageFactory.createGqAbortSessionAnswer(asr);
assertEquals("The 'P' bit is not copied from request in Gq' Abort-Session-Answer, it should. [RFC3588/6.2]", asr.getHeader().isProxiable(), asa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) asr).getGenericData().setProxiable(!asr.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Gq' Abort-Session-Request, it should.", asr.getHeader().isProxiable() != asa.getHeader().isProxiable());
asa = gqMessageFactory.createGqAbortSessionAnswer(asr);
assertEquals("The 'P' bit is not copied from request in Gq' Abort-Session-Answer, it should. [RFC3588/6.2]", asr.getHeader().isProxiable(), asa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.gq.events.GqAbortSessionRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method testGettersAndSettersASR.
@Test
public void testGettersAndSettersASR() throws Exception {
GqAbortSessionRequest asr = gqMessageFactory.createGqAbortSessionRequest();
int nFailures = GqAvpAssistant.INSTANCE.testMethods(asr, GqAbortSessionRequest.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.gq.events.GqAbortSessionRequest in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAbortSessionRequest.
@Override
public GqAbortSessionRequest createGqAbortSessionRequest(String sessionId) {
Message raw = createRequest(GqAbortSessionRequest.COMMAND_CODE, new DiameterAvp[] {});
GqAbortSessionRequest asr = new GqAbortSessionRequestImpl(raw);
asr.setSessionId(sessionId);
addOrigin(asr);
return asr;
}
use of net.java.slee.resource.diameter.gq.events.GqAbortSessionRequest in project jain-slee.diameter by RestComm.
the class GqMessageFactoryImpl method createGqAbortSessionRequest.
@Override
public GqAbortSessionRequest createGqAbortSessionRequest() {
Message raw = createRequest(GqAbortSessionRequest.COMMAND_CODE, new DiameterAvp[] {});
GqAbortSessionRequest asr = new GqAbortSessionRequestImpl(raw);
if (sessionId != null) {
asr.setSessionId(sessionId);
}
addOrigin(asr);
return asr;
}
Aggregations