Skip to content

Commit

Permalink
[MINOR] Add import
Browse files Browse the repository at this point in the history
  • Loading branch information
hossain-khan committed Jan 1, 2024
1 parent 2814c16 commit c8fa480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.hossain.githubstats.service

import com.google.common.truth.Truth
import com.google.common.truth.Truth.assertThat
import dev.hossain.githubstats.io.Client
import dev.hossain.githubstats.model.Issue
import dev.hossain.githubstats.util.ErrorProcessor
Expand Down Expand Up @@ -60,7 +61,7 @@ internal class IssueSearchPagerServiceTest {

val githubIssueResults: List<Issue> = issueSearchPager.searchIssues("search-query")

Truth.assertThat(githubIssueResults).hasSize(0)
assertThat(githubIssueResults).hasSize(0)
}

@Test
Expand All @@ -69,7 +70,7 @@ internal class IssueSearchPagerServiceTest {

val githubIssueResults: List<Issue> = issueSearchPager.searchIssues("search-query")

Truth.assertThat(githubIssueResults).hasSize(1)
assertThat(githubIssueResults).hasSize(1)
}

@Test
Expand All @@ -87,13 +88,13 @@ internal class IssueSearchPagerServiceTest {

val githubIssueResults: List<Issue> = issueSearchPager.searchIssues("search-query")

Truth.assertThat(githubIssueResults).hasSize(24)
assertThat(githubIssueResults).hasSize(24)
}

// region: Test Utility Functions
/** Provides response for given [jsonResponseFile] path in the test resources. */
private fun respond(jsonResponseFile: String): String {
return IssueSearchPagerServiceTest::class.java.getResource("/$jsonResponseFile")!!.readText()
return requireNotNull(IssueSearchPagerServiceTest::class.java.getResource("/$jsonResponseFile")).readText()
}
// endregion: Test Utility Functions
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal class TimelineEventsPagerServiceTest {
// region: Test Utility Functions
/** Provides response for given [jsonResponseFile] path in the test resources. */
private fun respond(jsonResponseFile: String): String {
return TimelineEventsPagerServiceTest::class.java.getResource("/$jsonResponseFile")!!.readText()
return requireNotNull(TimelineEventsPagerServiceTest::class.java.getResource("/$jsonResponseFile")).readText()
}
// endregion: Test Utility Functions
}

0 comments on commit c8fa480

Please sign in to comment.