todo código é culpado até que se prove o contrário - lab360
DESCRIPTION
Apresentação realizada no LabI/O (2ª edição - 02/06/2012) por Luís Jacintho. www.lab360.com.br | www.lab360.com.br/labioTRANSCRIPT
Todo Código É Culpado Até que Se Prove o Contrário
https://github.com/zenkimoto/ghunit-ocmock-xcode4-template
https://github.com/gabriel/gh-unit
• Um jogador (humano) entrar com seu movimento• Um jogador (máquina) escolher um movimento• Ser capaz de companhar o estado atual do jogo• Verificar se os movimentos são válidos• Começar o jogo• Saber se alguém ganhou• Saber se houve um empate
http://www.sunetos.com/items/2011/10/24/tdd-ios-part-1/
Plan your Plan your attack!attack!
• GameManager interage com GameBoard e jogadores• Inicialmente os jogadores são apenas String
Iniciar com o GameBoard
• Acompanhar o estado atual do jogo
Testar se um movimento é válido
Write a testWrite a test
Write a testWrite a test
Watch it Watch it fails…fails…
Answer Answer your testyour test
Full of WinFull of Win
Plan your Plan your attack!attack!
Tentar movimentar dois diferentes jogadores em duas posições diferentes e validar seus movimentos
Write a testWrite a test
Watch it Watch it fails…fails…
Answer your Answer your testtest
Full of WinFull of Win
RefactorRefactor
RefactorRefactor
Luís [email protected]
@luisfoj