Created
July 12, 2012 04:35
-
-
Save kaiquewdev/3095764 to your computer and use it in GitHub Desktop.
Teste do miojo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest, miojo | |
class MiojoTest( unittest.TestCase ): | |
def test_falha_quando_nao_recebe_entradas( self ): | |
self.assertEquals( False, miojo.cozimento() ) | |
def test_tempo_cozimento_sempre_menor( self ): | |
self.assertEquals( False, miojo.cozimento( 10, 7, 5 ) ) | |
def test_tempo_para_comparacao_do_cozimento( self ): | |
self.assertEquals( True, miojo.cozimento( 3, 7, 5 ) ) | |
def test_tempo_igualado( self ): | |
self.assertEquals( True, miojo.cozimento( 5, 5, 5 ) ) | |
def test_falha_quando_o_primeiro_parametro_for_igual_a_zero( self ): | |
self.assertEquals( False, miojo.cozimento( 0, 7, 5 ) ) | |
def test_falha_quando_a_ou_b_for_zero( self ): | |
self.assertEquals( False, miojo.cozimento( 3, 0, 5 ) ) | |
self.assertEquals( False, miojo.cozimento( 3, 7, 0 ) ) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment