Search in sources :

Example 1 with UpdateLocationRequest

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

the class S6aMessageFactoryImpl method createUpdateLocationRequest.

public UpdateLocationRequest createUpdateLocationRequest(String sessionId) throws IllegalArgumentException {
    UpdateLocationRequest uar = createUpdateLocationRequest();
    uar.setSessionId(sessionId);
    return uar;
}
Also used : UpdateLocationRequest(net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest)

Example 2 with UpdateLocationRequest

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

the class S6aFactoriesTest method hasDestinationRealmULA.

@Test
public void hasDestinationRealmULA() throws Exception {
    UpdateLocationRequest ulr = s6aMessageFactory.createUpdateLocationRequest();
    serverSession.fetchSessionData(ulr);
    UpdateLocationAnswer ula = serverSession.createUpdateLocationAnswer();
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", ula.getDestinationRealm());
}
Also used : UpdateLocationAnswer(net.java.slee.resource.diameter.s6a.events.UpdateLocationAnswer) UpdateLocationRequest(net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 3 with UpdateLocationRequest

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

the class S6aFactoriesTest method isProxiableCopiedULA.

@Test
public void isProxiableCopiedULA() throws Exception {
    UpdateLocationRequest ulr = s6aMessageFactory.createUpdateLocationRequest();
    serverSession.fetchSessionData(ulr);
    UpdateLocationAnswer ula = serverSession.createUpdateLocationAnswer();
    assertEquals("The 'P' bit is not copied from request in Location-Info-Answer, it should. [RFC3588/6.2]", ulr.getHeader().isProxiable(), ula.getHeader().isProxiable());
    // Reverse 'P' bit ...
    ((DiameterMessageImpl) ulr).getGenericData().setProxiable(!ulr.getHeader().isProxiable());
    assertTrue("The 'P' bit was not modified in Update-Location-Request, it should.", ulr.getHeader().isProxiable() != ula.getHeader().isProxiable());
    serverSession.fetchSessionData(ulr);
    ula = serverSession.createUpdateLocationAnswer();
    assertEquals("The 'P' bit is not copied from request in Update-Location-Answer, it should. [RFC3588/6.2]", ulr.getHeader().isProxiable(), ula.getHeader().isProxiable());
}
Also used : UpdateLocationAnswer(net.java.slee.resource.diameter.s6a.events.UpdateLocationAnswer) UpdateLocationRequest(net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 4 with UpdateLocationRequest

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

the class S6aFactoriesTest method isAnswerULA.

@Test
public void isAnswerULA() throws Exception {
    UpdateLocationRequest ulr = s6aMessageFactory.createUpdateLocationRequest();
    serverSession.fetchSessionData(ulr);
    UpdateLocationAnswer ula = serverSession.createUpdateLocationAnswer();
    assertFalse("Request Flag in Update-Location-Answer is set.", ula.getHeader().isRequest());
}
Also used : UpdateLocationAnswer(net.java.slee.resource.diameter.s6a.events.UpdateLocationAnswer) UpdateLocationRequest(net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 5 with UpdateLocationRequest

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

the class S6aFactoriesTest method isRequestULR.

@Test
public void isRequestULR() throws Exception {
    UpdateLocationRequest ulr = s6aMessageFactory.createUpdateLocationRequest();
    assertTrue("Request Flag in Update-Location-Request is not set.", ulr.getHeader().isRequest());
}
Also used : UpdateLocationRequest(net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

UpdateLocationRequest (net.java.slee.resource.diameter.s6a.events.UpdateLocationRequest)14 Test (org.junit.Test)12 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)12 UpdateLocationAnswer (net.java.slee.resource.diameter.s6a.events.UpdateLocationAnswer)9 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