introduce unit testing

introduce unit testing

shibuya.apk #24

F94fd9d48c737d6d44a348aa3e37b1bc?s=128

takattata

April 13, 2018
Tweet

Transcript

  1. 1 @shibuya.apk #24 ୯ମςετΛ
 Α͏΍͘ೖΕͨʂ Takasy
 @takattata ··ͷͯ͘Μ(Ծ) ຬΛ࣌ͯ͠ҭࣇϞʔυʹొ৔ ϚϚ͞Μ͔ΒΤϯδχΞ·Ͱ༊͢ڧྗͳ༊͠Ωϟϥ

  2. 2 Do you write unit tests? ୯ମςετॻ͍͍ͯ·͔͢ʁ

  3. 3 ͜ͷ-5Ͱ Ұߦ͸
 ςετΛॻ͚ΔΑ͏ʹͳΔʂʂ
 
 
 ͱࢥ͍·͢ɺଟ෼ 
 ˞࣭͸౓֎ࢹ ୯ମςετॻ͍͍ͯ·͔͢ʁ

  4. 4 ˞ͱ͍ͬͯ΋ࣗ෼ͷ஌ࣝྔ͸ ୯ମςετॻ͍͍ͯ·͔͢ʁ ɾຊΛ͞ΒͬͱಡΜͩ͜ͱ͕͋Δ
 ɾ3Y4XJGUΛ࢖͍ͬͯΔJ04ͷςετΛগ͠ॻ͍ͨ ͜ͱ͕͋Δ

  5. 5 Part that I introduced ಋೖͯ͠ΈͨՕॴ

  6. 6 ɾ,PUMJO
 ɾ$MFBO"SDIJUFDUVSF
 ɾ3Y+BWB
 ɾ,PEFJO ɾ""$7JFX.PEFM -JWF%BUB ಋೖͯ͠ΈͨՕॴ ʮ··ͷͯʯͷߏ੒

  7. 7 ର৅%PNBJO %BUB૚ ಋೖͯ͠ΈͨՕॴ 6TF$BTF&OUJUZΛ.PEFMʹͯ͠7.ʹ౉͢ 3FQPTJUPSZ%BUB4UPSFΛ࢖͏*'
 %BUB4UPSF %BP &OUJUZΛऔಘ͢Δ

  8. 8 ର৅%PNBJO %BUB૚ ಋೖͯ͠ΈͨՕॴ ࠓճॻ͍ͨͷ͸ɺ ᶃΫϥεΛ.PDLͰ࡞੒͢Δ
 ᶄ4JOHMF 3Y ͷ஋Λςετ͢Δ
 ᶅಛఆͷؔ਺͕ݺͼग़͞Ε͔ͨΛ֬ೝ͢Δ

  9. 9 ࢖ͬͨϥΠϒϥϦ ಋೖͯ͠ΈͨՕॴ ɾ+6OJU
 ɾ.PDLJUP

  10. 10 .PDLJUP ಋೖͯ͠ΈͨՕॴ ɾpOBM໰୊ͷճආ ࢀߟɿ%SPJE,BJHJͷιʔε
 ˞3PCPMFDUSJD΋࢖ΘΕ͍ͯΔ
 IUUQTHJUIVCDPN%SPJE,BJHJDPOGFSFODFBQQ

  11. 11 ಋೖͯ͠ΈͨՕॴ 6TF$BTF ϓϩμΫτίʔυ ςετίʔυ ᶃ ᶄ ᶅ

  12. 12 ಋೖͯ͠ΈͨՕॴ 3FQPTJUPSZ ϓϩμΫτίʔυ ςετίʔυ ᶃ ᶄ ᶅ

  13. 13 ಋೖͯ͠ΈͨՕॴ ˞ಾ%BUB4UPSF %BP ϓϩμΫτίʔυ

  14. 14 ಋೖͯ͠ΈͨՕॴ ςετίʔυ ˞ಾ%BUB4UPSF %BP

  15. 15 ಋೖͯ͠ΈͨՕॴ ςετίʔυ ˞ಾ%BUB4UPSF %BP ͜Ε.PDLͷςετʹͳͬͯͳ͍ 

  16. 16 What I can do / can not do ग़དྷ͍ͯΔ͜ͱ

    / ͍ͳ͍͜ͱ
  17. 17 ग़དྷ͍ͯΔ͜ͱ ग़དྷ͍ͯΔ͜ͱ͍ͳ͍͜ͱ ɾݺͼग़֬͠ೝ ग़དྷ͍ͯͳ͍͜ͱ ɾ'JSFCBTFͳͲαʔυύʔςΟ΄͔࢖༻࣌ͷςετ
 ɾ3YͷPO&SSPSͷ࣌ͷςετ ͳͲͳͲ৭ʑ

  18. 18 Let’s write unit tests! ͜ΕͰօ͞Μ
 ࠓ೔͔ΒςετΛॻ͚·͢Ͷʂ Ұߦ͸ʂ

  19. 19 ˞ո͍͠7JFX.PEFM ಋೖͯ͠ΈͨՕॴ ௥Ճ͢Δ΋ͷɿ ࢀߟɿhttp://hydrakecat.hatenablog.jp/entry/2016/12/12/ RxJava_%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88%281%29%3A_TestSubscriber%2C_test%28%29%2C_TestScheduler → SubscribeଆͷεϨουΛίϯτϩʔϧ͢Δ

  20. 20 ಋೖͯ͠ΈͨՕॴ ˞ո͍͠7JFX.PEFM