Skip to content

Commit

Permalink
correct Kdoc and test
Browse files Browse the repository at this point in the history
  • Loading branch information
subhajitxyz committed Nov 11, 2024
1 parent 277fabb commit 2c505b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ data class GitHubIssue(
@Json(name = "pull_request") val pullRequest: PullRequestInfo? = null
)

/**
* Data class representing information about a pull request associated with a GitHub issue.
*
* @property url the URL of the pull request, if it exists. This provides the link to the specific
* pull request associated with the issue on GitHub.
*/
@JsonClass(generateAdapter = true)
data class PullRequestInfo(
@Json(name = "url") val url: String? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,19 @@ class TodoOpenCheckTest {
tempFile1.writeText(testContent1)
tempFile2.writeText(testContent2)

runScript()
val exception = assertThrows<Exception>() { runScript() }

assertThat(outContent.toString().trim()).isEqualTo(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR)
assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR)
val failureMessage =
"""
TODOs not corresponding to open issues on GitHub:
- TempFile2.kt:1
$wikiReferenceNote
$regenerateNote
""".trimIndent()
assertThat(outContent.toString().trim()).isEqualTo(failureMessage)
}

private fun setUpGitHubService(
Expand Down

0 comments on commit 2c505b0

Please sign in to comment.