Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
f8f07467
Commit
f8f07467
authored
16 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
add load/unload sip account tests
parent
81956b96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/configurationTest.cpp
+36
-2
36 additions, 2 deletions
test/configurationTest.cpp
test/configurationTest.h
+4
-2
4 additions, 2 deletions
test/configurationTest.h
with
40 additions
and
4 deletions
test/configurationTest.cpp
+
36
−
2
View file @
f8f07467
...
...
@@ -18,6 +18,7 @@
*/
#include
<stdio.h>
#include
<sstream>
#include
"configurationTest.h"
...
...
@@ -26,7 +27,7 @@ using std::endl;
void
ConfigurationTest
::
setUp
(){
// Load the default configuration
Manager
::
instance
().
initConfigFile
(
false
);
Manager
::
instance
().
initConfigFile
();
}
void
ConfigurationTest
::
testDefaultValueAudio
(){
...
...
@@ -63,7 +64,40 @@ void ConfigurationTest::testDefaultValueSignalisation(){
CPPUNIT_ASSERT
(
Manager
::
instance
().
getConfigString
(
SIGNALISATION
,
SEND_DTMF_AS
)
==
SIP_INFO_STR
);
}
void
ConfigurationTest
::
testLoadAccountMap
(){
void
ConfigurationTest
::
testLoadSIPAccount
(){
AccountMap
accounts
;
Account
*
current
;
std
::
ostringstream
ss
;
// Load the accounts from the user file
Manager
::
instance
().
loadAccountMap
();
// Save the account information
accounts
=
Manager
::
instance
().
_accountMap
;
AccountMap
::
iterator
iter
=
accounts
.
begin
();
while
(
iter
!=
accounts
.
end
()
){
current
=
iter
->
second
;
CPPUNIT_ASSERT
(
iter
->
first
==
current
->
getAccountID
()
);
CPPUNIT_ASSERT
(
0
==
current
->
getVoIPLink
()
);
iter
++
;
}
}
void
ConfigurationTest
::
testUnloadSIPAccount
(){
AccountMap
accounts
;
// Load the accounts from the user file
Manager
::
instance
().
loadAccountMap
();
// Unload the accounts
Manager
::
instance
().
unloadAccountMap
();
// Save the account information
accounts
=
Manager
::
instance
().
_accountMap
;
AccountMap
::
iterator
iter
=
accounts
.
begin
();
if
(
iter
!=
accounts
.
end
()
){
CPPUNIT_FAIL
(
"Unload account map failed
\n
"
);
}
}
This diff is collapsed.
Click to expand it.
test/configurationTest.h
+
4
−
2
View file @
f8f07467
...
...
@@ -48,7 +48,8 @@ class ConfigurationTest : public CppUnit::TestCase {
CPPUNIT_TEST
(
testDefaultValueAudio
);
CPPUNIT_TEST
(
testDefaultValuePreferences
);
CPPUNIT_TEST
(
testDefaultValueSignalisation
);
CPPUNIT_TEST
(
testLoadAccountMap
);
CPPUNIT_TEST
(
testLoadSIPAccount
);
CPPUNIT_TEST
(
testUnloadSIPAccount
);
CPPUNIT_TEST_SUITE_END
();
public:
...
...
@@ -80,7 +81,8 @@ class ConfigurationTest : public CppUnit::TestCase {
void
testDefaultValueSignalisation
();
void
testLoadAccountMap
();
void
testLoadSIPAccount
();
void
testUnloadSIPAccount
();
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment