Skip to content

Commit

Permalink
Updated the schedule test for Droidcon-Boston#138.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamMc331 committed Jan 26, 2019
1 parent 5459001 commit 113cd24
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.mentalmachines.droidcon_boston.data

import com.mentalmachines.droidcon_boston.data.Schedule.ScheduleRow
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Assert.*
import org.junit.Test
import java.util.*

Expand Down Expand Up @@ -46,12 +45,22 @@ class ScheduleTest {
}

@Test
fun getSpeakerStringMultipleSpeakers() {
fun getSpeakerStringNoSpeaker() {
val row = ScheduleRow()
assertEquals("", row.getSpeakerString())
}

@Test
fun getSpeakerStringOneSpeaker() {
val row = ScheduleRow()
row.speakerNames = Arrays.asList(s1)
assertEquals(s1, row.getSpeakerString())
}

@Test
fun getSpeakerStringMultipleSpeakers() {
val row = ScheduleRow()
row.speakerNames = Arrays.asList(s1, s2)
val speakerNameString = row.getSpeakerString()!!
assertTrue(speakerNameString.contains(s1))
assertTrue(speakerNameString.contains(s2))
assertEquals("$s1, $s2", row.getSpeakerString())
}
}

0 comments on commit 113cd24

Please sign in to comment.