use of net.java.slee.resource.diameter.gq.events.GqAAAnswer in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method isProxiableCopiedAAA.
@Test
public void isProxiableCopiedAAA() throws Exception {
GqAARequest aar = gqMessageFactory.createGqAARequest();
GqAAAnswer aaa = gqMessageFactory.createGqAAAnswer(aar);
assertEquals("The 'P' bit is not copied from request in Gq' AA-Answer, it should. [RFC3588/6.2]", aar.getHeader().isProxiable(), aaa.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) aar).getGenericData().setProxiable(!aar.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Gq' AA-Request, it should.", aar.getHeader().isProxiable() != aaa.getHeader().isProxiable());
aaa = gqMessageFactory.createGqAAAnswer(aar);
assertEquals("The 'P' bit is not copied from request in Gq' AA-Answer, it should. [RFC3588/6.2]", aar.getHeader().isProxiable(), aaa.getHeader().isProxiable());
}
use of net.java.slee.resource.diameter.gq.events.GqAAAnswer in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method testGettersAndSettersAAA.
@Test
public void testGettersAndSettersAAA() throws Exception {
GqAAAnswer aaa = gqServerSession.createGqAAAnswer(gqMessageFactory.createGqAARequest());
int nFailures = GqAvpAssistant.INSTANCE.testMethods(aaa, GqAAAnswer.class);
assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
use of net.java.slee.resource.diameter.gq.events.GqAAAnswer in project jain-slee.diameter by RestComm.
the class GqFactoriesTest method hasGqApplicationIdAAA.
@Test
public void hasGqApplicationIdAAA() throws Exception {
GqAAAnswer aaa = gqServerSession.createGqAAAnswer(gqMessageFactory.createGqAARequest());
assertTrue("Auth-Application-Id AVP in Gq AAA must be " + GqMessageFactory._GQ_AUTH_APP_ID + ", it is " + aaa.getAuthApplicationId(), aaa.getAuthApplicationId() == GqMessageFactory._GQ_AUTH_APP_ID);
}
Aggregations