Advertisement
Guest User

testes.h

a guest
Apr 16th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.74 KB | None | 0 0
  1. #ifndef TESTES_H
  2. #define TESTES_H
  3.  
  4. #include "dominios.h"
  5. #include "entidades.h"
  6.  
  7. using namespace std;
  8.  
  9. class TUNome{
  10. private:
  11.  
  12.     string VALOR_VALIDO = "Fernando";
  13.     string VALOR_INVALIDO = "fernando1";
  14.  
  15.     Nome *nome;
  16.     int estado;
  17.  
  18.     void setUp();
  19.     void tearDown();
  20.     void testarCenarioSucesso();
  21.     void testarCenarioFalha();
  22.  
  23. public:
  24.  
  25.     const static int SUCESSO =  0;
  26.     const static int FALHA   = -1;
  27.  
  28.  
  29.     int run();
  30. };
  31.  
  32. class TUSobrenome{
  33. private:
  34.  
  35.     string VALOR_VALIDO = "Albuquerque";
  36.     string VALOR_INVALIDO = "1albuquerque2";
  37.  
  38.     Sobrenome *sobrenome;
  39.     int estado;
  40.  
  41.     void setUp();
  42.     void tearDown();
  43.     void testarCenarioSucesso();
  44.     void testarCenarioFalha();
  45.  
  46. public:
  47.  
  48.     const static int SUCESSO =  0;
  49.     const static int FALHA   = -1;
  50.  
  51.     int run();
  52. };
  53.  
  54. class TUTelefone{
  55. private:
  56.  
  57.     string VALOR_VALIDO = "61 90123-4567";
  58.     string VALOR_INVALIDO = "61912345678";
  59.  
  60.     Telefone *telefone;
  61.     int estado;
  62.  
  63.     void setUp();
  64.     void tearDown();
  65.     void testarCenarioSucesso();
  66.     void testarCenarioFalha();
  67.  
  68. public:
  69.  
  70.     const static int SUCESSO =  0;
  71.     const static int FALHA   = -1;
  72.  
  73.     int run();
  74. };
  75.  
  76. class TUEndereco{
  77. private:
  78.  
  79.     string VALOR_VALIDO = "UnB Darcy Ribeiro";
  80.     string VALOR_INVALIDO = " UnB  Campus Darcy";
  81.  
  82.     Endereco *endereco;
  83.     int estado;
  84.  
  85.     void setUp();
  86.     void tearDown();
  87.     void testarCenarioSucesso();
  88.     void testarCenarioFalha();
  89.  
  90. public:
  91.  
  92.     const static int SUCESSO =  0;
  93.     const static int FALHA   = -1;
  94.  
  95.     int run();
  96. };
  97.  
  98. class TUData{
  99. private:
  100.  
  101.     string VALOR_VALIDO = "17/04/2018";
  102.     string VALOR_INVALIDO = "17-04-2018";
  103.  
  104.     Data *data;
  105.     int estado;
  106.  
  107.     void setUp();
  108.     void tearDown();
  109.     void testarCenarioSucesso();
  110.     void testarCenarioFalha();
  111.  
  112. public:
  113.  
  114.     const static int SUCESSO =  0;
  115.     const static int FALHA   = -1;
  116.  
  117.     int run();
  118. };
  119.  
  120. class TUEmail{
  121. private:
  122.  
  123.     string VALOR_VALIDO = "email@email.com";
  124.     string VALOR_INVALIDO = "email@1231231.12312";
  125.  
  126.     Email *email;
  127.     int estado;
  128.  
  129.     void setUp();
  130.     void tearDown();
  131.     void testarCenarioSucesso();
  132.     void testarCenarioFalha();
  133.  
  134. public:
  135.  
  136.     const static int SUCESSO =  0;
  137.     const static int FALHA   = -1;
  138.  
  139.     int run();
  140. };
  141.  
  142. class TUSenha{
  143. private:
  144.  
  145.     string VALOR_VALIDO = "Senha123";
  146.     string VALOR_INVALIDO = "senha";
  147.  
  148.     Senha *senha;
  149.     int estado;
  150.  
  151.     void setUp();
  152.     void tearDown();
  153.     void testarCenarioSucesso();
  154.     void testarCenarioFalha();
  155.  
  156. public:
  157.  
  158.     const static int SUCESSO =  0;
  159.     const static int FALHA   = -1;
  160.  
  161.     int run();
  162. };
  163.  
  164. class TUTexto{
  165. private:
  166.  
  167.     string VALOR_VALIDO = "ABASTECIMENTO DE ÁGUA";
  168.     string VALOR_INVALIDO = "";
  169.  
  170.     Texto *texto;
  171.     int estado;
  172.  
  173.     void setUp();
  174.     void tearDown();
  175.     void testarCenarioSucesso();
  176.     void testarCenarioFalha();
  177.  
  178. public:
  179.  
  180.     const static int SUCESSO =  0;
  181.     const static int FALHA   = -1;
  182.  
  183.     int run();
  184. };
  185.  
  186. class TUIdioma{
  187. private:
  188.  
  189.     string VALOR_VALIDO = "POR";
  190.     string VALOR_INVALIDO = "PT";
  191.  
  192.     Idioma *idioma;
  193.     int estado;
  194.  
  195.     void setUp();
  196.     void tearDown();
  197.     void testarCenarioSucesso();
  198.     void testarCenarioFalha();
  199.  
  200. public:
  201.  
  202.     const static int SUCESSO =  0;
  203.     const static int FALHA   = -1;
  204.  
  205.     int run();
  206. };
  207.  
  208. class TUClasseTermo{
  209. private:
  210.  
  211.     string VALOR_VALIDO = "PT";
  212.     string VALOR_INVALIDO = "TP";
  213.  
  214.     ClasseTermo *ctermo;
  215.     int estado;
  216.  
  217.     void setUp();
  218.     void tearDown();
  219.     void testarCenarioSucesso();
  220.     void testarCenarioFalha();
  221.  
  222. public:
  223.  
  224.     const static int SUCESSO =  0;
  225.     const static int FALHA   = -1;
  226.  
  227.     int run();
  228. };
  229.  
  230. class TULeitor{
  231. private:
  232.     Nome *nome;
  233.     Sobrenome *sobrenome;
  234.     Email *email;
  235.     Senha *senha;
  236.  
  237.     string VALOR_VALIDO_NOME = "Fernando";
  238.     string VALOR_VALIDO_SOBRENOME = "Albuquerque";
  239.     string VALOR_VALIDO_EMAIL = "email@email.com";
  240.     string VALOR_VALIDO_SENHA = "Senha1";
  241.  
  242.  
  243.     int estado;
  244.  
  245.     void setUp();
  246.     void tearDown();
  247.     void testarCenarioSucesso();
  248.  
  249. public:
  250.  
  251.     const static int SUCESSO =  0;
  252.     const static int FALHA   = -1;
  253.  
  254.     int run();
  255. };
  256.  
  257. class TUDesenvolvedor{
  258. private:
  259.     Nome *nome;
  260.     Sobrenome *sobrenome;
  261.     Data *data;
  262.     Email *email;
  263.     Senha *senha;
  264.  
  265.     string VALOR_VALIDO_NOME = "Fernando";
  266.     string VALOR_VALIDO_SOBRENOME = "Albuquerque";
  267.     string VALOR_VALIDO_DATA = "17/04/2018";
  268.     string VALOR_VALIDO_EMAIL = "email@email.com";
  269.     string VALOR_VALIDO_SENHA = "Senha1";
  270.  
  271.  
  272.     int estado;
  273.  
  274.     void setUp();
  275.     void tearDown();
  276.     void testarCenarioSucesso();
  277.  
  278. public:
  279.  
  280.     const static int SUCESSO =  0;
  281.     const static int FALHA   = -1;
  282.  
  283.     int run();
  284. };
  285.  
  286. class TUAdministrador{
  287. private:
  288.     Nome *nome;
  289.     Sobrenome *sobrenome;
  290.     Telefone *telefone;
  291.     Data *data;
  292.     Endereco *endereco;
  293.     Email *email;
  294.     Senha *senha;
  295.  
  296.     string VALOR_VALIDO_NOME = "Fernando";
  297.     string VALOR_VALIDO_SOBRENOME = "Albuquerque";
  298.     string VALOR_VALIDO_TELEFONE = "61 91234-5678";
  299.     string VALOR_VALIDO_DATA = "17/04/2018";
  300.     string VALOR_VALIDO_ENDERECO = "UnB Darcy Ribeiro";
  301.     string VALOR_VALIDO_EMAIL = "email@email.com";
  302.     string VALOR_VALIDO_SENHA = "Senha1";
  303.  
  304.     int estado;
  305.  
  306.     void setUp();
  307.     void tearDown();
  308.     void testarCenarioSucesso();
  309.  
  310. public:
  311.  
  312.     const static int SUCESSO =  0;
  313.     const static int FALHA   = -1;
  314.  
  315.     int run();
  316. };
  317.  
  318. class TUVocabularioControlado{
  319. private:
  320.     Nome *nome;
  321.     Idioma *idioma;
  322.     Data *data;
  323.  
  324.     string VALOR_VALIDO_NOME = "Fernando";
  325.     string VALOR_VALIDO_IDIOMA = "POR";
  326.     string VALOR_VALIDO_DATA = "17/04/2018";
  327.  
  328.     int estado;
  329.  
  330.     void setUp();
  331.     void tearDown();
  332.     void testarCenarioSucesso();
  333.  
  334. public:
  335.  
  336.     const static int SUCESSO =  0;
  337.     const static int FALHA   = -1;
  338.  
  339.     int run();
  340. };
  341.  
  342. class TUTermo{
  343. private:
  344.     Nome *nome;
  345.     ClasseTermo *ctermo;
  346.     Data *data;
  347.  
  348.     string VALOR_VALIDO_NOME = "Fernando";
  349.     string VALOR_VALIDO_CTERMO = "PT";
  350.     string VALOR_VALIDO_DATA = "17/04/2018";
  351.  
  352.     int estado;
  353.  
  354.     void setUp();
  355.     void tearDown();
  356.     void testarCenarioSucesso();
  357.  
  358. public:
  359.  
  360.     const static int SUCESSO =  0;
  361.     const static int FALHA   = -1;
  362.  
  363.     int run();
  364. };
  365.  
  366. class TUDefinicao{
  367. private:
  368.     Texto *texto;
  369.     Data *data;
  370.  
  371.     string VALOR_VALIDO_TEXTO = "ABASTECIMENTO DE ÁGUA";
  372.     string VALOR_VALIDO_DATA = "17/04/2018";
  373.  
  374.     int estado;
  375.  
  376.     void setUp();
  377.     void tearDown();
  378.     void testarCenarioSucesso();
  379.  
  380. public:
  381.  
  382.     const static int SUCESSO =  0;
  383.     const static int FALHA   = -1;
  384.  
  385.     int run();
  386. };
  387.  
  388. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement