Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117753759
kolab_guam_sup_SUITE.erl
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
kolab_guam_sup_SUITE.erl
View Options
%% Copyright 2015 Kolab Systems AG (http://www.kolabsys.com)
%%
%% Aaron Seigo (Kolab Systems) <seigo a kolabsys.com>
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation, either version 3 of the License, or
%% (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
-
module
(
kolab_guam_sup_SUITE
).
% easier than exporting by name
-
compile
(
export_all
).
% required for common_test to work
-
include_lib
(
"eimap/src/eimap.hrl"
).
-
include
(
"ct.hrl"
).
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% common test callbacks %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Specify a list of all unit test functions
all
()
->
[
imap_server_config_test
,
imap_server_settings_to_config_test
].
% required, but can just return Config. this is a suite level setup function.
init_per_suite
(
Config
)
->
Config
.
% required, but can just return Config. this is a suite level tear down function.
end_per_suite
(
Config
)
->
Config
.
% optional, can do function level setup for all functions,
% or for individual functions by matching on TestCase.
init_per_testcase
(_
TestCase
,
Config
)
->
Config
.
% optional, can do function level tear down for all functions,
% or for individual functions by matching on TestCase.
end_per_testcase
(_
TestCase
,
Config
)
->
Config
.
% c("apps/kolab_guam/test/kolab_guam_sup_tests.erl"). eunit:test(kolab_guam_sup_tests).
imap_server_settings_to_config_test
(_
TestConfig
)
->
Configs
=
[
{
[],
#eimap_server_config
{}
},
{
[
{
tls
,
false
}
],
#eimap_server_config
{
tls
=
false
}
},
{
[
{
host
,
"192.168.56.101"
},
{
port
,
993
},
{
tls
,
true
}
],
#eimap_server_config
{
host
=
"192.168.56.101"
,
port
=
993
,
tls
=
true
}
}
],
lists
:
foreach
(
fun
({
Config
,
Record
})
->
Record
=
kolab_guam_sup
:
imap_server_settings_to_config
(
Config
)
end
,
Configs
).
default_imap_server_config_test
(_
TestConfig
)
->
Expected
=
#eimap_server_config
{
host
=
"192.168.56.102"
,
port
=
994
,
tls
=
true
},
Expected
=
kolab_guam_sup
:
default_imap_server_config
().
imap_server_config_test
(_
TestConfig
)
->
Configs
=
[
{
test_default
,
#eimap_server_config
{
host
=
"192.168.56.101"
,
port
=
993
,
tls
=
false
}
}
],
lists
:
foreach
(
fun
({
Config
,
Record
})
->
Record
=
kolab_guam_sup
:
imap_server_config
(
Config
)
end
,
Configs
).
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 6:05 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18748779
Default Alt Text
kolab_guam_sup_SUITE.erl (2 KB)
Attached To
Mode
rG guam
Attached
Detach File
Event Timeline