Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dividing Model into layers and implementing Uni...

Dividing Model into layers and implementing Unit Test

kamui_project

February 26, 2019
Tweet

More Decks by kamui_project

Other Decks in Programming

Transcript

  1. Layer • Presentation: ViewModel • Domain: Service • UseCase: UseCase

    • Infrastructure: Repository Tests Tests Tests Tests
  2. UserViewModel ը໘ϩʔυ࣌ʹ6TFS৘ใΛऔಘ͠ը໘ʹ6TSF৘ใΛ౉͢ GVODVTFS8JUI7JFX8JMM"QQFBS \ JOQVUT WJFX8JMM"QQFBSBT0CTFSWBCMF TVCTDSJCF PO/FYU\<XFBLTFMG> JO TFMG

    EFQFOEFODJFTHFU6TFS6TF$BTFFYFDVUF NBQ $POWFSUFSTIBSFEDPOWFSU5P6TFS #JOEJOH%BUB TVCTDSJCF PO4VDDFTT\<XFBLTFMG> VTFS#JOEJOH%BUB JO TFMG VTFS3FMBZBDDFQU VTFS#JOEJOH%BUB  ^  EJTQPTFE CZTFMG EJTQPTF#BH  ^  EJTQPTFE CZEJTQPTF#BH  ^
  3. UserViewModelTests GVODUFTUը໘ϩʔυ࣌ʹ6TFS৘ใΛऔಘ͠ը໘ʹ6TSF৘ใΛ౉͢͜ͱ \ MFUVTFS6TFS)FMQFSTIBSFEVTFS  $VDLPPͰελϒੜ੒ TUVC NPDL(FU6TFS6TF$BTF \ QSPYZ

    JO XIFO QSPYZFYFDVUF UIFO3FUVSO KVTU VTFS  ^ EP\ MFUVTFS#JOEJOH%BUBTVCKFDUPVUQVUVTFS#JOEJOH%BUBBT0CTFSWBCMF TIBSF SFQMBZ  TDPQFXIJMF$POOFDUFE  VTFS#JOEJOH%BUBTVCTDSJCF EJTQPTFE CZEJTQPTF#BH  ը໘දࣔ WJFX8JMM"QQFBS3FMBZBDDFQU USVF  MFUFWFOUUSZVTFS#JOEJOH%BUBUBLF  UP#MPDLJOH UP"SSBZ  9$5"TTFSU&RVBM FWFOUDPVOU   ^DBUDI\ 9$5'BUJM  ^ ^
  4. UserUseCaseTests GVODUFTU6TFS৘ใऔಘॲཧΛ࣮ߦ͢Δ͜ͱ \ MFUVTFS6TFS)FMQFSTIBSFEVTFS  $VDLPPͰελϒੜ੒ TUVC NPDL6TFS3FQPTJUPSZ \ QSPYZ

    JO XIFO QSPYZpOE UIFO3FUVSO KVTU VTFS  ^ MFUFYFDVUFTVCKFDUFYFDVUF BT0CTFSWBCMF TIBSF SFQMBZ TDPQFXIJMF$POOFDUFE  FYFDVUFTVCTDSJCF EJTQPTFE CZEJTQPTF#BH  EP\ MFUVTFSUSZFYFDVUFUBLF  UP#MPDLJOH MBTU  9$5"TTFSU/PU/JM VTFS  9$5"TTFSU&RVBM VTFSJE   9$5"TTFSU&RVBM VTFSOBNF l͔Ή͍z  9$5"TTFSU&RVBM VTFSBHF   ^DBUDI\ 9$5'BJM  ^ ^
  5. UserRepositoryTests PWFSSJEFGVODTFU6Q \ .PDLJOHKBZͰελϒੜ੒ TUVC IUUQ HFU VSJ4USJOHlVTFSTl KTPO <lJEz

    dׂѪd>  ^ GVODUFTU6TFS৘ใΛ6TFS"QJʹ໰͍߹Θͤͯऔಘ͢Δ͜ͱ \ MFUVTFS6TFS)FMQFSTIBSFEVTFS  MFUpOETVCKFDUpOE BT0CTFSWBCMF TIBSF SFQMBZ TDPQFXIJMF$POOFDUFE  pOETVCTDSJCF EJTQPTFE CZEJTQPTF#BH  MFUFYQFYQFDUBUJPO EFTDSJQUJPOlz  EP\ MFUVTFSUSZpOEUBLF  UP#MPDLJOH TJOHMF  9$5"TTFSU/PU/JM VTFS  9$5"TTFSU&RVBM VTFSJE   ddׂѪdd ^DBUDI\ 9$5'BUJM  ^ ^
  6. In the end • We’re Hiring!!! -> Especially, Developer! •

    Firstly… Let’s have lunch together!