I want to check if the constructor is initialized correctly, but I don't know which assert method to use
TEST_METHOD(testInitNavigator)
{
Room room;
INavigator navigator(room);
Assert::AreSame(room, navigator.getLocalRoom());
}
CodePudding user response:
I think it is correct so
TEST_METHOD(testInitNavigator)
{
Room room;
INavigator navigator(room);
Assert::IsTrue(typeid(room).name() == typeid(navigator.getLocalRoom()).name());
}