~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/test/accounttest.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
3
3
 *  Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com>
4
4
 *
5
5
 *  This program is free software; you can redistribute it and/or modify
34
34
#include "account_schema.h"
35
35
#include "accounttest.h"
36
36
#include "manager.h"
 
37
#include "client/configurationmanager.h"
37
38
#include "logger.h"
38
 
#include "validator.h"
39
39
 
40
40
void AccountTest::TestAddRemove()
41
41
{
42
42
    DEBUG("-------------------- %s --------------------\n", __PRETTY_FUNCTION__);
43
43
 
44
 
    std::map<std::string, std::string> details;
 
44
    std::map<std::string, std::string> details(Manager::instance().getClient()->getConfigurationManager()->getAccountTemplate());
45
45
    details[CONFIG_ACCOUNT_TYPE] = "SIP";
46
46
    details[CONFIG_ACCOUNT_ENABLE] = "false";
47
47
    details[CONFIG_LOCAL_INTERFACE] = "default";
48
48
    details[CONFIG_LOCAL_PORT] = "5060";
49
49
 
50
50
    std::string accountId = Manager::instance().addAccount(details);
51
 
    CPPUNIT_ASSERT(Validator::isNotNull(accountId));
 
51
    CPPUNIT_ASSERT(not accountId.empty());
52
52
    CPPUNIT_ASSERT(Manager::instance().accountExists(accountId));
53
53
 
54
54
    Manager::instance().removeAccount(accountId);