Commit facf4f9bbb2433affadc3336780db0b8b13289d4
1 parent
845fdf99
Exists in
master
Criado testcoletaIdOs().
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
cacic-teste/testcacic.cpp
... | ... | @@ -86,6 +86,14 @@ void CTestCacic::testInterfaceDeRede(){ |
86 | 86 | QVERIFY2(!OCacicComp.getNetworkInterface().empty(), "Nenhuma interface de rede encontrada."); |
87 | 87 | } |
88 | 88 | |
89 | +void CTestCacic::testcoletaIdOs(){ | |
90 | + // instancia um OperatingSystem que invoca coletaIdOs() no construtor | |
91 | + OperatingSystem OS; | |
92 | + | |
93 | +// QVERIFY(OS.getIdOs() == OperatingSystem::LINUX_ARCH); | |
94 | + QVERIFY(OS.getIdOs() != -1); | |
95 | +} | |
96 | + | |
89 | 97 | void CTestCacic::testpegarOS(){ |
90 | 98 | //basta que seja um retorno válido, não precisa validar todos. |
91 | 99 | QVERIFY(OCacicComp.getOs().getIdOs() != -1 ); | ... | ... |
cacic-teste/testcacic.h
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | #include <ccacic.h> |
6 | 6 | #include <cacic_computer.h> |
7 | 7 | #include <console.h> |
8 | +#include <operatingsystem.h> | |
8 | 9 | #include <QtTest/QtTest> |
9 | 10 | #include <QDebug> |
10 | 11 | #include <QList> |
... | ... | @@ -47,6 +48,7 @@ private slots: |
47 | 48 | void testConsole(); |
48 | 49 | void testPegarUsu(); |
49 | 50 | void testJsonValueFromJsonString(); |
51 | + void testcoletaIdOs(); | |
50 | 52 | void testpegarOS(); |
51 | 53 | void testLogin(); |
52 | 54 | void testSslConnection(); | ... | ... |