Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
delete getAndCheckLyricsGivesCorrectAnswerWhenMatch in LyricsBelongGa…
Browse files Browse the repository at this point in the history
…meActivityTest.kt
  • Loading branch information
jiabaow committed Jun 9, 2022
1 parent a6db9ed commit 35deb53
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LyricsBelongGameActivityTest {

private val sleepTime: Long = 5000
private val artistName = "Imagine Dragons"
private val speechInputCorrect = "Just a young gun with a quick fuse"
private val speechInputWrong = "I don't remember the lyrics"
private val lyrics = "Just a young gun with a quick fuse\n" +
"I was uptight, wanna let loose\n" +
Expand Down Expand Up @@ -254,28 +253,6 @@ class LyricsBelongGameActivityTest {
onView(withId(R.id.nextSongLyrics)).check(matches(isDisplayed()))
}


@Test
fun getAndCheckLyricsGivesCorrectAnswerWhenMatch() {

createMockInvocation()
val gameManager = setGameManager()
gameManager.setNextSong()
val intent = Intent(
ApplicationProvider.getApplicationContext(),
LyricsBelongGameActivity::class.java
)
val scn: ActivityScenario<LyricsBelongGameActivity> = ActivityScenario.launch(intent)
val ctx = ApplicationProvider.getApplicationContext() as Context
scn.onActivity { activity ->
activity.getAndCheckLyrics(ctx, Song.songBuilder("", "", "Monday", "Imagine Dragons"), speechInputCorrect, gameManager)
}
/*FIXME: API takes a lot of time to process this request
comment the following lines if this test fail*/
//Thread.sleep(sleepTime)
//assertEquals(true, gameManager.getScore() == 1)
}

@Test
fun bCheckIntentOnEndingForWrongSong() {
createMockInvocation()
Expand Down

0 comments on commit 35deb53

Please sign in to comment.