Commit eeb27654bb45e6304f9d253fbbb9715bcac43ae5
1 parent
8105c7fe
Exists in
master
Implementação dos primeiros testes (XML) e (Status 200)
Showing
3 changed files
with
12 additions
and
27 deletions
Show diff stats
cacic-teste/testcacic.cpp
... | ... | @@ -10,24 +10,11 @@ CTestCacic::CTestCacic(QObject *parent) : |
10 | 10 | { |
11 | 11 | } |
12 | 12 | |
13 | -void CTestCacic::installcacicTest() | |
13 | +void CTestCacic::testGetStatus200() | |
14 | 14 | { |
15 | - QProcess installcacic; | |
16 | - QString installcacicPath; | |
15 | + CacicComm a; | |
17 | 16 | |
18 | - installcacicPath = QString("E:/LightBase/cacic-agente-project/builds/install-cacic/debug/install-cacic.exe"); | |
19 | - installcacic.execute(installcacicPath,QStringList() << "--host"); | |
20 | - if (installcacic.waitForFinished() and (installcacic.exitCode() == 0)) | |
21 | - QVERIFY(installcacic.exitCode() == 0); | |
22 | - else | |
23 | - QSKIP("Installcacic ExitCode: " + QString::number(installcacic.exitCode()).toLocal8Bit()); | |
24 | - | |
25 | -} | |
26 | - | |
27 | -void CTestCacic::firstTest() | |
28 | -{ | |
29 | - QString str= "Hello"; | |
30 | - QVERIFY(str.toUpper() == "HELLO"); | |
17 | + QVERIFY(a.commStatus("") == 200); | |
31 | 18 | } |
32 | 19 | |
33 | 20 | ... | ... |
cacic-teste/testcacic.h
1 | 1 | #ifndef TESTINSTALLCACIC_H |
2 | 2 | #define TESTINSTALLCACIC_H |
3 | - | |
3 | +#include "../src/CACIC_comm.h" | |
4 | 4 | #include <QtTest/QtTest> |
5 | 5 | |
6 | 6 | class CTestCacic : public QObject |
... | ... | @@ -14,8 +14,7 @@ signals: |
14 | 14 | public slots: |
15 | 15 | |
16 | 16 | private slots: |
17 | - void firstTest(); | |
18 | - void installcacicTest(); | |
17 | + void testGetStatus200(); | |
19 | 18 | }; |
20 | 19 | |
21 | 20 | #endif // TESTINSTALLCACIC_H | ... | ... |
src/CACIC_comm.h
... | ... | @@ -5,16 +5,15 @@ |
5 | 5 | |
6 | 6 | class CacicComm { |
7 | 7 | public: |
8 | - QString comm(QString urlGerente, request, localFolderName); | |
9 | 8 | |
10 | -}; | |
11 | - | |
12 | -QString CacicComm::comm(QString urlGerente, request, localFolderName){ | |
13 | - QString retorno = '0', | |
14 | - gerColsInfPath = localFolderName + "/gercols.inf", | |
15 | - chksisInfPath = localFolderName + "/chksis.inf"; | |
9 | +QString comm(QString urlGerente, QString request, QString localFolderName){ | |
10 | +// QString retorno = '0', | |
11 | +// gerColsInfPath = localFolderName + "/gercols.inf", | |
12 | +// chksisInfPath = localFolderName + "/chksis.inf"; | |
16 | 13 | //implementar |
17 | - return retorno; | |
14 | + return ""; | |
18 | 15 | } |
19 | 16 | |
17 | +}; | |
18 | + | |
20 | 19 | #endif // CACIC_COMM_H | ... | ... |