mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-23 08:27:30 +00:00
25 lines
580 B
Java
25 lines
580 B
Java
package org.thoughtcrime.securesms.linkpreview;
|
||
|
||
import org.junit.Test;
|
||
|
||
import static junit.framework.TestCase.assertFalse;
|
||
import static junit.framework.TestCase.assertTrue;
|
||
|
||
public class LinkPreviewUtilTest {
|
||
|
||
@Test
|
||
public void isLegal_allLatin() {
|
||
assertTrue(LinkPreviewUtil.isLegalUrl("https://signal.org"));
|
||
}
|
||
|
||
@Test
|
||
public void isLegal_latinAndCyrillic() {
|
||
assertFalse(LinkPreviewUtil.isLegalUrl("https://www.аmazon.com"));
|
||
}
|
||
|
||
@Test
|
||
public void isLegal_latinAndGreek() {
|
||
assertFalse(LinkPreviewUtil.isLegalUrl("https://www.αpple.com"));
|
||
}
|
||
}
|