From eeb27654bb45e6304f9d253fbbb9715bcac43ae5 Mon Sep 17 00:00:00 2001 From: LightBase Consultoria em Software Publico Date: Tue, 15 Jul 2014 12:17:34 -0300 Subject: [PATCH] Implementação dos primeiros testes (XML) e (Status 200) --- cacic-teste/testcacic.cpp | 19 +++---------------- cacic-teste/testcacic.h | 5 ++--- src/CACIC_comm.h | 15 +++++++-------- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/cacic-teste/testcacic.cpp b/cacic-teste/testcacic.cpp index 700e6d6..6bd88d3 100644 --- a/cacic-teste/testcacic.cpp +++ b/cacic-teste/testcacic.cpp @@ -10,24 +10,11 @@ CTestCacic::CTestCacic(QObject *parent) : { } -void CTestCacic::installcacicTest() +void CTestCacic::testGetStatus200() { - QProcess installcacic; - QString installcacicPath; + CacicComm a; - installcacicPath = QString("E:/LightBase/cacic-agente-project/builds/install-cacic/debug/install-cacic.exe"); - installcacic.execute(installcacicPath,QStringList() << "--host"); - if (installcacic.waitForFinished() and (installcacic.exitCode() == 0)) - QVERIFY(installcacic.exitCode() == 0); - else - QSKIP("Installcacic ExitCode: " + QString::number(installcacic.exitCode()).toLocal8Bit()); - -} - -void CTestCacic::firstTest() -{ - QString str= "Hello"; - QVERIFY(str.toUpper() == "HELLO"); + QVERIFY(a.commStatus("") == 200); } diff --git a/cacic-teste/testcacic.h b/cacic-teste/testcacic.h index 936992e..647a43f 100644 --- a/cacic-teste/testcacic.h +++ b/cacic-teste/testcacic.h @@ -1,6 +1,6 @@ #ifndef TESTINSTALLCACIC_H #define TESTINSTALLCACIC_H - +#include "../src/CACIC_comm.h" #include class CTestCacic : public QObject @@ -14,8 +14,7 @@ signals: public slots: private slots: - void firstTest(); - void installcacicTest(); + void testGetStatus200(); }; #endif // TESTINSTALLCACIC_H diff --git a/src/CACIC_comm.h b/src/CACIC_comm.h index 0ebaadf..5354bb5 100644 --- a/src/CACIC_comm.h +++ b/src/CACIC_comm.h @@ -5,16 +5,15 @@ class CacicComm { public: - QString comm(QString urlGerente, request, localFolderName); -}; - -QString CacicComm::comm(QString urlGerente, request, localFolderName){ - QString retorno = '0', - gerColsInfPath = localFolderName + "/gercols.inf", - chksisInfPath = localFolderName + "/chksis.inf"; +QString comm(QString urlGerente, QString request, QString localFolderName){ +// QString retorno = '0', +// gerColsInfPath = localFolderName + "/gercols.inf", +// chksisInfPath = localFolderName + "/chksis.inf"; //implementar - return retorno; + return ""; } +}; + #endif // CACIC_COMM_H -- libgit2 0.21.2