add test for SetAliasFor

This commit is contained in:
Kent Gruber 2018-05-01 14:59:09 -04:00
parent bb493de4c9
commit 29486e1bf7

View file

@ -69,3 +69,13 @@ func TestMarshalJSON(t *testing.T) {
t.Error(err)
}
}
func TestSetAliasFor(t *testing.T) {
exampleAlias := "picat"
exampleLAN := buildExampleLAN()
exampleEndpoint := buildExampleEndpoint()
exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint
if !exampleLAN.SetAliasFor(exampleEndpoint.HwAddress, exampleAlias) {
t.Error("unable to set alias for a given mac address")
}
}