use of net.java.slee.resource.diameter.s6a.events.CancelLocationRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method isProxiableCLR.
@Test
public void isProxiableCLR() throws Exception {
CancelLocationRequest clr = s6aMessageFactory.createCancelLocationRequest();
assertTrue("The 'P' bit is not set by default in Cancel-Location-Request it should.", clr.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.s6a.events.CancelLocationRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method hasTFlagSetCLA.
@Test
public void hasTFlagSetCLA() throws Exception {
CancelLocationRequest clr = s6aMessageFactory.createCancelLocationRequest();
((DiameterMessageImpl) clr).getGenericData().setReTransmitted(true);
assertTrue("The 'T' flag should be set in Cancel-Location-Request", clr.getHeader().isPotentiallyRetransmitted());
clientSession.fetchSessionData(clr);
CancelLocationAnswer cla = clientSession.createCancelLocationAnswer();
assertFalse("The 'T' flag should not be set in Cancel-Location-Answer", cla.getHeader().isPotentiallyRetransmitted());
}
use of net.java.slee.resource.diameter.s6a.events.CancelLocationRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method isRequestCLR.
@Test
public void isRequestCLR() throws Exception {
CancelLocationRequest clr = s6aMessageFactory.createCancelLocationRequest();
assertTrue("Request Flag in Cancel-Location-Request is not set.", clr.getHeader().isRequest());
}
use of net.java.slee.resource.diameter.s6a.events.CancelLocationRequest in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method createCancelLocationAnswer.
public CancelLocationAnswer createCancelLocationAnswer() {
// Make sure we have the correct type of Request
if (!(lastRequest instanceof CancelLocationRequest)) {
logger.warn("Invalid type of answer for this activity.");
return null;
}
try {
// Create the answer
CancelLocationAnswer cla = (CancelLocationAnswer) this.s6aMessageFactory.createS6aMessage(lastRequest.getHeader(), new DiameterAvp[] {}, CancelLocationAnswer.COMMAND_CODE, s6aMessageFactory.getApplicationId());
// Fill session related AVPs, if present
fillSessionAVPs(cla);
return cla;
} catch (InternalException e) {
logger.error("Failed to create Cancel-Location-Answer.", e);
}
return null;
}
use of net.java.slee.resource.diameter.s6a.events.CancelLocationRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method testGettersAndSettersCLR.
@Test
public void testGettersAndSettersCLR() throws Exception {
CancelLocationRequest clr = s6aMessageFactory.createCancelLocationRequest();
int nFailures = S6aAvpAssistant.INSTANCE.testMethods(clr, CancelLocationRequest.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Aggregations