Guest User

Untitled

a guest
Jun 17th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #@author Rafael Salomao <rafaelgavazzi at gmail.com>
  2. #@author Natalia Marcondes < natalia.marcondes at gmail.com>
  3. #@author Marco Moura <email at marcomoura.com>
  4. #@author Luciana Mendes <super.luci at gmail.com>
  5. #@author Carlos Eduardo <kaddxxi at gmail.com>
  6. #@author Patricia Carvalho <patfcarv at gmail.com>
  7.  
  8.  
  9. import unittest
  10.  
  11. from Miojo import Miojo
  12.  
  13.  
  14. class Test_miojoTestCase(unittest.TestCase):
  15.  
  16. def test_verificar_A_B_maior_tempo(self):
  17. self.assertEqual(True,Miojo.verificatempo(3,5,7));
  18.  
  19. def test_verificar_A_B_menor_tempo(self):
  20. self.assertEqual(False,Miojo.verificatempo(8,5,7));
  21.  
  22. def test_verificar_tempo_menor_A_maior_B(self):
  23. self.assertEqual(False,Miojo.verificatempo(6,5,7));
  24.  
  25. def test_ampulheta_A1_menos_A2_tempo_ok(self):
  26. retorno = Miojo.qualTempoDePreparo(2,7,5)
  27. self.assertEqual(7,retorno)
  28.  
  29. def test_ampulheta_A1_menos_A2_igual_preparo(self):
  30. retorno = Miojo.qualTempoDePreparo(3,8,5)
  31. self.assertEqual(8,retorno)
  32.  
  33. def test_ampulheta_A2_menos_A1_igual_preparo(self):
  34. retorno = Miojo.qualTempoDePreparo(3,5,8)
  35. self.assertEqual(8,retorno)
  36.  
  37. def test_ampulheta_A2_menos_A1_diferente_preparo(self):
  38. retorno = Miojo.qualTempoDePreparo(3,8,4)
  39. self.assertEqual(8,retorno)
  40.  
  41. if __name__ == '__main__':
  42. unittest.main()
Add Comment
Please, Sign In to add comment