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

chenge · 2021年04月30日 · 317 次阅读

这是一个 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)

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号