2016-09-08 14:45:08 +02:00
package org.gcube.social_networking.socialutillibrary ;
import java.util.List ;
2016-09-08 22:33:34 +02:00
2016-09-08 14:45:08 +02:00
public class TestUnit {
//@Test
public void testHashtag ( ) {
2017-05-23 11:33:47 +02:00
String text = " This is a test with hashtag #T6 and #T6.1 but also #T6. that has '.' that is useless and #T43.43 and #gcube4.1.0gcore #gcube4.1.0 and (#ga) tewrw and https://www.local.it/#here " ;
2016-09-08 14:45:08 +02:00
List < String > hashtags = Utils . getHashTags ( text ) ;
System . out . println ( " Hashtags are " + hashtags ) ;
}
2016-10-28 15:17:24 +02:00
// @Test
2016-10-06 16:54:45 +02:00
public void extractUrl ( ) {
2016-10-28 15:17:24 +02:00
String url = " http tosajndjsa :httphttps://www.google.tv www.google.cloud www https http (http://digirolamo.com: www.google.it https://next.d4science.org/group/nextnext/data-catalogue?path=/dataset/test_for_visibility " ;
2016-10-06 16:54:45 +02:00
String result = Utils . transformUrls ( url ) ;
System . out . println ( " urls are " + result ) ;
}
2016-09-08 14:45:08 +02:00
}