Erlang/Elixir 体验 Elixir 测试的简单例子

chenge · April 30, 2021 · 317 hits

这是一个 Code Beam 会议上分享的小例子,视频, 代码在:https://github.com/rafaelrochasilva/greenbox

例子是一个 gen_server,负责更新价格,用了一个模拟的 Client。

比较简单

mix deps.get
mix test

iex 

{:ok, pid} = Greenbox.PriceUpdater.start_link()
Greenbox.PriceUpdater.list_products(pid)

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.