TutorialsAndTests/Tests/AtlHenTests.cpp
TEST(AtlHenTests, RequireThat_CoCreateInstance_CreatesCluckObserver_WhenCalledWithCluckObserversClassId)
{
    CComPtr<IAsyncCluckObserver> observer;
    HR(CoCreateInstance(CLSID_AtlCluckObserver, nullptr, CLSCTX_INPROC_SERVER, IID_IAsyncCluckObserver, reinterpret_cast<void**>(&observer)));
    EXPECT_NE(observer, nullptr);
}
// Test that demonstrates how to create a COM object based upon its class id
Test that demonstrates how to create a COM object based upon its class id
Test that demonstrates how to create a COM object based upon its class id
TEST(AtlHenTests, RequireThat_CoCreateInstance_CreatesCluckObserver_WhenCalledWithCluckObserversClassId)
{
    CComPtr<IAsyncCluckObserver> observer;
    HR(CoCreateInstance(CLSID_AtlCluckObserver, nullptr, CLSCTX_INPROC_SERVER, IID_IAsyncCluckObserver, reinterpret_cast<void**>(&observer)));
    EXPECT_NE(observer, nullptr);
}
TEST ( AtlHenTests , RequireThat_CoCreateInstance_CreatesCluckObserver_WhenCalledWithCluckObserversClassId ) { CComPtr < IAsyncCluckObserver > observer ; HR ( CoCreateInstance ( CLSID_AtlCluckObserver , nullptr , CLSCTX_INPROC_SERVER , IID_IAsyncCluckObserver , reinterpret_cast < void * * > ( & observer ) ) ) ; EXPECT_NE ( observer , nullptr ) ; }
Test that demonstrates how to create a COM object based upon its class id
Test that demonstrates how to create a COM object based upon its class id