use of net.java.slee.resource.diameter.s6a.events.ResetAnswer in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method isProxiableCopiedRSA.
@Test
public void isProxiableCopiedRSA() throws Exception {
ResetRequest rsr = s6aMessageFactory.createResetRequest();
clientSession.fetchSessionData(rsr);
ResetAnswer rsa = clientSession.createResetAnswer();
assertEquals("The 'P' bit is not copied from request in Location-Info-Answer, it should. [RFC3588/6.2]", rsr.getHeader().isProxiable(), rsa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) rsr).getGenericData().setProxiable(!rsr.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Reset-Request, it should.", rsr.getHeader().isProxiable() != rsa.getHeader().isProxiable());
clientSession.fetchSessionData(rsr);
rsa = clientSession.createResetAnswer();
assertEquals("The 'P' bit is not copied from request in Reset-Answer, it should. [RFC3588/6.2]", rsr.getHeader().isProxiable(), rsa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.s6a.events.ResetAnswer in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method testGettersAndSettersRSA.
@Test
public void testGettersAndSettersRSA() throws Exception {
ResetRequest rsr = s6aMessageFactory.createResetRequest();
clientSession.fetchSessionData(rsr);
ResetAnswer rsa = clientSession.createResetAnswer();
int nFailures = S6aAvpAssistant.INSTANCE.testMethods(rsa, ResetAnswer.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.s6a.events.ResetAnswer in project jain-slee.diameter by RestComm.
the class S6aFactoriesTest method hasDestinationHostRSA.
@Test
public void hasDestinationHostRSA() throws Exception {
ResetRequest rsr = s6aMessageFactory.createResetRequest();
clientSession.fetchSessionData(rsr);
ResetAnswer rsa = clientSession.createResetAnswer();
assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", rsa.getDestinationHost());
}
Aggregations