From f3a3c10b4722c3e0c765f50520f56caebcc7e874 Mon Sep 17 00:00:00 2001 From: Dmitry Rubinstein Date: Wed, 18 Jul 2018 17:26:31 +0300 Subject: [PATCH] Fixing tests --- CHANGELOG.md | 6 ++++ extras/Provider.md | 0 extras/Providers.md | 28 +++++++++++++++ mix.exs | 45 ++++++++++++----------- mix.lock | 24 +++---------- test/support/provider/dummy/dummy.ex | 9 ----- test/support/random/reciever.ex | 10 ------ test/unit/bot/bot_test.exs | 13 ------- test/unit/bot/storage_test.exs | 35 ------------------ test/unit/chain/loopback_test.exs | 4 +-- test/unit/conn/bot_params_test.exs | 10 +++--- test/unit/conn/conn_test.exs | 12 ++----- test/unit/conn/multi_test.exs | 52 --------------------------- test/unit/provider/behaviour_test.exs | 22 +++++++----- 14 files changed, 86 insertions(+), 184 deletions(-) delete mode 100644 extras/Provider.md create mode 100644 extras/Providers.md delete mode 100644 test/support/provider/dummy/dummy.ex delete mode 100644 test/support/random/reciever.ex delete mode 100644 test/unit/bot/bot_test.exs delete mode 100644 test/unit/bot/storage_test.exs delete mode 100644 test/unit/conn/multi_test.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index 594c784..bb90e93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 3.0.0 + +### Changes + +* Sugnificant remainings with bot structure and operation syncronisation. + ### 2.0.2 [BUG] Change Bot's id from string to atom diff --git a/extras/Provider.md b/extras/Provider.md deleted file mode 100644 index e69de29..0000000 diff --git a/extras/Providers.md b/extras/Providers.md new file mode 100644 index 0000000..de482d6 --- /dev/null +++ b/extras/Providers.md @@ -0,0 +1,28 @@ +## Providers + +Provider is one of the main concepts of **Agala** framework. Different providers +*provide* different incoming event sources for your application. + +All providers share same concepts of construction, but can have absolutely different +underline logic. One can create his own provider and plug it into Agala platform or share +between community. Or, you can use prepared provider in order to forget about +event source protocols and deal only with business logic of incoming events. + +### Propvider structure + +Basically, **provider package** can contain everything is needed to perform communication +with third-parties. It doesn't have any *upper border*, it is limited only by common sence. + +At the same time, provider should follow some convention, and have some modules that implement +special behaviours: + +* **Main module**: provider entry point. Should implement `Agala.Provider` behaviour. +* 1 to 3 retreiving modules: + * **Plug**, that follows `Agala.Bot.Plug` conventions + * **Poller**, that follows `Agala.Bot.Poller` conventions + * **Handler**. that follows `Agala.Bot.Handler` conventions +* Optional **Helper** or **API** modules, that provide mechanisms to send response back to provider. + +### Provider implimentation + +TODO \ No newline at end of file diff --git a/mix.exs b/mix.exs index 83eaaff..9517fd6 100644 --- a/mix.exs +++ b/mix.exs @@ -1,20 +1,26 @@ -defmodule Agala.Mixfile do +defmodule Agala.MixProject do use Mix.Project def project do - [app: :agala, - version: "3.0.0", - elixir: "~> 1.6", - build_embedded: Mix.env == :prod, - start_permanent: Mix.env == :prod, - description: description(), - elixirc_paths: elixirc_paths(Mix.env), - package: package(), - aliases: aliases(), - test_coverage: [tool: ExCoveralls], - preferred_cli_env: ["coveralls": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test], - docs: docs(), - deps: deps()] + [ + app: :agala, + version: "3.0.0", + elixir: "~> 1.6", + start_permanent: Mix.env() == :prod, + description: description(), + elixirc_paths: elixirc_paths(Mix.env()), + package: package(), + aliases: aliases(), + test_coverage: [tool: ExCoveralls], + preferred_cli_env: [ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.post": :test, + "coveralls.html": :test + ], + docs: docs(), + deps: deps() + ] end defp elixirc_paths(:test), do: ["lib", "test/support"] @@ -35,15 +41,11 @@ defmodule Agala.Mixfile do defp deps do [ - # Production dependencies - {:fastglobal, "~> 1.0"}, - {:poolboy, "~> 1.5"}, - {:plug, "~> 1.6"}, # Dev and test dependecies {:ex_doc, "~> 0.18", only: :dev}, - {:inch_ex,"~> 0.5", only: [:dev, :test, :docs]}, + {:inch_ex, "~> 0.5", only: [:dev, :test, :docs]}, {:credo, "~> 0.8", only: [:dev, :test]}, - {:excoveralls, "~> 0.8", only: :test} + {:excoveralls, "~> 0.9", only: :test} ] end @@ -60,9 +62,10 @@ defmodule Agala.Mixfile do extras: [ "extras/Getting Started.md", "extras/Bots.md", + "extras/Providers.md", "extras/Usage.md", "extras/Handlers.md", - "extras/General Configuration.md", + "extras/General Configuration.md" ] ] end diff --git a/mix.lock b/mix.lock index bb43eb7..edde769 100644 --- a/mix.lock +++ b/mix.lock @@ -1,32 +1,18 @@ %{ - "amqp": {:hex, :amqp, "1.0.3", "06a6d909abc71d82b7c3133ca491899ca18fce857d0697dd060c29de1ef498d8", [:mix], [{:amqp_client, "~> 3.7.3", [hex: :amqp_client, repo: "hexpm", optional: false]}, {:goldrush, "~> 0.1.0", [hex: :goldrush, repo: "hexpm", optional: false]}, {:jsx, "~> 2.8", [hex: :jsx, repo: "hexpm", optional: false]}, {:lager, "~> 3.5", [hex: :lager, repo: "hexpm", optional: false]}, {:rabbit_common, "~> 3.7.3", [hex: :rabbit_common, repo: "hexpm", optional: false]}, {:ranch, "~> 1.4", [hex: :ranch, repo: "hexpm", optional: false]}, {:ranch_proxy_protocol, "~> 1.4", [hex: :ranch_proxy_protocol, repo: "hexpm", optional: false]}, {:recon, "~> 2.3.2", [hex: :recon, repo: "hexpm", optional: false]}], "hexpm"}, - "amqp_client": {:hex, :amqp_client, "3.7.6", "e85a5688edf75d2f786ea66303f5b0f2b196bc4c5f82495f738ce19570cf8748", [:make, :rebar3], [{:rabbit_common, "3.7.6", [hex: :rabbit_common, repo: "hexpm", optional: false]}], "hexpm"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"}, "certifi": {:hex, :certifi, "2.3.1", "d0f424232390bf47d82da8478022301c561cf6445b5b5fb6a84d49a9e76d2639", [:rebar3], [{:parse_trans, "3.2.0", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"}, "credo": {:hex, :credo, "0.9.3", "76fa3e9e497ab282e0cf64b98a624aa11da702854c52c82db1bf24e54ab7c97a", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:poison, ">= 0.0.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"}, "earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm"}, - "ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, - "excoveralls": {:hex, :excoveralls, "0.9.0", "dd597ccf119aa0be0c1c6681215df588596397833b8dd010fe3d1a48090f3119", [:mix], [{:hackney, ">= 0.12.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, - "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm"}, - "fastglobal": {:hex, :fastglobal, "1.0.0", "f3133a0cda8e9408aac7281ec579c4b4a8386ce0e99ca55f746b9f58192f455b", [:mix], [], "hexpm"}, - "goldrush": {:hex, :goldrush, "0.1.9", "f06e5d5f1277da5c413e84d5a2924174182fb108dabb39d5ec548b27424cd106", [:rebar3], [], "hexpm"}, - "hackney": {:hex, :hackney, "1.12.1", "8bf2d0e11e722e533903fe126e14d6e7e94d9b7983ced595b75f532e04b7fdc7", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.1", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, - "idna": {:hex, :idna, "5.1.1", "cbc3b2fa1645113267cc59c760bafa64b2ea0334635ef06dbac8801e42f7279c", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, + "ex_doc": {:hex, :ex_doc, "0.18.4", "4406b8891cecf1352f49975c6d554e62e4341ceb41b9338949077b0d4a97b949", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, + "excoveralls": {:hex, :excoveralls, "0.9.1", "14fd20fac51ab98d8e79615814cc9811888d2d7b28e85aa90ff2e30dcf3191d6", [:mix], [{:hackney, ">= 0.12.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, + "hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, + "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [:mix], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"}, - "jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, - "jsx": {:hex, :jsx, "2.8.2", "7acc7d785b5abe8a6e9adbde926a24e481f29956dd8b4df49e3e4e7bcc92a018", [:mix, :rebar3], [], "hexpm"}, - "lager": {:hex, :lager, "3.5.1", "63897a61af646c59bb928fee9756ce8bdd02d5a1a2f3551d4a5e38386c2cc071", [:rebar3], [{:goldrush, "0.1.9", [hex: :goldrush, repo: "hexpm", optional: false]}], "hexpm"}, + "jason": {:hex, :jason, "1.1.1", "d3ccb840dfb06f2f90a6d335b536dd074db748b3e7f5b11ab61d239506585eb2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, - "mime": {:hex, :mime, "1.3.0", "5e8d45a39e95c650900d03f897fbf99ae04f60ab1daa4a34c7a20a5151b7a5fe", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.2.0", "2adfa4daf80c14dc36f522cf190eb5c4ee3e28008fc6394397c16f62a26258c2", [:rebar3], [], "hexpm"}, - "plug": {:hex, :plug, "1.6.0", "90d338a44c8cd762c32d3ea324f6728445c6145b51895403854b77f1536f1617", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"}, - "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], [], "hexpm"}, - "rabbit_common": {:hex, :rabbit_common, "3.7.6", "fe6b34db6a98ceef40852e55dd782e944a63c7e855794ab58d3c3845091a6db0", [:make, :rebar3], [{:jsx, "2.8.2", [hex: :jsx, repo: "hexpm", optional: false]}, {:lager, "3.5.1", [hex: :lager, repo: "hexpm", optional: false]}, {:ranch, "1.5.0", [hex: :ranch, repo: "hexpm", optional: false]}, {:ranch_proxy_protocol, "1.5.0", [hex: :ranch_proxy_protocol, repo: "hexpm", optional: false]}, {:recon, "2.3.2", [hex: :recon, repo: "hexpm", optional: false]}], "hexpm"}, - "ranch": {:hex, :ranch, "1.5.0", "f04166f456790fee2ac1aa05a02745cc75783c2bfb26d39faf6aefc9a3d3a58a", [:rebar3], [], "hexpm"}, - "ranch_proxy_protocol": {:hex, :ranch_proxy_protocol, "1.5.0", "e698aaeb590ad504b649dc0d3055abee6caf0b49d3caee1a080ae83b5b499f30", [:rebar3], [{:ranch, "1.5.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"}, - "recon": {:hex, :recon, "2.3.2", "4444c879be323b1b133eec5241cb84bd3821ea194c740d75617e106be4744318", [:rebar3], [], "hexpm"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm"}, } diff --git a/test/support/provider/dummy/dummy.ex b/test/support/provider/dummy/dummy.ex deleted file mode 100644 index 117102f..0000000 --- a/test/support/provider/dummy/dummy.ex +++ /dev/null @@ -1,9 +0,0 @@ -defmodule Agala.Provider.Dummy do - use Agala.Provider - - def child_spec(:poller, bot, opts) do - %{ - id: Module.concat(bot, Poller), - } - end -end diff --git a/test/support/random/reciever.ex b/test/support/random/reciever.ex deleted file mode 100644 index 4ed08d0..0000000 --- a/test/support/random/reciever.ex +++ /dev/null @@ -1,10 +0,0 @@ -defmodule Support.Random.Reciever do - use Agala.Bot.Receiver - - def get_updates(callback, bot_params) do - for number <- 1..10 do - callback.(number) - end - bot_params - end -end diff --git a/test/unit/bot/bot_test.exs b/test/unit/bot/bot_test.exs deleted file mode 100644 index 2cfcbfe..0000000 --- a/test/unit/bot/bot_test.exs +++ /dev/null @@ -1,13 +0,0 @@ -defmodule Agala.Bot.StorageTest do - use ExUnit.Case - alias Agala.Bot - alias Agala.BotParams - - setup do - %{bot_params: %BotParams{name: "test"}} - end - - test "Bot child-spec is proper", %{bot_params: bot_params} do - assert %{id: :"#Agala.Bot", type: :supervisor} = Bot.child_spec(bot_params) - end -end diff --git a/test/unit/bot/storage_test.exs b/test/unit/bot/storage_test.exs deleted file mode 100644 index 84100ce..0000000 --- a/test/unit/bot/storage_test.exs +++ /dev/null @@ -1,35 +0,0 @@ -defmodule Agala.Bot.BotTest do - use ExUnit.Case - - alias Agala.Bot.Storage.Local, as: Storage - alias Agala.BotParams - - setup do - bot_params = %BotParams{name: "test"} - Storage.start_link(bot_params) - %{bot_params: bot_params} - end - - test "Storage is initialized" do - assert is_pid(:global.whereis_name({:agala, :storage, "test"})) - end - - test "Storage child-spec is proper", %{bot_params: bot_params} do - assert %{id: "Agala.Storage.Local#test", type: :worker} = Storage.child_spec(bot_params) - end - - test "Set and Get are working proper", %{bot_params: bot_params} do - Storage.set(bot_params, :foo, "foo") - assert "foo" = Storage.get(bot_params, :foo) - - Storage.set(bot_params, :bar, "bar") - assert "foo" = Storage.get(bot_params, :foo) - assert "bar" = Storage.get(bot_params, :bar) - - Storage.set(bot_params, :foo, "bar") - assert "bar" = Storage.get(bot_params, :foo) - assert "bar" = Storage.get(bot_params, :bar) - - assert nil == Storage.get(bot_params, :foobar) - end -end diff --git a/test/unit/chain/loopback_test.exs b/test/unit/chain/loopback_test.exs index e0ff848..8e42619 100644 --- a/test/unit/chain/loopback_test.exs +++ b/test/unit/chain/loopback_test.exs @@ -8,8 +8,8 @@ defmodule Chain.LoopbackTest do end test ": call" do - assert %Agala.Conn{responser_name: "test"} = - Loopback.call(%Agala.Conn{request_bot_params: %{name: "test"}}, []) + assert %Agala.Conn{responser: Test} = + Loopback.call(%Agala.Conn{request_bot_params: %{bot: Test}}, []) end end end diff --git a/test/unit/conn/bot_params_test.exs b/test/unit/conn/bot_params_test.exs index 137796e..e89f6c0 100644 --- a/test/unit/conn/bot_params_test.exs +++ b/test/unit/conn/bot_params_test.exs @@ -4,9 +4,9 @@ defmodule Agala.BotParamsTest do setup do %{bot_params: %Agala.BotParams{ private: %{}, - name: "test", + bot: Test, provider: FooProvider, - handler: FooHandler, + chain: FooHandler, provider_params: nil }} end @@ -17,12 +17,12 @@ defmodule Agala.BotParamsTest do assert {:ok, FooProvider} = Access.fetch(bot_params, :provider) assert {:ok, nil} = Access.fetch(bot_params, :provider_params) - assert FooHandler = Access.get(bot_params, :handler) + assert FooHandler = Access.get(bot_params, :chain) assert nil == Access.get(bot_params, :foo) - assert {"test", %{name: "shmest"}} = Access.get_and_update(bot_params, :name, fn _ -> {"test", "shmest"} end) + assert {Test, %{bot: Shmest}} = Access.get_and_update(bot_params, :bot, fn _ -> {Test, Shmest} end) - assert {"test", %{name: "test"}} = Access.pop(bot_params, :name) + assert {Test, %{bot: Test}} = Access.pop(bot_params, :bot) end end end diff --git a/test/unit/conn/conn_test.exs b/test/unit/conn/conn_test.exs index 9a4e066..28adfad 100644 --- a/test/unit/conn/conn_test.exs +++ b/test/unit/conn/conn_test.exs @@ -9,7 +9,7 @@ defmodule Agala.ConnTest do response: nil, halted: false, request_bot_params: %Agala.BotParams{}, - responser_name: "test" + responser: Test }} end @@ -32,15 +32,7 @@ defmodule Agala.ConnTest do end test ": send_to is working properly", %{conn: conn} do - assert %{responser_name: "foo"} = Conn.send_to(conn, "foo") - end - - test ": with_fallback is working properly", %{conn: conn} do - fun = fn conn -> conn.responser_name end - - %{fallback: fun_from_conn} = Conn.with_fallback(conn, fun) - - assert "test" = fun_from_conn.(conn) + assert %{responser: Foo} = Conn.send_to(conn, Foo) end test ": assigns is working properly", %{conn: conn} do diff --git a/test/unit/conn/multi_test.exs b/test/unit/conn/multi_test.exs deleted file mode 100644 index 14a35ba..0000000 --- a/test/unit/conn/multi_test.exs +++ /dev/null @@ -1,52 +0,0 @@ -defmodule Agala.Conn.MultiTest do - use ExUnit.Case - import Agala.Conn.Multi - - def good_multi do - multi do - add(%Agala.Conn{}) - add(%Agala.Conn{}) - add(%Agala.Conn{}) - end - end - - def still_good_multi do - multi do - :nothing - end - end - - def wrong_add do - multi do - add(%Agala.Conn{}) - add(%Agala.Conn{}) - add(:wrong_add) - end - end - - def order_multi do - multi do - add(%Agala.Conn{assigns: %{index: 1}}) - add(%Agala.Conn{assigns: %{index: 2}}) - end - end - - test "test good multi" do - assert %Agala.Conn{multi: %Agala.Conn.Multi{}} = Agala.Conn.MultiTest.good_multi() - assert %Agala.Conn{multi: %Agala.Conn.Multi{}} = Agala.Conn.MultiTest.still_good_multi() - end - - test "test wrong" do - assert_raise ArgumentError, fn -> - Agala.Conn.MultiTest.wrong_add() - end - end - - test "Multi execute conns in right order" do - assert %Agala.Conn{ - multi: %Agala.Conn.Multi{ - conns: [%Agala.Conn{assigns: %{index: 1}}, %Agala.Conn{assigns: %{index: 2}}] - } - } = Agala.Conn.MultiTest.order_multi() - end -end diff --git a/test/unit/provider/behaviour_test.exs b/test/unit/provider/behaviour_test.exs index 1117dc7..ae32308 100644 --- a/test/unit/provider/behaviour_test.exs +++ b/test/unit/provider/behaviour_test.exs @@ -8,22 +8,28 @@ defmodule Agala.Provider.Test do defmodule Bar do use Agala.Provider - def get_receiver() do - Foo + def get_bot(:poller) do + Poller end - def get_responser() do - Bazz + def get_bot(:handler) do + Handler + end + + def get_bot(:plug) do + Plug end end test "Using without override" do - assert Agala.Provider.Test.Foo.Receiver = Foo.get_receiver - assert Agala.Provider.Test.Foo.Responser = Foo.get_responser + assert Agala.Provider.Test.Foo.Poller = Foo.get_bot(:poller) + assert Agala.Provider.Test.Foo.Handler = Foo.get_bot(:handler) + assert Agala.Provider.Test.Foo.Plug = Foo.get_bot(:plug) end test "Using with override" do - assert Foo = Bar.get_receiver - assert Bazz = Bar.get_responser + assert Poller = Bar.get_bot(:poller) + assert Handler = Bar.get_bot(:handler) + assert Plug = Bar.get_bot(:plug) end end