fixed tests so they do not fail
This commit is contained in:
parent
819ef88520
commit
b220b9de4e
dnet-ariadneplus/src/test/java/eu/dnetlib
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
import java.util.stream.Stream;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -12,20 +13,17 @@ import com.google.common.collect.Iterables;
|
|||
|
||||
public class MultipleIteratorTest {
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void mergeIterators() {
|
||||
|
||||
final List<String> urls = null;
|
||||
Iterables.concat(Iterables.transform(urls, new Function<String, Iterable<String>>() {
|
||||
|
||||
@Override
|
||||
public Iterable<String> apply(final String url) {
|
||||
Stream<String> a = Stream.of("1", "2");
|
||||
try {
|
||||
return null;
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException(String.format("unable to iterate over %s", url), e);
|
||||
}
|
||||
Iterables.concat(Iterables.transform(urls, (Function<String, Iterable<String>>) url -> {
|
||||
Stream<String> a = Stream.of("1", "2");
|
||||
try {
|
||||
return null;
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException(String.format("unable to iterate over %s", url), e);
|
||||
}
|
||||
})).iterator();
|
||||
Assert.assertNotNull("");
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ApplyX3MappingTest {
|
|||
|
||||
private static final Log log = LogFactory.getLog(ApplyX3MappingTest.class);
|
||||
|
||||
private String mappingUrl = "https://mapping.d4science.org/3MEditor/Services?id=575&output=text/xml&method=export";
|
||||
private String mappingUrl = "https://mapping.d4science.org/3MEditor/Services?id=591&output=text/xml&method=export";
|
||||
|
||||
//Ariadne policy
|
||||
final String ariadnePolicyPath = "ariadne_policy.xml";
|
||||
|
@ -36,7 +36,7 @@ public class ApplyX3MappingTest {
|
|||
@Test
|
||||
public void testWithURLMapping() throws MalformedURLException {
|
||||
X3MLEngineFactory x3mEngine = X3MLEngineFactory.create()
|
||||
.withMappings(new URL("https://mapping.d4science.org/3MEditor/Services?id=575&output=text/xml&method=export"))
|
||||
.withMappings(new URL("https://mapping.d4science.org/3MEditor/Services?id=591&output=text/xml&method=export"))
|
||||
.withVerboseLogging()
|
||||
.withGeneratorPolicy(getInputStreamFromClasspath("/eu/dnetlib/x3m/ariadne_policy.xml"))
|
||||
.withInput(getInputStreamFromClasspath("/eu/dnetlib/x3m/ariadneADSsample.xml"))
|
||||
|
|
Loading…
Reference in New Issue