Search in sources :

Example 1 with GxReAuthAnswer

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

Example 2 with GxReAuthAnswer

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

Example 3 with GxReAuthAnswer

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

Example 4 with GxReAuthAnswer

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

Example 5 with GxReAuthAnswer

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

Aggregations

GxReAuthAnswer (net.java.slee.resource.diameter.gx.events.GxReAuthAnswer)8 Test (org.junit.Test)8 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)8 GxReAuthRequest (net.java.slee.resource.diameter.gx.events.GxReAuthRequest)2 ApplicationId (org.jdiameter.api.ApplicationId)1 GxMessageFactoryImpl (org.mobicents.slee.resource.diameter.gx.GxMessageFactoryImpl)1