mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-10-06 15:07:10 +03:00
49 lines
827 B
C++
49 lines
827 B
C++
|
//
|
||
|
// Copyright (c) 2016, Scientific Toolworks, Inc.
|
||
|
//
|
||
|
// This software is licensed under the MIT License. The LICENSE.md file
|
||
|
// describes the conditions under which this software may be distributed.
|
||
|
//
|
||
|
// Author: Jason Haslam
|
||
|
//
|
||
|
|
||
|
#include "Test.h"
|
||
|
#include "ui/MainWindow.h"
|
||
|
|
||
|
using namespace Test;
|
||
|
using namespace QTest;
|
||
|
|
||
|
class TestMainWindow : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
private slots:
|
||
|
void initTestCase();
|
||
|
void show();
|
||
|
void cleanupTestCase();
|
||
|
|
||
|
private:
|
||
|
ScratchRepository mRepo;
|
||
|
MainWindow *mWindow = nullptr;
|
||
|
};
|
||
|
|
||
|
void TestMainWindow::initTestCase()
|
||
|
{
|
||
|
mWindow = new MainWindow(mRepo);
|
||
|
}
|
||
|
|
||
|
void TestMainWindow::show()
|
||
|
{
|
||
|
mWindow->show();
|
||
|
QVERIFY(qWaitForWindowActive(mWindow));
|
||
|
}
|
||
|
|
||
|
void TestMainWindow::cleanupTestCase()
|
||
|
{
|
||
|
mWindow->close();
|
||
|
}
|
||
|
|
||
|
TEST_MAIN(TestMainWindow)
|
||
|
|
||
|
#include "main_window.moc"
|