use of net.java.slee.resource.diameter.gx.events.GxReAuthAnswer in project jain-slee.diameter by RestComm.
the class GxFactoriesTest method hasGxApplicationIdRAA.
@Test
public void hasGxApplicationIdRAA() throws Exception {
GxReAuthAnswer raa = gxClientSession.createGxReAuthAnswer(gxMessageFactory.createGxReAuthRequest());
assertTrue("Auth-Application-Id AVP in Gx CCA must be 16777224, it is " + raa.getAuthApplicationId(), raa.getAuthApplicationId() == 16777224);
}
use of net.java.slee.resource.diameter.gx.events.GxReAuthAnswer in project jain-slee.diameter by RestComm.
the class GxFactoriesTest method testGettersAndSettersRAA.
@Test
public void testGettersAndSettersRAA() throws Exception {
GxReAuthAnswer raa = gxClientSession.createGxReAuthAnswer(gxMessageFactory.createGxReAuthRequest());
int nFailures = GxAvpAssistant.INSTANCE.testMethods(raa, GxReAuthAnswer.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.gx.events.GxReAuthAnswer in project jain-slee.diameter by RestComm.
the class GxFactoriesTest method hasDestinationRealmRAA.
@Test
public void hasDestinationRealmRAA() throws Exception {
GxReAuthAnswer raa = gxClientSession.createGxReAuthAnswer(gxMessageFactory.createGxReAuthRequest());
assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", raa.getDestinationRealm());
}
use of net.java.slee.resource.diameter.gx.events.GxReAuthAnswer in project jain-slee.diameter by RestComm.
the class GxFactoriesTest method hasDestinationHostRAA.
@Test
public void hasDestinationHostRAA() throws Exception {
GxReAuthAnswer raa = gxClientSession.createGxReAuthAnswer(gxMessageFactory.createGxReAuthRequest());
assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", raa.getDestinationHost());
}
use of net.java.slee.resource.diameter.gx.events.GxReAuthAnswer in project jain-slee.diameter by RestComm.
the class GxFactoriesTest method isProxiableCopiedRAA.
@Test
public void isProxiableCopiedRAA() throws Exception {
GxReAuthRequest rar = gxMessageFactory.createGxReAuthRequest();
GxReAuthAnswer raa = gxClientSession.createGxReAuthAnswer(rar);
assertEquals("The 'P' bit is not copied from request in Re-Auth-Answer, it should. [RFC3588/6.2]", rar.getHeader().isProxiable(), raa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) rar).getGenericData().setProxiable(!rar.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Re-Auth-Request, it should.", rar.getHeader().isProxiable() != raa.getHeader().isProxiable());
raa = gxClientSession.createGxReAuthAnswer(rar);
assertEquals("The 'P' bit is not copied from request in Re-Auth-Answer, it should. [RFC3588/6.2]", rar.getHeader().isProxiable(), raa.getHeader().isProxiable());
}
Aggregations