Guest User

Untitled

a guest
Jul 5th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 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. import unittest
  9. from ReversedNum import ReversedNum
  10.  
  11. class New_TestCase(unittest.TestCase):
  12.  
  13. def test_reverte_quarenta_dois(self):
  14. quarenta_dois = ReversedNum.revert(42)
  15. self.assertEqual(24, quarenta_dois)
  16.  
  17. def test_reverte_trinta_quatro(self):
  18. trinta_quatro = ReversedNum.revert(34)
  19. self.assertEqual(43, trinta_quatro)
  20.  
  21. def test_reverte_cento_trinta_quatro(self):
  22. cento_trinta_quatro = ReversedNum.revert(134)
  23. self.assertEqual(431, cento_trinta_quatro)
  24.  
  25. def test_reverte_cento_e_tres(self):
  26. cento_e_tres = ReversedNum.revert(103)
  27. self.assertEqual(301, cento_e_tres)
  28.  
  29. def test_somar_24_com_1(self):
  30. vinte_cinco = ReversedNum.somar(24,1)
  31. self.assertEqual(25, vinte_cinco)
  32.  
  33. def test_somar_24_com_1_converte_34(self):
  34. trinta_e_quatro = ReversedNum.revertersoma(24,1)
  35. self.assertEqual(34, trinta_e_quatro)
  36.  
  37. def test_somar_305_com_794_converte_1(self):
  38. um = ReversedNum.revertersoma(305,794)
  39. self.assertEqual(1, um)
  40.  
  41. def test_separar_24_e_1(self):
  42. trinta_e_quatro = ReversedNum.separar("24 1")
  43. self.assertEqual(34, trinta_e_quatro)
  44.  
  45.  
  46.  
  47. if __name__ == '__main__':
  48. unittest.main()
Add Comment
Please, Sign In to add comment