use of net.java.slee.resource.diameter.s6a.events.NotifyRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method hasTFlagSetNOA.
@Test
public void hasTFlagSetNOA() throws Exception {
NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
((DiameterMessageImpl) nor).getGenericData().setReTransmitted(true);
assertTrue("The 'T' flag should be set in Notify-Request", nor.getHeader().isPotentiallyRetransmitted());
serverSession.fetchSessionData(nor);
NotifyAnswer noa = serverSession.createNotifyAnswer();
assertFalse("The 'T' flag should not be set in Notify-Answer", noa.getHeader().isPotentiallyRetransmitted());
}
use of net.java.slee.resource.diameter.s6a.events.NotifyRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method hasDestinationHostNOA.
@Test
public void hasDestinationHostNOA() throws Exception {
NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
serverSession.fetchSessionData(nor);
NotifyAnswer noa = serverSession.createNotifyAnswer();
assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", noa.getDestinationHost());
}
use of net.java.slee.resource.diameter.s6a.events.NotifyRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method isProxiableCopiedNOA.
@Test
public void isProxiableCopiedNOA() throws Exception {
NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
serverSession.fetchSessionData(nor);
NotifyAnswer noa = serverSession.createNotifyAnswer();
assertEquals("The 'P' bit is not copied from request in Location-Info-Answer, it should. [RFC3588/6.2]", nor.getHeader().isProxiable(), noa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) nor).getGenericData().setProxiable(!nor.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Notify-Request, it should.", nor.getHeader().isProxiable() != noa.getHeader().isProxiable());
serverSession.fetchSessionData(nor);
noa = serverSession.createNotifyAnswer();
assertEquals("The 'P' bit is not copied from request in Notify-Answer, it should. [RFC3588/6.2]", nor.getHeader().isProxiable(), noa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.s6a.events.NotifyRequest in project jain-slee.diameter by RestComm.
the class S6aMessageFactoryImpl method createNotifyRequest.
public NotifyRequest createNotifyRequest(String sessionId) throws IllegalArgumentException {
NotifyRequest nor = createNotifyRequest();
nor.setSessionId(sessionId);
return nor;
}
use of net.java.slee.resource.diameter.s6a.events.NotifyRequest in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method isProxiableNOR.
@Test
public void isProxiableNOR() throws Exception {
NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
assertTrue("The 'P' bit is not set by default in Notify-Request it should.", nor.getHeader().isProxiable());
}
Aggregations