Search in sources :

Example 6 with NotifyAnswer

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

the class S6aFactoriesTest method testGettersAndSettersNOA.

@Test
public void testGettersAndSettersNOA() throws Exception {
    NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
    serverSession.fetchSessionData(nor);
    NotifyAnswer noa = serverSession.createNotifyAnswer();
    int nFailures = S6aAvpAssistant.INSTANCE.testMethods(noa, NotifyAnswer.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : NotifyRequest(net.java.slee.resource.diameter.s6a.events.NotifyRequest) NotifyAnswer(net.java.slee.resource.diameter.s6a.events.NotifyAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with NotifyAnswer

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

the class S6aFactoriesTest method hasDestinationRealmNOA.

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

Example 8 with NotifyAnswer

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

the class S6aFactoriesTest method isAnswerNOA.

@Test
public void isAnswerNOA() throws Exception {
    NotifyRequest nor = s6aMessageFactory.createNotifyRequest();
    serverSession.fetchSessionData(nor);
    NotifyAnswer noa = serverSession.createNotifyAnswer();
    assertFalse("Request Flag in Notify-Answer is set.", noa.getHeader().isRequest());
}
Also used : NotifyRequest(net.java.slee.resource.diameter.s6a.events.NotifyRequest) NotifyAnswer(net.java.slee.resource.diameter.s6a.events.NotifyAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

NotifyAnswer (net.java.slee.resource.diameter.s6a.events.NotifyAnswer)8 NotifyRequest (net.java.slee.resource.diameter.s6a.events.NotifyRequest)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