I am trying to link my Native Test Project to existing project in the same solution. In #include I am writing path to the header of class I am trying to test.
When I Run Test in Test Explorer I get build error:
Error 1 error LNK2019: unresolved external symbol "public: __thiscall DataManager::DataManager(void)" (??0DataManager@@QAE@XZ) referenced in function "public: void __thiscall MyProject.Tests::UnitTest1::TestMethod1(void)" (?TestMethod1@UnitTest1@MyProjectTests@@QAEXXZ) D:\Documents\VisualStudio2013\Projects\MyProject\MyProject.Tests\DataManagerTests.obj MyProject.Tests
I found different examples of how to link Native test project to .dll project or Static Library, but not to Windows Application.
Will really appreciate your help.
#include "stdafx.h"
#include "CppUnitTest.h"
#include "D:/Documents/VisualStudio2013/Projects/MyProject/DataManager.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace VideoFaceRecognitionIPCATests
{
TEST_CLASS(UnitTest1)
{
public:
TEST_METHOD(TestMethod1)
{
DataManager dataManager = DataManager();
Assert::AreEqual(0, 0);
}
};
}