Search in sources :

Example 6 with CreditControlAnswer

use of net.java.slee.resource.diameter.cca.events.CreditControlAnswer in project jain-slee.diameter by RestComm.

the class CCAFactoriesTest method isAnswerCCA.

@Test
public void isAnswerCCA() throws Exception {
    CreditControlRequest ccr = ccaMessageFactory.createCreditControlRequest();
    CreditControlAnswer cca = ccaMessageFactory.createCreditControlAnswer(ccr);
    assertFalse("Request Flag in Credit-Control-Answer is set.", cca.getHeader().isRequest());
}
Also used : CreditControlRequest(net.java.slee.resource.diameter.cca.events.CreditControlRequest) CreditControlAnswer(net.java.slee.resource.diameter.cca.events.CreditControlAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with CreditControlAnswer

use of net.java.slee.resource.diameter.cca.events.CreditControlAnswer in project jain-slee.diameter by RestComm.

the class CCAFactoriesTest method hasDestinationRealmCCA.

@Test
public void hasDestinationRealmCCA() throws Exception {
    CreditControlAnswer cca = ccaMessageFactory.createCreditControlAnswer(ccaMessageFactory.createCreditControlRequest("582364567346578348"));
    assertNull("The Destination-Host and Destination-Realm AVPs MUST NOT be present in the answer message. [RFC3588/6.2]", cca.getDestinationRealm());
}
Also used : CreditControlAnswer(net.java.slee.resource.diameter.cca.events.CreditControlAnswer) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

CreditControlAnswer (net.java.slee.resource.diameter.cca.events.CreditControlAnswer)7 Test (org.junit.Test)6 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)6 CreditControlRequest (net.java.slee.resource.diameter.cca.events.CreditControlRequest)3 IOException (java.io.IOException)1 AvpNotAllowedException (net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException)1 Answer (org.jdiameter.api.Answer)1 JCreditControlAnswerImpl (org.jdiameter.common.impl.app.cca.JCreditControlAnswerImpl)1 DiameterMessageImpl (org.mobicents.slee.resource.diameter.base.events.DiameterMessageImpl)1