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 ) ;
}
2017-11-08 16:30:10 +01:00
//@Test
2016-10-06 16:54:45 +02:00
public void extractUrl ( ) {
2017-11-08 16:30:10 +01:00
String url = " https://virtuoso.parthenos.d4science.org/sparql?default-graph-uri=&query=%09SELECT+%3Fp+%28COUNT%28%3Fp%29+as+%3FpCount%29++%0D%0A%09%09%09%09%09WHERE+%7B%5B%5D+%3Fp+%5B%5D%7D%0D%0A%09%09%09%09%09GROUP+BY+%3Fp&format=text%2Fhtml&timeout=0&debug=on " ;
String result = Utils . extractURL ( url ) ;
2016-10-06 16:54:45 +02:00
System . out . println ( " urls are " + result ) ;
}
2016-09-08 14:45:08 +02:00
}