Search in sources :

Example 1 with GqAbortSessionAnswer

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

the class GqFactoriesTest method testGettersAndSettersASA.

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

Example 2 with GqAbortSessionAnswer

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

the class GqFactoriesTest method isAnswerASA.

// Abort-Session-Answer
@Test
public void isAnswerASA() throws Exception {
    GqAbortSessionAnswer asa = gqMessageFactory.createGqAbortSessionAnswer(gqMessageFactory.createGqAbortSessionRequest());
    assertFalse("Request Flag in Abort-Session-Answer is set.", asa.getHeader().isRequest());
}
Also used : GqAbortSessionAnswer(net.java.slee.resource.diameter.gq.events.GqAbortSessionAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 3 with GqAbortSessionAnswer

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

the class GqFactoriesTest method hasDestinationRealmASA.

@Test
public void hasDestinationRealmASA() throws Exception {
    GqAbortSessionAnswer asa = gqMessageFactory.createGqAbortSessionAnswer(gqMessageFactory.createGqAbortSessionRequest());
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", asa.getDestinationRealm());
}
Also used : GqAbortSessionAnswer(net.java.slee.resource.diameter.gq.events.GqAbortSessionAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 4 with GqAbortSessionAnswer

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

the class GqFactoriesTest method hasDestinationHostASA.

@Test
public void hasDestinationHostASA() throws Exception {
    GqAbortSessionAnswer asa = gqMessageFactory.createGqAbortSessionAnswer(gqMessageFactory.createGqAbortSessionRequest());
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", asa.getDestinationHost());
}
Also used : GqAbortSessionAnswer(net.java.slee.resource.diameter.gq.events.GqAbortSessionAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 5 with GqAbortSessionAnswer

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

the class GqFactoriesTest method hasTFlagSetASA.

@Test
public void hasTFlagSetASA() throws Exception {
    GqAbortSessionRequest asr = gqMessageFactory.createGqAbortSessionRequest();
    ((DiameterMessageImpl) asr).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in Abort-Session-Request", asr.getHeader().isPotentiallyRetransmitted());
    GqAbortSessionAnswer asa = gqMessageFactory.createGqAbortSessionAnswer(asr);
    assertFalse("The 'T' flag should not be set in Abort-Session-Answer", asa.getHeader().isPotentiallyRetransmitted());
}
Also used : GqAbortSessionAnswer(net.java.slee.resource.diameter.gq.events.GqAbortSessionAnswer) GqAbortSessionRequest(net.java.slee.resource.diameter.gq.events.GqAbortSessionRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

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