Search in sources :

Example 1 with ShClientSubscriptionActivityImpl

use of org.mobicents.slee.resource.diameter.sh.client.ShClientSubscriptionActivityImpl in project jain-slee.diameter by RestComm.

the class ShClientActivityAnswerCreationTest method testShClientActivityAnswerCreation.

@Test
public void testShClientActivityAnswerCreation() throws Exception {
    ClientShSession session = new ShClientSessionImpl(new ShClientSessionDataLocalImpl(), new IShMessageFactoryImpl(), (ISessionFactory) stack.getSessionFactory(), new ClientShSessionListenerImpl());
    PushNotificationRequest pnr = new PushNotificationRequestImpl(stack.getSessionFactory().getNewSession().createRequest(PushNotificationRequest.commandCode, SH_APP_ID, "mobicents.org", "hss.mobicents"));
    ArrayList<DiameterMessage> list = new ArrayList<DiameterMessage>();
    list.add(pnr);
    ShClientSubscriptionActivityImpl activity = new ShClientSubscriptionActivityImpl(new ShClientMessageFactoryImpl(session.getSessions().get(0), stack), new DiameterShAvpFactoryImpl(diameterAvpFactory), session, null, null);
    DiameterActivityAnswerCreationHelper.testAnswerCreation(activity, "stateMessages", list);
}
Also used : PushNotificationRequestImpl(org.mobicents.slee.resource.diameter.sh.events.PushNotificationRequestImpl) ClientShSession(org.jdiameter.api.sh.ClientShSession) ArrayList(java.util.ArrayList) DiameterMessage(net.java.slee.resource.diameter.base.events.DiameterMessage) ShClientSessionImpl(org.jdiameter.client.impl.app.sh.ShClientSessionImpl) ShClientSessionDataLocalImpl(org.jdiameter.client.impl.app.sh.ShClientSessionDataLocalImpl) ShClientMessageFactoryImpl(org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl) PushNotificationRequest(net.java.slee.resource.diameter.sh.events.PushNotificationRequest) ShClientSubscriptionActivityImpl(org.mobicents.slee.resource.diameter.sh.client.ShClientSubscriptionActivityImpl) DiameterShAvpFactoryImpl(org.mobicents.slee.resource.diameter.sh.DiameterShAvpFactoryImpl) 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 PushNotificationRequest (net.java.slee.resource.diameter.sh.events.PushNotificationRequest)1 ClientShSession (org.jdiameter.api.sh.ClientShSession)1 ShClientSessionDataLocalImpl (org.jdiameter.client.impl.app.sh.ShClientSessionDataLocalImpl)1 ShClientSessionImpl (org.jdiameter.client.impl.app.sh.ShClientSessionImpl)1 Test (org.junit.Test)1 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)1 DiameterShAvpFactoryImpl (org.mobicents.slee.resource.diameter.sh.DiameterShAvpFactoryImpl)1 ShClientMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl)1 ShClientSubscriptionActivityImpl (org.mobicents.slee.resource.diameter.sh.client.ShClientSubscriptionActivityImpl)1 PushNotificationRequestImpl (org.mobicents.slee.resource.diameter.sh.events.PushNotificationRequestImpl)1