You must replace
Assert::IsNotNull(actual, L"Should not return null", LINE_INFO());
with
Assert::IsNotNull(actual.get(), L"Should not return null", LINE_INFO());
In fact, the statement wants the pointer to check if it is null, but the smart pointer is not a pointer strictly speaking (it is an object that controls the pointer).
source share