This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63de7d8
commit 03df03c
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...ndroid-commons/src/test/kotlin/io/qameta/allure/android/utils/ResultsUtilsCommonKtTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.qameta.allure.android.utils | ||
|
||
import org.junit.Test | ||
|
||
import org.junit.Assert.* | ||
|
||
class ResultsUtilsCommonKtTest { | ||
|
||
@Test | ||
fun `createIssueLink should return valid url`() { | ||
val id = "ISSUE-11" | ||
val pattern = "https://www.issue.tracker.com/{}" | ||
System.setProperty("allure.link.issue.pattern", pattern) | ||
|
||
val link = createIssueLink(id) | ||
val expectedUrl = pattern.replace("{}", id) | ||
|
||
assertEquals(expectedUrl, link.url) | ||
} | ||
|
||
@Test | ||
fun `createTmsLink should return valid url`() { | ||
val id = "TMS-11" | ||
val pattern = "https://www.issue.tracker.com/{}" | ||
System.setProperty("allure.link.tms.pattern", pattern) | ||
|
||
val link = createTmsLink(id) | ||
val expectedUrl = pattern.replace("{}", id) | ||
|
||
assertEquals(expectedUrl, link.url) | ||
} | ||
|
||
} |