src/connectivity/wlan/drivers/testing/lib/sim-fake-ap/test/assoc_unittests.cc
/* Verify that association requests that are not properly addressed are ignored.

   Timeline for this test:
   1s: send assoc request on different channel
   2s: send assoc request with different bssid
 */
Verify that association requests that are not properly addressed are ignored.
Timeline for this test:
1s: send assoc request on different channel
2s: send assoc request with different bssid
Verify that association requests that are not properly addressed are ignored . Timeline for this test : 1s : send assoc request on different channel 2s : send assoc request with different bssid
TEST_F(AssocTest, RefuseIfNotAuthenticated) {
  auto handler = std::make_unique<std::function<void()>>();
  simulation::SimAssocReqFrame assoc_req_frame(kClientMacAddr, kApBssid, kApSsid);
  *handler = std::bind(&simulation::Environment::Tx, &env_, assoc_req_frame, kDefaultTxInfo, this);
  env_.ScheduleNotification(std::move(handler), zx::usec(50));
  env_.Run();
  EXPECT_EQ(assoc_status_list_.front(), (uint16_t)WLAN_STATUS_CODE_REFUSED);
  assoc_status_list_.pop_front();
  EXPECT_EQ(assoc_status_list_.size(), 0U);
}
TEST_F ( AssocTest , RefuseIfNotAuthenticated ) { auto handler = std :: make_unique < std :: function < void ( ) > > ( ) ; simulation :: SimAssocReqFrame assoc_req_frame ( kClientMacAddr , kApBssid , kApSsid ) ; * handler = std :: bind ( & simulation :: Environment :: Tx , & env_ , assoc_req_frame , kDefaultTxInfo , this ) ; env_ . ScheduleNotification ( std :: move ( handler ) , zx :: usec ( 50 ) ) ; env_ . Run ( ) ; EXPECT_EQ ( assoc_status_list_ . front ( ) , ( uint16_t ) WLAN_STATUS_CODE_REFUSED ) ; assoc_status_list_ . pop_front ( ) ; EXPECT_EQ ( assoc_status_list_ . size ( ) , 0U ) ; }
Verify that association requests that are not properly addressed are ignored.
Verify that association requests that are not properly addressed are ignored .