From e38bab50545c71f20bd7234e6c6034bc965f5511 Mon Sep 17 00:00:00 2001 From: niklas Date: Thu, 17 Feb 2011 13:52:56 +0100 Subject: [PATCH] Modified player test --- tests/ggs_player_test.erl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/ggs_player_test.erl b/tests/ggs_player_test.erl index 1067f71..be38135 100644 --- a/tests/ggs_player_test.erl +++ b/tests/ggs_player_test.erl @@ -4,20 +4,24 @@ %% @doc start_link should always return ok for any valid socket. A valid socket %% should always return {ok, Pid} and {error, Reason} otherwise. start_link_test() -> - ggs_logger:not_implemented(). + ggs_logger:not_implemented(). %% @doc Given that start_link returned {ok, Player}. Notify shall always return ok and %% deliver a specified message through the socket. notify_test() -> - ggs_logger:not_implemented(). - + Player = start_link("bad arg"), + Message = {"something", ""}, + Ret = ggs_player:notify(Player, self(), Message) + ?assertNot(ok =:= Ret). + %% @doc Given that start_link returned {ok, Player}. get_token shall always return a valid %% player token. a valid token should be unique. get_token_test() -> - ggs_logger:not_implemented(). + ggs_logger:not_implemented(). -%% @doc Given that start_link returned {ok, Pid}. There shouldn't be possible to +%% @doc Given that start_link returned {ok, Pid}. There shouldn't be possible to %% execute this function with the same Player and Table arguments twice. stop_test() -> - ggs_logger:not_implemented(). - + Player = start_link(something), + Table = test, + ok = stop(Player, Table).