ref 11724: SAI - Update to StorageHUB
https://support.d4science.org/issues/11724 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@171369 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f83cde44ab
commit
defba72fed
|
@ -3,7 +3,15 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.statisticalalgorithmsimporter;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.Constants;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -11,8 +19,33 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter;
|
|||
*
|
||||
*
|
||||
*/
|
||||
public class StatAlgoImporterTest {
|
||||
public class StatAlgoImporterTest extends TestCase {
|
||||
private static Logger logger = LoggerFactory.getLogger(StatAlgoImporterTest.class);
|
||||
|
||||
@Test
|
||||
public void testSpecialCharacters() {
|
||||
|
||||
if (true) {
|
||||
try {
|
||||
String patternToMatch = "[\\\\!\"#$%&()*+,/:;<=>?@\\[\\]^{|}~]+";
|
||||
Pattern p = Pattern.compile(patternToMatch);
|
||||
String testString = "some text _ -";
|
||||
logger.info("Test: " + testString);
|
||||
Matcher m = p.matcher(testString);
|
||||
boolean characterFound = m.find();
|
||||
logger.info("Found: " + characterFound);
|
||||
assertTrue("Success", true);
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage(), e);
|
||||
fail("Error:" + e.getLocalizedMessage());
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
assertTrue("Success", true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue