-
Notifications
You must be signed in to change notification settings - Fork 11
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
9034693
commit c4f6651
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
...cesdk/networking/EmbraceUrlAdapterTest.kt → ...acesdk/comms/api/EmbraceUrlAdapterTest.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
24 changes: 24 additions & 0 deletions
24
embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/comms/api/EmbraceUrlTest.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,24 @@ | ||
package io.embrace.android.embracesdk.comms.api | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Assert.assertNotEquals | ||
import org.junit.Test | ||
|
||
internal class EmbraceUrlTest { | ||
@Test | ||
fun `test equality`() { | ||
val embraceUrl1 = EmbraceUrl.create("https://embrace.io") | ||
val embraceUrl2 = EmbraceUrl.create("https://embrace.io") | ||
val embraceUrl3 = EmbraceUrl.create("http://embrace.io") | ||
val embraceUrl4 = EmbraceUrl.create("https://embrace.wtf") | ||
val embraceUrl5 = EmbraceUrl.create("https://embrace.io?err=1") | ||
val embraceUrl6 = EmbraceUrl.create("https://embrace.io:8080") | ||
|
||
assertEquals(embraceUrl1, embraceUrl1) | ||
assertEquals(embraceUrl1, embraceUrl2) | ||
assertNotEquals(embraceUrl1, embraceUrl3) | ||
assertNotEquals(embraceUrl1, embraceUrl4) | ||
assertNotEquals(embraceUrl1, embraceUrl5) | ||
assertNotEquals(embraceUrl1, embraceUrl6) | ||
} | ||
} |