use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.
the class BaseFactoriesTest method isProxiableSTR.
@Test
public void isProxiableSTR() throws Exception {
SessionTerminationRequest acr = messageFactory.createSessionTerminationRequest();
assertTrue("The 'P' bit is not set by default in Session-Termination-Request, it should.", acr.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.
the class BaseFactoriesTest method isRequestSTR.
@Test
public void isRequestSTR() throws Exception {
SessionTerminationRequest str = messageFactory.createSessionTerminationRequest();
assertTrue("Request Flag in Disconnect-Peer-Request is not set.", str.getHeader().isRequest());
}
use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.
the class BaseFactoriesTest method isProxiableCopiedSTA.
@Test
public void isProxiableCopiedSTA() throws Exception {
SessionTerminationRequest asr = messageFactory.createSessionTerminationRequest();
SessionTerminationAnswer asa = messageFactory.createSessionTerminationAnswer(asr);
assertEquals("The 'P' bit is not copied from request in Session-Termination-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 Session-Termination-Request, it should.", asr.getHeader().isProxiable() != asa.getHeader().isProxiable());
asa = messageFactory.createSessionTerminationAnswer(asr);
assertEquals("The 'P' bit is not copied from request in Session-Termination-Answer, it should. [RFC3588/6.2]", asr.getHeader().isProxiable(), asa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.
the class BaseFactoriesTest method testGettersAndSettersSTR.
@Test
public void testGettersAndSettersSTR() throws Exception {
SessionTerminationRequest str = messageFactory.createSessionTerminationRequest();
int nFailures = AvpAssistant.INSTANCE.testMethods(str, SessionTerminationRequest.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.base.events.SessionTerminationRequest in project jain-slee.diameter by RestComm.
the class DiameterMessageFactoryImpl method createSessionTerminationRequest.
public SessionTerminationRequest createSessionTerminationRequest(DiameterAvp[] avps) throws AvpNotAllowedException {
SessionTerminationRequest msg = (SessionTerminationRequest) this.createDiameterMessage(null, avps, Message.SESSION_TERMINATION_REQUEST, BASE_AUTH_APP_ID);
// Add Session-Id AVP if not present
addSessionIdAvp(msg);
return msg;
}
Aggregations