Search in sources :

Example 6 with DeleteSubscriberDataRequest

use of net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method hasTFlagSetDSA.

@Test
public void hasTFlagSetDSA() throws Exception {
    DeleteSubscriberDataRequest dsr = s6aMessageFactory.createDeleteSubscriberDataRequest();
    ((DiameterMessageImpl) dsr).getGenericData().setReTransmitted(true);
    assertTrue("The 'T' flag should be set in Delete-Subscriber-Data-Request", dsr.getHeader().isPotentiallyRetransmitted());
    clientSession.fetchSessionData(dsr);
    DeleteSubscriberDataAnswer dsa = clientSession.createDeleteSubscriberDataAnswer();
    assertFalse("The 'T' flag should not be set in Delete-Subscriber-Data-Answer", dsa.getHeader().isPotentiallyRetransmitted());
}
Also used : DeleteSubscriberDataAnswer(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataAnswer) DeleteSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with DeleteSubscriberDataRequest

use of net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method isProxiableDSR.

@Test
public void isProxiableDSR() throws Exception {
    DeleteSubscriberDataRequest dsr = s6aMessageFactory.createDeleteSubscriberDataRequest();
    assertTrue("The 'P' bit is not set by default in Delete-Subscriber-Data-Request it should.", dsr.getHeader().isProxiable());
}
Also used : DeleteSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 8 with DeleteSubscriberDataRequest

use of net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method isRequestDSR.

@Test
public void isRequestDSR() throws Exception {
    DeleteSubscriberDataRequest dsr = s6aMessageFactory.createDeleteSubscriberDataRequest();
    assertTrue("Request Flag in Delete-Subscriber-Data-Request is not set.", dsr.getHeader().isRequest());
}
Also used : DeleteSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 9 with DeleteSubscriberDataRequest

use of net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method hasDestinationRealmDSA.

@Test
public void hasDestinationRealmDSA() throws Exception {
    DeleteSubscriberDataRequest dsr = s6aMessageFactory.createDeleteSubscriberDataRequest();
    clientSession.fetchSessionData(dsr);
    DeleteSubscriberDataAnswer dsa = clientSession.createDeleteSubscriberDataAnswer();
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", dsa.getDestinationRealm());
}
Also used : DeleteSubscriberDataAnswer(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataAnswer) DeleteSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 10 with DeleteSubscriberDataRequest

use of net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest in project jain-slee.diameter by RestComm.

the class S6aFactoriesTest method testGettersAndSettersDSR.

@Test
public void testGettersAndSettersDSR() throws Exception {
    DeleteSubscriberDataRequest dsr = s6aMessageFactory.createDeleteSubscriberDataRequest();
    int nFailures = S6aAvpAssistant.INSTANCE.testMethods(dsr, DeleteSubscriberDataRequest.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : DeleteSubscriberDataRequest(net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

DeleteSubscriberDataRequest (net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataRequest)13 Test (org.junit.Test)11 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)11 DeleteSubscriberDataAnswer (net.java.slee.resource.diameter.s6a.events.DeleteSubscriberDataAnswer)8 ApplicationId (org.jdiameter.api.ApplicationId)2 S6aMessageFactoryImpl (org.mobicents.slee.resource.diameter.s6a.S6aMessageFactoryImpl)2 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)1 InternalException (org.jdiameter.api.InternalException)1