Search in sources :

Example 6 with GqAAAnswer

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());
}
Also used : GqAARequest(net.java.slee.resource.diameter.gq.events.GqAARequest) GqAAAnswer(net.java.slee.resource.diameter.gq.events.GqAAAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with GqAAAnswer

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);
}
Also used : GqAAAnswer(net.java.slee.resource.diameter.gq.events.GqAAAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 8 with GqAAAnswer

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);
}
Also used : GqAAAnswer(net.java.slee.resource.diameter.gq.events.GqAAAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

GqAAAnswer (net.java.slee.resource.diameter.gq.events.GqAAAnswer)8 Test (org.junit.Test)8 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)8 GqAARequest (net.java.slee.resource.diameter.gq.events.GqAARequest)2 ApplicationId (org.jdiameter.api.ApplicationId)1 GqMessageFactoryImpl (org.mobicents.slee.resource.diameter.gq.GqMessageFactoryImpl)1