Search in sources :

Example 6 with ReAuthAnswer

use of net.java.slee.resource.diameter.base.events.ReAuthAnswer in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method hasTFlagSetRAA.

@Test
public void hasTFlagSetRAA() throws Exception {
    ReAuthRequest rar = messageFactory.createReAuthRequest();
    ((DiameterMessageImpl) rar).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in Re-Auth-Request", rar.getHeader().isPotentiallyRetransmitted());
    ReAuthAnswer raa = messageFactory.createReAuthAnswer(rar);
    assertFalse("The 'T' flag should not be set in Re-Auth-Answer", raa.getHeader().isPotentiallyRetransmitted());
}
Also used : ReAuthRequest(net.java.slee.resource.diameter.base.events.ReAuthRequest) ReAuthAnswer(net.java.slee.resource.diameter.base.events.ReAuthAnswer) Test(org.junit.Test)

Example 7 with ReAuthAnswer

use of net.java.slee.resource.diameter.base.events.ReAuthAnswer in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method testGettersAndSettersRAA.

@Test
public void testGettersAndSettersRAA() throws Exception {
    ReAuthAnswer raa = messageFactory.createReAuthAnswer(messageFactory.createReAuthRequest());
    int nFailures = AvpAssistant.INSTANCE.testMethods(raa, ReAuthAnswer.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : ReAuthAnswer(net.java.slee.resource.diameter.base.events.ReAuthAnswer) Test(org.junit.Test)

Example 8 with ReAuthAnswer

use of net.java.slee.resource.diameter.base.events.ReAuthAnswer in project jain-slee.diameter by RestComm.

the class DiameterMessageFactoryImpl method createReAuthAnswer.

public ReAuthAnswer createReAuthAnswer(ReAuthRequest request, DiameterAvp[] avps) throws AvpNotAllowedException {
    ReAuthAnswer msg = (ReAuthAnswer) this.createDiameterMessage(request.getHeader(), avps, Message.RE_AUTH_ANSWER, getApplicationId(request));
    // Add Session-Id AVP if not present
    addSessionIdAvp(msg);
    return msg;
}
Also used : ReAuthAnswer(net.java.slee.resource.diameter.base.events.ReAuthAnswer)

Aggregations

ReAuthAnswer (net.java.slee.resource.diameter.base.events.ReAuthAnswer)8 Test (org.junit.Test)6 ReAuthRequest (net.java.slee.resource.diameter.base.events.ReAuthRequest)2 IOException (java.io.IOException)1 AbortSessionAnswer (net.java.slee.resource.diameter.base.events.AbortSessionAnswer)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 Answer (org.jdiameter.api.Answer)1 ReAuthAnswerImpl (org.jdiameter.common.impl.app.auth.ReAuthAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1