mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
add test for List
This commit is contained in:
parent
a9a37593a6
commit
0024434944
1 changed files with 12 additions and 0 deletions
|
@ -68,3 +68,15 @@ func TestStations(t *testing.T) {
|
|||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWiFiList(t *testing.T) {
|
||||
exampleWiFi := buildExampleWiFi()
|
||||
exampleAP := NewAccessPoint("my_wifi", "ff:ff:ff:ff:ff:ff", 2472, int8(0))
|
||||
exampleWiFi.aps["ff:ff:ff:ff:ff:f1"] = exampleAP
|
||||
exampleWiFi.aps["ff:ff:ff:ff:ff:f2"] = exampleAP
|
||||
exp := 2
|
||||
got := len(exampleWiFi.List())
|
||||
if got != exp {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue