added makefile, fixed problems with tests
This commit is contained in:
parent
e4753b2c07
commit
6ee945379f
8 changed files with 58 additions and 36 deletions
|
@ -1,6 +1,5 @@
|
|||
-module(ggs_player_test).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-import(ggs_player).
|
||||
|
||||
%% @doc start_link should always return ok for any valid socket. A valid socket
|
||||
%% should always return {ok, Pid} and {error, Reason} otherwise.
|
||||
|
@ -10,9 +9,9 @@ start_link_test() ->
|
|||
%% @doc Given that start_link returned {ok, Player}. Notify shall always return ok and
|
||||
%% deliver a specified message through the socket.
|
||||
notify_test() ->
|
||||
Player = start_link("bad arg"),
|
||||
Player = ggs_player:start_link("bad arg"),
|
||||
Message = {"something", ""},
|
||||
Ret = ggs_player:notify(Player, self(), Message)
|
||||
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
|
||||
|
@ -23,6 +22,6 @@ get_token_test() ->
|
|||
%% @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() ->
|
||||
Player = start_link(something),
|
||||
Player = ggs_player:start_link(something),
|
||||
Table = test,
|
||||
ok = stop(Player, Table).
|
||||
ok = ggs_player:stop(Player, Table).
|
||||
|
|
Reference in a new issue