quality: Add test cases for openflow actions

This commit is contained in:
Eishun Kondoh 2019-04-22 20:47:52 +09:00
parent 84a827eea1
commit d2a6488f79
9 changed files with 112 additions and 22 deletions

View file

@ -10,7 +10,8 @@ defmodule Openflow.Action.NxOutputTrunc do
alias __MODULE__
alias Openflow.Action.Experimenter
def new(options \\ []) do
@spec new(Keyword.t()) :: %NxOutputTrunc{}
def new(options) do
port_no = options[:port_no] || raise "port_no must be specified"
max_len = options[:max_len] || raise "max_len must be specified"