quality: Add test cases for get_config messages

This commit is contained in:
Eishun Kondoh 2019-04-28 14:18:51 +09:00
parent c592d9f7c5
commit ca07b47575
5 changed files with 29 additions and 17 deletions

View file

@ -10,17 +10,22 @@ defmodule Openflow.GetConfig.Request do
alias __MODULE__
@type t :: %Request{
version: 4,
xid: 0..0xFFFFFFFF,
datapath_id: String.t() | nil,
aux_id: non_neg_integer() | nil
}
@spec ofp_type() :: 7
def ofp_type, do: 7
def new(xid \\ 0) do
%Request{xid: xid}
end
@spec new(xid :: 0..0xFFFFFFFF) :: t()
def new(xid \\ 0), do: %Request{xid: xid}
def read(_) do
%Request{}
end
@spec read(any()) :: t()
def read(_), do: %Request{}
def to_binary(%Request{}) do
<<>>
end
@spec to_binary(t()) :: <<>>
def to_binary(%Request{}), do: <<>>
end