@ -24,7 +24,6 @@ import java.net.URLEncoder
@@ -24,7 +24,6 @@ import java.net.URLEncoder
@RunWith ( RobolectricTestRunner :: class )
class CallIntentDataParserTest {
private val callIntentDataParser = CallIntentDataParser ( )
@Test
@ -117,7 +116,7 @@ class CallIntentDataParserTest {
@@ -117,7 +116,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param appPrompt gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} &appPrompt=true " ,
url = " $VALID _CALL_URL_WITH_PARAM &appPrompt=true" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#? $EXTRA _PARAMS "
)
}
@ -125,7 +124,7 @@ class CallIntentDataParserTest {
@@ -125,7 +124,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param in fragment appPrompt gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #?appPrompt=true " ,
url = " $VALID _CALL_URL_WITH_PARAM #?appPrompt=true" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#?appPrompt=false&confineToRoom=true "
)
}
@ -133,7 +132,7 @@ class CallIntentDataParserTest {
@@ -133,7 +132,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param in fragment appPrompt and other gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #?appPrompt=true&otherParam=maybe " ,
url = " $VALID _CALL_URL_WITH_PARAM #?appPrompt=true&otherParam=maybe" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#?appPrompt=false&otherParam=maybe&confineToRoom=true "
)
}
@ -141,7 +140,7 @@ class CallIntentDataParserTest {
@@ -141,7 +140,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param confineToRoom gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} &confineToRoom=false " ,
url = " $VALID _CALL_URL_WITH_PARAM &confineToRoom=false" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#? $EXTRA _PARAMS "
)
}
@ -149,7 +148,7 @@ class CallIntentDataParserTest {
@@ -149,7 +148,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param in fragment confineToRoom gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #?confineToRoom=false " ,
url = " $VALID _CALL_URL_WITH_PARAM #?confineToRoom=false" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#?confineToRoom=true&appPrompt=false "
)
}
@ -157,7 +156,7 @@ class CallIntentDataParserTest {
@@ -157,7 +156,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url extra param in fragment confineToRoom and more gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #?confineToRoom=false&otherParam=maybe " ,
url = " $VALID _CALL_URL_WITH_PARAM #?confineToRoom=false&otherParam=maybe" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#?confineToRoom=true&otherParam=maybe&appPrompt=false "
)
}
@ -165,7 +164,7 @@ class CallIntentDataParserTest {
@@ -165,7 +164,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url fragment gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #fragment " ,
url = " $VALID _CALL_URL_WITH_PARAM #fragment" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#fragment? $EXTRA _PARAMS "
)
}
@ -173,7 +172,7 @@ class CallIntentDataParserTest {
@@ -173,7 +172,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url fragment with params gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #fragment?otherParam=maybe " ,
url = " $VALID _CALL_URL_WITH_PARAM #fragment?otherParam=maybe" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#fragment?otherParam=maybe& $EXTRA _PARAMS "
)
}
@ -181,7 +180,7 @@ class CallIntentDataParserTest {
@@ -181,7 +180,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with url fragment with other params gets url extracted` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #?otherParam=maybe " ,
url = " $VALID _CALL_URL_WITH_PARAM #?otherParam=maybe" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#?otherParam=maybe& $EXTRA _PARAMS "
)
}
@ -189,7 +188,7 @@ class CallIntentDataParserTest {
@@ -189,7 +188,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with empty fragment` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} # " ,
url = " $VALID _CALL_URL_WITH_PARAM #" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#? $EXTRA _PARAMS "
)
}
@ -197,7 +196,7 @@ class CallIntentDataParserTest {
@@ -197,7 +196,7 @@ class CallIntentDataParserTest {
@Test
fun `Element Call url with empty fragment query` ( ) {
doTest (
url = " ${ VALID_CALL_URL_WITH_PARAM} #? " ,
url = " $VALID _CALL_URL_WITH_PARAM #?" ,
expectedResult = " $VALID _CALL_URL_WITH_PARAM#? $EXTRA _PARAMS "
)
}