Пример #1
0
  @Override
  public void setUp() {
    LocalizationContext lc = createNiceMock(LocalizationContext.class);
    replay(lc);

    m_out = new ExchangeMediaServer();
    m_out.setHostname(HOSTNAME);
    m_out.setServerExtension(VOICEMAIL_EXTENSION);
    m_out.setLocalizationContext(lc);
  }
Пример #2
0
  public void testBuildVoicemailDepositUrl() {
    String uri = m_out.buildVoicemailDepositUrl("q=0.1");
    assertEquals(
        "<sip:[email protected];transport=tcp?Diversion=%3Csip:{vdigits}%40{host}%3E%3Breason%3Dno-answer%3Bscreen%3Dno%3Bprivacy%3Doff>;q=0.1",
        uri);

    uri = m_out.buildVoicemailDepositUrl(null);
    assertEquals(
        "<sip:[email protected];transport=tcp?Diversion=%3Csip:{vdigits}%40{host}%3E%3Breason%3Dno-answer%3Bscreen%3Dno%3Bprivacy%3Doff>",
        uri);
  }
Пример #3
0
 public void testGetAddress() {
   assertEquals("Wrong server address.", HOSTNAME, m_out.getHostname());
 }
Пример #4
0
 public void testBuildVoicemailRetrieveUrl() {
   String uri = m_out.buildVoicemailRetrieveUrl();
   assertEquals("<sip:[email protected];transport=tcp>", uri);
 }
Пример #5
0
 public void testConstructorWithArgs() {
   ExchangeMediaServer out = new ExchangeMediaServer(HOSTNAME, VOICEMAIL_EXTENSION);
   assertEquals("Wrong value for hostname.", HOSTNAME, out.getHostname());
   assertEquals("Wrong value for extension.", VOICEMAIL_EXTENSION, out.getServerExtension());
 }