Search in sources :

Example 1 with CreditControlServerSessionImpl

use of org.mobicents.slee.resource.diameter.cca.CreditControlServerSessionImpl in project jain-slee.diameter by RestComm.

the class CCAActivityAnswerCreationTest method testCCAServerActivityAnswerCreation.

@Test
public void testCCAServerActivityAnswerCreation() throws Exception {
    CCASessionFactoryImpl ccaSF = new CCASessionFactoryImpl();
    ServerCCASessionImpl session = new ServerCCASessionImpl(new ICCASessionDataImpl(), ccaSF, (ISessionFactory) stack.getSessionFactory(), new LocalServerCCASessionListenerImpl(), ccaSF, ccaSF);
    CreditControlMessageFactoryImpl ccaMessageFactory = new CreditControlMessageFactoryImpl(baseMessageFactory, session.getSessions().get(0), stack, ccaAvpFactory);
    ArrayList<DiameterMessage> list = new ArrayList<DiameterMessage>();
    list.add(ccaMessageFactory.createCreditControlRequest());
    CreditControlServerSessionImpl activity = new CreditControlServerSessionImpl(ccaMessageFactory, ccaAvpFactory, session, null, null);
    DiameterActivityAnswerCreationHelper.testAnswerCreation(activity, "lastRequest", list);
}
Also used : CreditControlMessageFactoryImpl(org.mobicents.slee.resource.diameter.cca.CreditControlMessageFactoryImpl) ArrayList(java.util.ArrayList) DiameterMessage(net.java.slee.resource.diameter.base.events.DiameterMessage) CCASessionFactoryImpl(org.jdiameter.common.impl.app.cca.CCASessionFactoryImpl) CreditControlServerSessionImpl(org.mobicents.slee.resource.diameter.cca.CreditControlServerSessionImpl) ServerCCASessionImpl(org.jdiameter.server.impl.app.cca.ServerCCASessionImpl) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Aggregations

ArrayList (java.util.ArrayList)1 DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)1 CCASessionFactoryImpl (org.jdiameter.common.impl.app.cca.CCASessionFactoryImpl)1 ServerCCASessionImpl (org.jdiameter.server.impl.app.cca.ServerCCASessionImpl)1 Test (org.junit.Test)1 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)1 CreditControlMessageFactoryImpl (org.mobicents.slee.resource.diameter.cca.CreditControlMessageFactoryImpl)1 CreditControlServerSessionImpl (org.mobicents.slee.resource.diameter.cca.CreditControlServerSessionImpl)1