#include
#include "gtest/gtest.h"
#import "..\..\interfaces\tlb\FAOServer.tlb" no_namespace, named_guids
int main(int argc, char **argv) {
std::cout << "Running main() from TestFAOServer.cpp\n";
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#include "test/production.h"
TEST(FAOServerTest, InitializeCOMSubSystem)
{
HRESULT hr = CoInitialize(NULL);
ASSERT_EQ(hr,S_OK);
}
TEST(FAOServerTest, CreateInstance)
{
IAO* pAPOL = NULL;
bool pointerNull = false;
ASSERT_EQ((pAPOL == NULL), true);
HRESULT hr = CoCreateInstance
(
CLSID_AO,
NULL,
CLSCTX_ALL,
IID_IAO,
(void**)&pAPOL
);
ASSERT_EQ(hr, S_OK);
if (hr == S_OK)
{
hr = pAPOL->OnDTC();
ASSERT_EQ(hr, S_OK);
}
}
TEST(FAOSTest, TerminateCOMSubSystem)
{
CoUninitialize();
ASSERT_EQ(0,0);
}
