Search in sources :

Example 6 with UserDataRequest

use of net.java.slee.resource.diameter.sh.events.UserDataRequest in project jain-slee.diameter by RestComm.

the class ShClientFactoriesTest method testGettersAndSettersUDR.

@Test
public void testGettersAndSettersUDR() throws Exception {
    UserDataRequest udr = shClientFactory.createUserDataRequest();
    int nFailures = ShClientAvpAssistant.INSTANCE.testMethods(udr, UserDataRequest.class);
    assertEquals("Some methods have failed. See logs for more details.", 0, nFailures);
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 7 with UserDataRequest

use of net.java.slee.resource.diameter.sh.events.UserDataRequest in project jain-slee.diameter by RestComm.

the class ShClientFactoriesTest method isUDRPublicIdentityAccessibleTwice.

@Test
public void isUDRPublicIdentityAccessibleTwice() throws Exception {
    String originalValue = "sip:alexandre@diameter.mobicents.org";
    UserIdentityAvpImpl uiAvp = new UserIdentityAvpImpl(DiameterShAvpCodes.USER_IDENTITY, 10415L, 1, 0, new byte[] {});
    uiAvp.setPublicIdentity(originalValue);
    UserDataRequest udr = shClientFactory.createUserDataRequest(uiAvp, DataReferenceType.IMS_PUBLIC_IDENTITY);
    String obtainedValue1 = udr.getUserIdentity().getPublicIdentity();
    String obtainedValue2 = udr.getUserIdentity().getPublicIdentity();
    assertTrue("Obtained value for Public-Identity AVP differs from original.", obtainedValue1.equals(originalValue));
    assertTrue("Obtained #1 value for Public-Identity AVP differs from Obtained #2.", obtainedValue1.equals(obtainedValue2));
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) UserIdentityAvpImpl(org.mobicents.slee.resource.diameter.sh.events.avp.UserIdentityAvpImpl) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 8 with UserDataRequest

use of net.java.slee.resource.diameter.sh.events.UserDataRequest in project jain-slee.diameter by RestComm.

the class ShClientFactoriesTest method isProxiableUDR.

@Test
public void isProxiableUDR() throws Exception {
    UserDataRequest udr = shClientFactory.createUserDataRequest();
    assertTrue("The 'P' bit is not set by default in User-Data-Request, it should.", udr.getHeader().isProxiable());
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 9 with UserDataRequest

use of net.java.slee.resource.diameter.sh.events.UserDataRequest in project jain-slee.diameter by RestComm.

the class ShClientFactoriesTest method isRequestUDR.

@Test
public void isRequestUDR() throws Exception {
    UserDataRequest udr = shClientFactory.createUserDataRequest();
    assertTrue("Request Flag in User-Data-Request is not set.", udr.getHeader().isRequest());
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) Test(org.junit.Test) BaseFactoriesTest(org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)

Example 10 with UserDataRequest

use of net.java.slee.resource.diameter.sh.events.UserDataRequest in project jain-slee.diameter by RestComm.

the class ShClientMessageFactoryImpl method createUserDataRequest.

public UserDataRequest createUserDataRequest(UserIdentityAvp userIdentity, DataReferenceType reference) {
    UserDataRequest udr = this.createUserDataRequest();
    udr.setUserIdentity(userIdentity);
    udr.setDataReference(reference);
    return udr;
}
Also used : UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest)

Aggregations

UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)29 UserIdentityAvp (net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)12 DiameterIdentity (net.java.slee.resource.diameter.base.events.avp.DiameterIdentity)10 ShClientActivity (net.java.slee.resource.diameter.sh.client.ShClientActivity)10 Test (org.junit.Test)10 UserDataAnswer (net.java.slee.resource.diameter.sh.events.UserDataAnswer)9 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)8 ShClientMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl)3 DiameterShMessageImpl (org.mobicents.slee.resource.diameter.sh.events.DiameterShMessageImpl)3 ShServerMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.server.ShServerMessageFactoryImpl)3 ArrayList (java.util.ArrayList)2 DiameterMessage (net.java.slee.resource.diameter.base.events.DiameterMessage)2 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)2 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)2 ApplicationId (org.jdiameter.api.ApplicationId)2 ServerShSession (org.jdiameter.api.sh.ServerShSession)2 ShServerSessionDataLocalImpl (org.jdiameter.server.impl.app.sh.ShServerSessionDataLocalImpl)2 ShServerSessionImpl (org.jdiameter.server.impl.app.sh.ShServerSessionImpl)2 DiameterMessageFactoryImpl (org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl)2 ShClientActivityAnswerCreationTest (org.mobicents.slee.resource.diameter.sh.client.tests.activities.ShClientActivityAnswerCreationTest)2