@@ -50,28 +50,34 @@ TEST_CASE("Create() function", "[wifi][core][ap][linux]")
50
50
{
51
51
using namespace Microsoft ::Net::Wifi;
52
52
53
+ using Microsoft::Net::Netlink::Nl80211::Nl80211Interface;
54
+
53
55
SECTION (" Create() doesn't cause a crash" )
54
56
{
57
+ auto createArgs = std::make_unique<AccessPointCreateArgsLinux>(Nl80211Interface{});
55
58
AccessPointFactoryLinux accessPointFactory{ std::make_unique<Test::AccessPointControllerFactoryTest>() };
56
- REQUIRE_NOTHROW (accessPointFactory.Create (Test::InterfaceNameDefault));
59
+ REQUIRE_NOTHROW (accessPointFactory.Create (Test::InterfaceNameDefault, std::move (createArgs) ));
57
60
}
58
61
59
62
SECTION (" Create() with empty/null inteface doesn't cause a crash" )
60
63
{
64
+ auto createArgs = std::make_unique<AccessPointCreateArgsLinux>(Nl80211Interface{});
61
65
AccessPointFactoryLinux accessPointFactory{ std::make_unique<Test::AccessPointControllerFactoryTest>() };
62
- REQUIRE_NOTHROW (accessPointFactory.Create ({}));
66
+ REQUIRE_NOTHROW (accessPointFactory.Create ({}, std::move (createArgs) ));
63
67
}
64
68
65
69
SECTION (" Create() with valid input arguments returns non-nullptr instance" )
66
70
{
71
+ auto createArgs = std::make_unique<AccessPointCreateArgsLinux>(Nl80211Interface{});
67
72
AccessPointFactoryLinux accessPointFactory{ std::make_unique<Test::AccessPointControllerFactoryTest>() };
68
- REQUIRE (accessPointFactory.Create (Test::InterfaceNameDefault) != nullptr );
73
+ REQUIRE (accessPointFactory.Create (Test::InterfaceNameDefault, std::move (createArgs) ) != nullptr );
69
74
}
70
75
71
76
SECTION (" Create() instance reflects basic properties from base class" )
72
77
{
78
+ auto createArgs = std::make_unique<AccessPointCreateArgsLinux>(Nl80211Interface{});
73
79
AccessPointFactoryLinux accessPointFactory{ std::make_unique<Test::AccessPointControllerFactoryTest>() };
74
- const auto accessPoint = accessPointFactory.Create (Test::InterfaceNameDefault);
80
+ const auto accessPoint = accessPointFactory.Create (Test::InterfaceNameDefault, std::move (createArgs) );
75
81
REQUIRE (accessPoint->GetInterfaceName () == Test::InterfaceNameDefault);
76
82
}
77
83
}
0 commit comments