Your SlideShare is downloading. ×
0
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Arquillian JUDCon Brazil
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Arquillian JUDCon Brazil

470

Published on

JUDCon BR talk - April 19, 2013

JUDCon BR talk - April 19, 2013

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
470
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Testes Automatizados!Saturday, April 20, 13
  • 2. Saturday, April 20, 13
  • 3. Olá!Saturday, April 20, 13
  • 4. Olá!• Hanneli (‘H’ mudo)Saturday, April 20, 13
  • 5. Olá!• Hanneli (‘H’ mudo)• @hannelitaSaturday, April 20, 13
  • 6. Olá!• Hanneli (‘H’ mudo)• @hannelita• DevSaturday, April 20, 13
  • 7. Olá!• Hanneli (‘H’ mudo)• @hannelita• Dev• Viciada em caféSaturday, April 20, 13
  • 8. Sessão descarregoSaturday, April 20, 13
  • 9. Quem nunca...Saturday, April 20, 13
  • 10. Mexeu no código deoutra pessoa?Saturday, April 20, 13
  • 11. Saturday, April 20, 13
  • 12. O que aconteceu?• a.• b.• c.Saturday, April 20, 13
  • 13. Você confia 100% nocódigo que vocêescreveu?Saturday, April 20, 13
  • 14. Saturday, April 20, 13
  • 15. Apostas• a. Aposto minha vida• b.Aposto 100 reais• Aposto 1 sorvete• Vou ao banheiro, voltojáSaturday, April 20, 13
  • 16. Balanço do diaSaturday, April 20, 13
  • 17. Saturday, April 20, 13
  • 18. @Statelesspublic class BalancoBean implements Balanco { }Saturday, April 20, 13
  • 19. @Statelesspublic class BalancoBean implements Balanco { }Saturday, April 20, 13
  • 20. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }Saturday, April 20, 13
  • 21. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 22. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 23. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 24. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 25. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 26. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 27. @Statelesspublic class BalancoBean implements Balanco { }public Stringbalanco(List<BigDecimal> valores){ }BigDecimal balanco = new BigDecimal("0.0");for (BigDecimal valor : valores) { balanco.add(valor);}if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 28. Está tudo certo?Saturday, April 20, 13
  • 29. Saturday, April 20, 13
  • 30. Imagine os seguintesvaloresSaturday, April 20, 13
  • 31. Imagine os seguintesvalores136Saturday, April 20, 13
  • 32. Imagine os seguintesvalores136 +148Saturday, April 20, 13
  • 33. Imagine os seguintesvalores136 +148 -136Saturday, April 20, 13
  • 34. Imagine os seguintesvalores136 +148 -136 -148Saturday, April 20, 13
  • 35. Imagine os seguintesvalores136 +148 -136 -148 =0Saturday, April 20, 13
  • 36. Imagine os seguintesvalores136 +148 -136 -148 =0Saturday, April 20, 13
  • 37. Imagine os seguintesvalores136 +148 -136 -148Isso é positivo ounegativo?=0Saturday, April 20, 13
  • 38. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 39. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Saturday, April 20, 13
  • 40. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Falta umifSaturday, April 20, 13
  • 41. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Falta umifif (balanco.compareTo(BigDecimal.ZERO) == 0){ return "nulo";}Saturday, April 20, 13
  • 42. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Falta umifif (balanco.compareTo(BigDecimal.ZERO) == 0){ return "nulo";}Saturday, April 20, 13
  • 43. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Falta umifif (balanco.compareTo(BigDecimal.ZERO) == 0){ return "nulo";}Saturday, April 20, 13
  • 44. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo";} else { return "negativo";}Falta umifif (balanco.compareTo(BigDecimal.ZERO) == 0){ return "nulo";}Saturday, April 20, 13
  • 45. Saturday, April 20, 13
  • 46. Saturday, April 20, 13
  • 47. if (balanco.compareTo(BigDecimal.ZERO) > 0){ return "positivo"; } else { if (balanco.compareTo(BigDecimal.ZERO) == 0){ return "nulo"; } else { return "negativo"; } }Saturday, April 20, 13
  • 48. Código malestruturado!Saturday, April 20, 13
  • 49. Saturday, April 20, 13
  • 50. Por que há tantos bugs?Saturday, April 20, 13
  • 51. Por que há tantos bugs?Saturday, April 20, 13
  • 52. Não há mágica!Saturday, April 20, 13
  • 53. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}Saturday, April 20, 13
  • 54. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}Saturday, April 20, 13
  • 55. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}Saturday, April 20, 13
  • 56. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148Saturday, April 20, 13
  • 57. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148Saturday, April 20, 13
  • 58. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 59. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 60. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 61. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 62. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 63. Não há mágica!@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ [..] }}136+148136-148136-136Saturday, April 20, 13
  • 64. Saturday, April 20, 13
  • 65. Testes AutomatizadosSaturday, April 20, 13
  • 66. JUnitSaturday, April 20, 13
  • 67. JUnitSimplificadoSaturday, April 20, 13
  • 68. JUnit@Testpublic void testMultiply() {}SimplificadoSaturday, April 20, 13
  • 69. JUnit@Testpublic void testMultiply() {}SimplificadoassertEqualsSaturday, April 20, 13
  • 70. JUnit@Testpublic void testMultiply() {}SimplificadoassertEquals( balanco(136, -136));Saturday, April 20, 13
  • 71. JUnit@Testpublic void testMultiply() {}SimplificadoassertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 72. Quem faz testes?Saturday, April 20, 13
  • 73. Vale a pena?Saturday, April 20, 13
  • 74. Pontos positivosSaturday, April 20, 13
  • 75. Pontos positivos• Minimiza bugsSaturday, April 20, 13
  • 76. Pontos positivos• Minimiza bugs• Código maisestruturadoSaturday, April 20, 13
  • 77. Pontos positivos• Minimiza bugs• Código maisestruturado• Chance de quebraro código diminuiSaturday, April 20, 13
  • 78. ProblemasSaturday, April 20, 13
  • 79. Problemas• Não sabia dissoSaturday, April 20, 13
  • 80. Problemas• Não sabia disso• Pode sercomplicado pensarno teste em algunscasosSaturday, April 20, 13
  • 81. Problemas• Não sabia disso• Pode sercomplicado pensarno teste em algunscasos• Gasta tempoSaturday, April 20, 13
  • 82. Complicado escrevertestes?Saturday, April 20, 13
  • 83. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 84. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 85. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 86. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Como ?Saturday, April 20, 13
  • 87. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Como ?BalancoBean bean = new BalancoBean();Saturday, April 20, 13
  • 88. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Como ?BalancoBean bean = new BalancoBean();Saturday, April 20, 13
  • 89. Mesmo sem EJBSaturday, April 20, 13
  • 90. @SessionScopedpublic class BalancoBean {//seu código aqui}Saturday, April 20, 13
  • 91. @SessionScopedpublic class BalancoBean {//seu código aqui}JSF + CDISaturday, April 20, 13
  • 92. Classes que não devemser instanciadasSaturday, April 20, 13
  • 93. Classes que não devemser instanciadasEJBsSaturday, April 20, 13
  • 94. Classes que não devemser instanciadasEJBsManagedBeanSaturday, April 20, 13
  • 95. Classes que não devemser instanciadasEJBsManagedBeanWeb ServicesSaturday, April 20, 13
  • 96. Classes que não devemser instanciadasEJBsManagedBeanWeb ServicesSaturday, April 20, 13
  • 97. Classes que não devemser instanciadasEJBsManagedBeanWeb ServicesCDI BeansSaturday, April 20, 13
  • 98. Saturday, April 20, 13
  • 99. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 100. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean =new AlgumaCoisaMeDeAInstancia();Saturday, April 20, 13
  • 101. Saturday, April 20, 13
  • 102. AlgumaCoisaMeDeAInstanciaSaturday, April 20, 13
  • 103. MockAlgumaCoisaMeDeAInstanciaSaturday, April 20, 13
  • 104. MockAlgumaCoisaMeDeAInstanciaFrameworksSaturday, April 20, 13
  • 105. OpenEJBSaturday, April 20, 13
  • 106. Saturday, April 20, 13
  • 107. • Baixar OpenEJBSaturday, April 20, 13
  • 108. • Baixar OpenEJB• Escrever o testeSaturday, April 20, 13
  • 109. • Baixar OpenEJB• Escrever o teste• Server a parteSaturday, April 20, 13
  • 110. • Baixar OpenEJB• Escrever o teste• Server a parteSaturday, April 20, 13
  • 111. Saturday, April 20, 13
  • 112. JBossSaturday, April 20, 13
  • 113. JBoss@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Saturday, April 20, 13
  • 114. JBoss@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Saturday, April 20, 13
  • 115. JBoss@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}OpenEJBSaturday, April 20, 13
  • 116. Saturday, April 20, 13
  • 117. Saturday, April 20, 13
  • 118. Saturday, April 20, 13
  • 119. Saturday, April 20, 13
  • 120. ClassloaderSaturday, April 20, 13
  • 121. Saturday, April 20, 13
  • 122. JBoss 5Saturday, April 20, 13
  • 123. JBoss 5+Saturday, April 20, 13
  • 124. JBoss 5+Seam 2Saturday, April 20, 13
  • 125. JBoss 5+Seam 2+Saturday, April 20, 13
  • 126. JBoss 5+Seam 2+EJBSaturday, April 20, 13
  • 127. JBoss 5+Seam 2+EJB+Saturday, April 20, 13
  • 128. JBoss 5+Seam 2+EJB+MavenSaturday, April 20, 13
  • 129. JBoss 5+Seam 2+EJB+Maven+Saturday, April 20, 13
  • 130. JBoss 5+Seam 2+EJB+Maven+OpenEJBSaturday, April 20, 13
  • 131. JBoss 5+Seam 2+EJB+Maven+OpenEJB=Saturday, April 20, 13
  • 132. Saturday, April 20, 13
  • 133. Saturday, April 20, 13
  • 134. Maven?Saturday, April 20, 13
  • 135. Falta de ferramentas detestesSaturday, April 20, 13
  • 136. Falta de ferramentas detestesTeste rápido!Saturday, April 20, 13
  • 137. JBoss AS 7Saturday, April 20, 13
  • 138. E os Mocks?Saturday, April 20, 13
  • 139. JEE6Saturday, April 20, 13
  • 140. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 141. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;Saturday, April 20, 13
  • 142. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 143. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 144. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 145. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,Saturday, April 20, 13
  • 146. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;Saturday, April 20, 13
  • 147. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 148. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 149. @Testpublic void testMultiply() {}assertEquals( balanco(136, -136));“nulo”,BalancoBean bean;@InjectSaturday, April 20, 13
  • 150. ArquillianSaturday, April 20, 13
  • 151. public class BalancoTest {}Saturday, April 20, 13
  • 152. public class BalancoTest {}@RunWith(Arquillian.class)Saturday, April 20, 13
  • 153. public class BalancoTest {}@RunWith(Arquillian.class)@InjectBalancoBean balancoBean;Saturday, April 20, 13
  • 154. public class BalancoTest {}@RunWith(Arquillian.class)@InjectBalancoBean balancoBean;@Testpublic void should_balanco_be_null() {Assert.assertEquals(“nulo”,balancoBean.balanco(136, -136));}Saturday, April 20, 13
  • 155. Saturday, April 20, 13
  • 156. @Deploymentpublic static JavaArchive createDeployment() {returnShrinkWrap.create(JavaArchive.class).addClass(BalancoBean.class).addAsManifestResource(EmptyAsset.INSTANCE,"beans.xml");}public class BalancoTest {}Saturday, April 20, 13
  • 157. Saturday, April 20, 13
  • 158. Saturday, April 20, 13
  • 159. JBoss RodandoSaturday, April 20, 13
  • 160. JBoss Rodando@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Saturday, April 20, 13
  • 161. JBoss Rodando@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Saturday, April 20, 13
  • 162. JBoss Rodando@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Arquillian de TestesSaturday, April 20, 13
  • 163. JBoss Rodando@Statelesspublic class BalancoBean implements Balanco { public String balanco(List<BigDecimal> valores){ BigDecimal balanco = new BigDecimal("0.0"); [..] }}Arquillian de TestesSaturday, April 20, 13
  • 164. Referências• https://github.com/arquillian/arquillian-examples• http://arquillian.org/• BECK, Kent.Test Driven Development.Saturday, April 20, 13
  • 165. Obrigada!hannelita@gmail.comTwitter: @hannelitaPerguntas?Saturday, April 20, 13
  • 166. Valeu!Saturday, April 20, 13

×