Search in sources :

Example 1 with ShServerActivityImpl

use of org.mobicents.slee.resource.diameter.sh.server.ShServerActivityImpl in project jain-slee.diameter by RestComm.

the class ShServerActivityAnswerCreationTest method testShServerActivityAnswerCreation.

@Test
public void testShServerActivityAnswerCreation() throws Exception {
    ServerShSession session = new ShServerSessionImpl(new ShServerSessionDataLocalImpl(), new IShMessageFactoryImpl(), (ISessionFactory) stack.getSessionFactory(), new ServerShSessionListenerImpl());
    DiameterMessageFactoryImpl msgFactory = new DiameterMessageFactoryImpl(session.getSessions().get(0), stack, null, null);
    ShClientMessageFactoryImpl factory = new ShClientMessageFactoryImpl(session.getSessions().get(0), stack);
    UserDataRequest udr = factory.createUserDataRequest();
    net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest pur = factory.createProfileUpdateRequest();
    net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest snr = factory.createSubscribeNotificationsRequest();
    ArrayList<DiameterMessage> list = new ArrayList<DiameterMessage>();
    list.add(udr);
    list.add(pur);
    list.add(snr);
    ShServerActivityImpl activity = new ShServerActivityImpl(new ShServerMessageFactoryImpl(msgFactory, session.getSessions().get(0), stack, diameterShAvpFactory), diameterShAvpFactory, session, null, null);
    DiameterActivityAnswerCreationHelper.testAnswerCreation(activity, "stateMessages", list);
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) ArrayList(java.util.ArrayList) DiameterMessage(net.java.slee.resource.diameter.base.events.DiameterMessage) ShServerActivityImpl(org.mobicents.slee.resource.diameter.sh.server.ShServerActivityImpl) ShClientMessageFactoryImpl(org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl) ShServerSessionImpl(org.jdiameter.server.impl.app.sh.ShServerSessionImpl) DiameterMessageFactoryImpl(org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl) ShServerMessageFactoryImpl(org.mobicents.slee.resource.diameter.sh.server.ShServerMessageFactoryImpl) ServerShSession(org.jdiameter.api.sh.ServerShSession) ShServerSessionDataLocalImpl(org.jdiameter.server.impl.app.sh.ShServerSessionDataLocalImpl) Test(org.junit.Test) ShClientActivityAnswerCreationTest(org.mobicents.slee.resource.diameter.sh.client.tests.activities.ShClientActivityAnswerCreationTest)

Aggregations

ArrayList (java.util.ArrayList)1 DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)1 UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)1 ServerShSession (org.jdiameter.api.sh.ServerShSession)1 ShServerSessionDataLocalImpl (org.jdiameter.server.impl.app.sh.ShServerSessionDataLocalImpl)1 ShServerSessionImpl (org.jdiameter.server.impl.app.sh.ShServerSessionImpl)1 Test (org.junit.Test)1 DiameterMessageFactoryImpl (org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl)1 ShClientMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl)1 ShClientActivityAnswerCreationTest (org.mobicents.slee.resource.diameter.sh.client.tests.activities.ShClientActivityAnswerCreationTest)1 ShServerActivityImpl (org.mobicents.slee.resource.diameter.sh.server.ShServerActivityImpl)1 ShServerMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.server.ShServerMessageFactoryImpl)1