use of net.java.slee.resource.diameter.gq.events.GqSessionTerminationRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method isRequestSTR.
// Session-Termination-Request
@Test
public void isRequestSTR() throws Exception {
GqSessionTerminationRequest str = gqMessageFactory.createGqSessionTerminationRequest();
assertTrue("Request Flag in Session-Termination-Request is not set.", str.getHeader().isRequest());
}
use of net.java.slee.resource.diameter.gq.events.GqSessionTerminationRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method isProxiableCopiedSTA.
@Test
public void isProxiableCopiedSTA() throws Exception {
GqSessionTerminationRequest str = gqMessageFactory.createGqSessionTerminationRequest();
GqSessionTerminationAnswer sta = gqMessageFactory.createGqSessionTerminationAnswer(str);
assertEquals("The 'P' bit is not copied from request in Session-Termination-Answer, it should. [RFC3588/6.2]", str.getHeader().isProxiable(), sta.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) str).getGenericData().setProxiable(!str.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Session-Termination-Request, it should.", str.getHeader().isProxiable() != sta.getHeader().isProxiable());
sta = gqMessageFactory.createGqSessionTerminationAnswer(str);
assertEquals("The 'P' bit is not copied from request in Session-Termination-Answer, it should. [RFC3588/6.2]", str.getHeader().isProxiable(), sta.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.gq.events.GqSessionTerminationRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method hasGqApplicationIdSTR.
@Test
public void hasGqApplicationIdSTR() throws Exception {
GqSessionTerminationRequest str = gqMessageFactory.createGqSessionTerminationRequest();
assertTrue("Auth-Application-Id AVP in Gq STR must be " + GqMessageFactory._GQ_AUTH_APP_ID + ", it is " + str.getAuthApplicationId(), str.getAuthApplicationId() == GqMessageFactory._GQ_AUTH_APP_ID);
}
use of net.java.slee.resource.diameter.gq.events.GqSessionTerminationRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method hasTFlagSetSTA.
@Test
public void hasTFlagSetSTA() throws Exception {
GqSessionTerminationRequest str = gqMessageFactory.createGqSessionTerminationRequest();
((DiameterMessageImpl) str).getGenericData().setReTransmitted(true);
assertTrue("The 'T' flag should be set in Session-Termination-Request", str.getHeader().isPotentiallyRetransmitted());
GqSessionTerminationAnswer sta = gqMessageFactory.createGqSessionTerminationAnswer(str);
assertFalse("The 'T' flag should not be set in Session-Termination-Answer", sta.getHeader().isPotentiallyRetransmitted());
}
use of net.java.slee.resource.diameter.gq.events.GqSessionTerminationRequest in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method isProxiableSTR.
@Test
public void isProxiableSTR() throws Exception {
GqSessionTerminationRequest str = gqMessageFactory.createGqSessionTerminationRequest();
assertTrue("The 'P' bit is not set by default in Session-Termination-Request, it should.", str.getHeader().isProxiable());
}
Aggregations