Search in sources :

Example 6 with ResetAnswer

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

the class S6aFactoriesTest method isProxiableCopiedRSA.

@Test
public void isProxiableCopiedRSA() throws Exception {
    ResetRequest rsr = s6aMessageFactory.createResetRequest();
    clientSession.fetchSessionData(rsr);
    ResetAnswer rsa = clientSession.createResetAnswer();
    assertEquals("The 'P' bit is not copied from request in Location-Info-Answer, it should. [RFC3588/6.2]", rsr.getHeader().isProxiable(), rsa.getHeader().isProxiable());
    // Reverse 'P' bit ...
    ((DiameterMessageImpl) rsr).getGenericData().setProxiable(!rsr.getHeader().isProxiable());
    assertTrue("The 'P' bit was not modified in Reset-Request, it should.", rsr.getHeader().isProxiable() != rsa.getHeader().isProxiable());
    clientSession.fetchSessionData(rsr);
    rsa = clientSession.createResetAnswer();
    assertEquals("The 'P' bit is not copied from request in Reset-Answer, it should. [RFC3588/6.2]", rsr.getHeader().isProxiable(), rsa.getHeader().isProxiable());
}
Also used : ResetAnswer(net.java.slee.resource.diameter.s6a.events.ResetAnswer) ResetRequest(net.java.slee.resource.diameter.s6a.events.ResetRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with ResetAnswer

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

the class S6aFactoriesTest method testGettersAndSettersRSA.

@Test
public void testGettersAndSettersRSA() throws Exception {
    ResetRequest rsr = s6aMessageFactory.createResetRequest();
    clientSession.fetchSessionData(rsr);
    ResetAnswer rsa = clientSession.createResetAnswer();
    int nFailures = S6aAvpAssistant.INSTANCE.testMethods(rsa, ResetAnswer.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : ResetAnswer(net.java.slee.resource.diameter.s6a.events.ResetAnswer) ResetRequest(net.java.slee.resource.diameter.s6a.events.ResetRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 8 with ResetAnswer

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

the class S6aFactoriesTest method hasDestinationHostRSA.

@Test
public void hasDestinationHostRSA() throws Exception {
    ResetRequest rsr = s6aMessageFactory.createResetRequest();
    clientSession.fetchSessionData(rsr);
    ResetAnswer rsa = clientSession.createResetAnswer();
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", rsa.getDestinationHost());
}
Also used : ResetAnswer(net.java.slee.resource.diameter.s6a.events.ResetAnswer) ResetRequest(net.java.slee.resource.diameter.s6a.events.ResetRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

ResetAnswer (net.java.slee.resource.diameter.s6a.events.ResetAnswer)8 ResetRequest (net.java.slee.resource.diameter.s6a.events.ResetRequest)8 Test (org.junit.Test)7 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)7 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)1 ApplicationId (org.jdiameter.api.ApplicationId)1 InternalException (org.jdiameter.api.InternalException)1 S6aMessageFactoryImpl (org.mobicents.slee.resource.diameter.s6a.S6aMessageFactoryImpl)1