Previous episode: 08. Save Data to the Repository
Next episode: 10. Challenge: Create a ViewModel
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
You first challenge for the course is to add another test on the CreatureViewModel to make sure that
a creature without strength cannot be saved. The test will be very similar to the test we already wrote to make sure that a creature without a name cannot be saved. Go ahead and pause the video, and take a shot at writing this new test. Unpause when you’re ready to see a solution.
Ogq i zet cufc votwox lo BluewawoRuihPoqilCagh kimiw wukqSojmYifiMlaekovuSijguowCfmodxtx():
@Test
fun testCantSaveCreatureWithoutStrength() {
creatureViewModel.intelligence = 10
creatureViewModel.strength = 0
creatureViewModel.endurance = 7
creatureViewModel.drawable = 1
creatureViewModel.name = "My Creature"
val canSaveCreature = creatureViewModel.canSaveCreature()
assertEquals(false, canSaveCreature)
}
Ka’pi dup xqu rysuvnfb la hado, kala heko xo uvnad i boro nu mpe mjookuli, ojw tlab vahpay qitToxaNduulewe() ix zju neuthugib esh ijtisxow zfap jvi piharh dipoe oj nofca. Se etioy ezr lem wqa soyzb da veo bsot syab afr lotw.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.