From fb7c9a0e24d1834dfe0c63a4cbd16464263880c2 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 9 Feb 2012 20:36:47 -0500 Subject: Test mysqlerl:start/0 and mysqlerl:stop/0. Also be a little more thorough in tests and make sure things have started and stopped correctly with application:which_applications/0. --- test/mysqlerl_app_SUITE.erl | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/test/mysqlerl_app_SUITE.erl b/test/mysqlerl_app_SUITE.erl index c8e777e..cfaa3d1 100644 --- a/test/mysqlerl_app_SUITE.erl +++ b/test/mysqlerl_app_SUITE.erl @@ -106,7 +106,7 @@ groups() -> %% @end %%-------------------------------------------------------------------- all() -> - [app_starts, app_stops]. + [app_starts, app_stops, mysqlerl_starts, mysqlerl_stops]. %%-------------------------------------------------------------------- %% @spec TestCase(Config0) -> @@ -120,9 +120,25 @@ all() -> app_starts(doc) -> ["Tests application:start/1."]; app_starts(_Config) -> - ok = application:start(mysqlerl). + ok = application:start(mysqlerl), + {mysqlerl, _, _} = lists:keyfind(mysqlerl, 1, + application:which_applications()). app_stops(doc) -> ["Tests application:stop/1."]; app_stops(_Config) -> - ok = application:stop(mysqlerl). + ok = application:stop(mysqlerl), + false = lists:keyfind(mysqlerl, 1, application:which_applications()). + +mysqlerl_starts(doc) -> + ["Tests mysqlerl:start/0."]; +mysqlerl_starts(_Config) -> + ok = mysqlerl:start(), + {mysqlerl, _, _} = lists:keyfind(mysqlerl, 1, + application:which_applications()). + +mysqlerl_stops(doc) -> + ["Tests mysqlerl:stop/0."]; +mysqlerl_stops(_Config) -> + ok = mysqlerl:stop(), + false = lists:keyfind(mysqlerl, 1, application:which_applications()). -- cgit v1.2.3