ä½ãã¾ããã
ãªããï¼
Robolectricã§Kotlinãããã£ããã§ãããJUnitï¼ã¨ãããhamcrestï¼ã使ãã¥ããã¦ãã
ã¨è¨ã£ã¦ãã1ã¤ã ãã
assertThat(actual, `is`(expected))
ãã®`is`
ããã£ããã¤ã±ã¦ãªãï½
is
ã£ã¦Kotlinã§ã¯äºç´èªãªã®ã§ã`
ã§æ¬ã£ã¦ããå¿
è¦ãããã®ã§ãã
ã§ãä½ãã¾ããã
ãã®åãknitï¼ãããï¼ã
ããããããåé¢ã Kotlin + JUnit ãªæããåºãã¦ããã®ã§æ°ã«å ¥ã£ã¦ãã¾ãã
ãã®knitã«ãã£ã¦ãå ã»ã©ã®ã³ã¼ãã¯æ¬¡ã®ããã«è¨è¿°ã§ãã¾ãã
actual.should be expected
ãããããããã
ä»ã«ãããã¤ãã®ä¾¿å©ãªAPIãç¨æãã¦ãã¾ãã
ããã£ãããã³ã¼ããèªãã§ã¿ã¦ãã ããããã¨âãã ãããããããã¢ã¤ã³ã³ãã¤ãã£ã¦æ¬²ããã