mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 10:46:57 -07:00
add test for Stations
This commit is contained in:
parent
36562bc7a9
commit
a9a37593a6
1 changed files with 12 additions and 0 deletions
|
@ -56,3 +56,15 @@ func TestEachAccessPoint(t *testing.T) {
|
|||
t.Error("unable to perform callback function for each access point")
|
||||
}
|
||||
}
|
||||
|
||||
func TestStations(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.Stations())
|
||||
if got != exp {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue