Commit ddde7cce authored by Don Gagne's avatar Don Gagne

Must new MockUAS otherwise qt resource system is not ready

parent ed807d4f
......@@ -42,8 +42,16 @@ QGCUASFileManagerUnitTest::QGCUASFileManagerUnitTest(void) :
// Called once before all test cases are run
void QGCUASFileManagerUnitTest::initTestCase(void)
{
_mockUAS.setMockSystemId(_systemIdServer);
_mockUAS.setMockMavlinkPlugin(&_mockFileServer);
_mockUAS = new MockUAS();
Q_CHECK_PTR(_mockUAS);
_mockUAS->setMockSystemId(_systemIdServer);
_mockUAS->setMockMavlinkPlugin(&_mockFileServer);
}
void QGCUASFileManagerUnitTest::cleanupTestCase(void)
{
delete _mockUAS;
}
// Called before every test case
......@@ -53,7 +61,7 @@ void QGCUASFileManagerUnitTest::init(void)
Q_ASSERT(_multiSpy == NULL);
_fileManager = new QGCUASFileManager(NULL, &_mockUAS, _systemIdQGC);
_fileManager = new QGCUASFileManager(NULL, _mockUAS, _systemIdQGC);
Q_CHECK_PTR(_fileManager);
// Reset any internal state back to normal
......
......@@ -48,6 +48,7 @@ public:
private slots:
// Test case initialization
void initTestCase(void);
void cleanupTestCase(void);
void init(void);
void cleanup(void);
......@@ -84,7 +85,7 @@ private:
static const uint8_t _systemIdQGC = 255;
static const uint8_t _systemIdServer = 128;
MockUAS _mockUAS;
MockUAS* _mockUAS;
MockMavlinkFileServer _mockFileServer;
QGCUASFileManager* _fileManager;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment