Search in sources :

Example 1 with GqAARequest

use of net.java.slee.resource.diameter.gq.events.GqAARequest in project jain-slee.diameter by RestComm.

the class GqFactoriesTest method isProxiableAAR.

@Test
public void isProxiableAAR() throws Exception {
    GqAARequest rar = gqMessageFactory.createGqAARequest();
    assertTrue("The 'P' bit is not set by default in Gq' AA-Request, it should.", rar.getHeader().isProxiable());
}
Also used : GqAARequest(net.java.slee.resource.diameter.gq.events.GqAARequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 2 with GqAARequest

use of net.java.slee.resource.diameter.gq.events.GqAARequest in project jain-slee.diameter by RestComm.

the class GqFactoriesTest method hasTFlagSetAAA.

@Test
public void hasTFlagSetAAA() throws Exception {
    GqAARequest aar = gqMessageFactory.createGqAARequest();
    ((DiameterMessageImpl) aar).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in AA-Request", aar.getHeader().isPotentiallyRetransmitted());
    GqAAAnswer aaa = gqMessageFactory.createGqAAAnswer(aar);
    assertFalse("The 'T' flag should not be set in AA-Answer", aaa.getHeader().isPotentiallyRetransmitted());
}
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 3 with GqAARequest

use of net.java.slee.resource.diameter.gq.events.GqAARequest in project jain-slee.diameter by RestComm.

the class GqFactoriesTest method hasGqApplicationIdAAR.

@Test
public void hasGqApplicationIdAAR() throws Exception {
    GqAARequest aar = gqMessageFactory.createGqAARequest();
    assertTrue("Auth-Application-Id AVP in Gq AAR must be " + GqMessageFactory._GQ_AUTH_APP_ID + ", it is " + aar.getAuthApplicationId(), aar.getAuthApplicationId() == GqMessageFactory._GQ_AUTH_APP_ID);
}
Also used : GqAARequest(net.java.slee.resource.diameter.gq.events.GqAARequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 4 with GqAARequest

use of net.java.slee.resource.diameter.gq.events.GqAARequest in project jain-slee.diameter by RestComm.

the class GqFactoriesTest method testGettersAndSettersAAR.

@Test
public void testGettersAndSettersAAR() throws Exception {
    GqAARequest aar = gqMessageFactory.createGqAARequest();
    int nFailures = GqAvpAssistant.INSTANCE.testMethods(aar, GqAARequest.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : GqAARequest(net.java.slee.resource.diameter.gq.events.GqAARequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 5 with GqAARequest

use of net.java.slee.resource.diameter.gq.events.GqAARequest in project jain-slee.diameter by RestComm.

the class GqFactoriesTest method isRequestAAR.

// AA-Request
@Test
public void isRequestAAR() throws Exception {
    GqAARequest aar = gqMessageFactory.createGqAARequest();
    assertTrue("Request Flag in AA-Request is not set.", aar.getHeader().isRequest());
}
Also used : GqAARequest(net.java.slee.resource.diameter.gq.events.GqAARequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

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