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);
}
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));
}
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());
}
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());
}
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;
}
Aggregations