Search in sources :

Example 6 with AbortSessionAnswer

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

the class BaseFactoriesTest method hasDestinationHostASA.

@Test
public void hasDestinationHostASA() throws Exception {
    AbortSessionAnswer asa = messageFactory.createAbortSessionAnswer(messageFactory.createAbortSessionRequest());
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", asa.getDestinationHost());
}
Also used : AbortSessionAnswer(net.java.slee.resource.diameter.base.events.AbortSessionAnswer) Test(org.junit.Test)

Example 7 with AbortSessionAnswer

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

the class BaseFactoriesTest method testGettersAndSettersASA.

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

Example 8 with AbortSessionAnswer

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

the class BaseFactoriesTest method hasTFlagSetASA.

@Test
public void hasTFlagSetASA() throws Exception {
    AbortSessionRequest asr = messageFactory.createAbortSessionRequest();
    ((DiameterMessageImpl) asr).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in Abort-Session-Request", asr.getHeader().isPotentiallyRetransmitted());
    AbortSessionAnswer asa = messageFactory.createAbortSessionAnswer(asr);
    assertFalse("The 'T' flag should not be set in Abort-Session-Answer", asa.getHeader().isPotentiallyRetransmitted());
}
Also used : AbortSessionRequest(net.java.slee.resource.diameter.base.events.AbortSessionRequest) AbortSessionAnswer(net.java.slee.resource.diameter.base.events.AbortSessionAnswer) Test(org.junit.Test)

Aggregations

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