Skip to content

Commit

Permalink
moved integration test to org.fcrepo.integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Mar 20, 2013
1 parent 366ece2 commit 8fd8ddb
Show file tree
Hide file tree
Showing 34 changed files with 59 additions and 40 deletions.
@@ -1,5 +1,5 @@

package org.fcrepo.generator;
package org.fcrepo.integration.generator;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.generator;
package org.fcrepo.integration.generator;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.generator;
package org.fcrepo.integration.generator;

import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.generator;
package org.fcrepo.integration.generator;


import org.apache.http.HttpResponse;
Expand Down
@@ -1,7 +1,10 @@
package org.fcrepo.generator.rdf;
package org.fcrepo.integration.generator.rdf;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;

import org.fcrepo.generator.rdf.JcrPropertiesGenerator;
import org.fcrepo.generator.rdf.TripleGenerator;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.modeshape.jcr.api.JcrTools;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api;
package org.fcrepo.integration.api;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api;
package org.fcrepo.integration.api;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.api;
package org.fcrepo.integration.api;

import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api;
package org.fcrepo.integration.api;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand All @@ -13,7 +13,7 @@
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.util.EntityUtils;
import org.fcrepo.api.AbstractResourceIT;
import org.fcrepo.integration.api.AbstractResourceIT;
import org.junit.Test;

public class FedoraIdentifiersIT extends AbstractResourceIT {
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api;
package org.fcrepo.integration.api;

import static java.util.regex.Pattern.compile;
import static org.junit.Assert.assertEquals;
Expand All @@ -10,7 +10,7 @@
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.util.EntityUtils;
import org.fcrepo.api.AbstractResourceIT;
import org.fcrepo.integration.api.AbstractResourceIT;
import org.junit.Test;

public class FedoraObjectsIT extends AbstractResourceIT {
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api;
package org.fcrepo.integration.api;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.observer;
package org.fcrepo.integration.observer;

import static com.google.common.collect.ImmutableList.copyOf;
import static javax.jms.Session.AUTO_ACKNOWLEDGE;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo;
package org.fcrepo.integration;

import org.junit.Before;
import org.junit.runner.RunWith;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo;
package org.fcrepo.integration;

import static org.fcrepo.services.DatastreamService.createDatastreamNode;
import static org.fcrepo.services.DatastreamService.getDatastream;
Expand All @@ -17,6 +17,7 @@
import javax.jcr.Session;

import org.apache.commons.io.IOUtils;
import org.fcrepo.Datastream;
import org.fcrepo.exception.InvalidChecksumException;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
Expand All @@ -28,7 +29,7 @@ public class DatastreamIT extends AbstractIT {
Repository repo;

@Test
public void testLabel() throws RepositoryException, IOException, InvalidChecksumException {
public void testLabel() throws Exception {
Session session = repo.login();
createObjectNode(session, "testObject");
Node dsNode =
Expand All @@ -39,7 +40,6 @@ public void testLabel() throws RepositoryException, IOException, InvalidChecksum
new Datastream(dsNode).setLabel("Best datastream ever!");
session.save();
session.logout();

session = repo.login();
final Datastream ds = getDatastream("testObject", "testDatastreamNode");
assertEquals("Wrong label!", "Best datastream ever!", ds.getLabel());
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo;
package org.fcrepo.integration;

import static org.fcrepo.services.ObjectService.createObject;
import static org.fcrepo.services.ObjectService.getObject;
Expand All @@ -13,6 +13,7 @@
import javax.jcr.RepositoryException;
import javax.jcr.Session;

import org.fcrepo.FedoraObject;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;

Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.observer;
package org.fcrepo.integration.observer;

import static org.junit.Assert.assertEquals;

Expand All @@ -7,7 +7,8 @@
import javax.jcr.RepositoryException;
import javax.jcr.Session;

import org.fcrepo.AbstractIT;
import org.fcrepo.integration.AbstractIT;
import org.fcrepo.observer.FedoraEvent;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.services;
package org.fcrepo.integration.services;

import static org.fcrepo.services.DatastreamService.createDatastreamNode;
import static org.fcrepo.services.DatastreamService.getDatastream;
Expand All @@ -17,8 +17,8 @@
import javax.jcr.Session;

import org.apache.tika.io.IOUtils;
import org.fcrepo.AbstractIT;
import org.fcrepo.Datastream;
import org.fcrepo.integration.AbstractIT;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;

Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.services;
package org.fcrepo.integration.services;

import static org.fcrepo.services.DatastreamService.createDatastreamNode;
import static org.fcrepo.services.DatastreamService.getDatastream;
Expand All @@ -19,6 +19,7 @@

import org.apache.commons.io.IOUtils;
import org.fcrepo.Datastream;
import org.fcrepo.services.LowLevelStorageService;
import org.fcrepo.utils.FixityResult;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
@@ -1,6 +1,7 @@

package org.fcrepo.services;
package org.fcrepo.integration.services;

import org.fcrepo.services.PathService;
import org.junit.Test;

import static org.fcrepo.services.PathService.getDatastreamJcrNodePath;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.utils;
package org.fcrepo.integration.utils;

import static org.junit.Assert.assertEquals;

Expand All @@ -9,6 +9,7 @@
import javax.jcr.Repository;

import org.apache.commons.io.IOUtils;
import org.fcrepo.utils.LowLevelCacheEntry;
import org.infinispan.configuration.cache.CacheStoreConfiguration;
import org.infinispan.loaders.CacheLoaderManager;
import org.infinispan.loaders.CacheStore;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.utils;
package org.fcrepo.integration.utils;

import static org.fcrepo.services.DatastreamService.createDatastreamNode;
import static org.fcrepo.services.DatastreamService.getDatastream;
Expand Down Expand Up @@ -27,6 +27,8 @@
import org.fcrepo.services.DatastreamService;
import org.fcrepo.services.LowLevelStorageService;
import org.fcrepo.services.ObjectService;
import org.fcrepo.utils.FixityResult;
import org.fcrepo.utils.LowLevelCacheEntry;
import org.junit.Before;
import org.junit.Test;
import org.modeshape.jcr.JcrRepositoryFactory;
Expand Down
@@ -1,19 +1,20 @@
package org.fcrepo.utils.infinispan;
package org.fcrepo.integration.utils.infinispan;

import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.io.IOUtils;
import org.fcrepo.utils.infinispan.StoreChunkInputStream;
import org.infinispan.Cache;
import org.infinispan.loaders.CacheLoaderManager;
import org.infinispan.loaders.CacheStore;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.junit.Test;

public class StoreChunkInputStreamTest {
public class StoreChunkInputStreamIT {

@Test
public void tryRetrievingContentFromInfinispanIT() throws IOException {
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api.legacy;
package org.fcrepo.integration.api.legacy;

import static com.google.common.collect.ImmutableMap.of;
import static org.custommonkey.xmlunit.XMLUnit.setXpathNamespaceContext;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api.legacy;
package org.fcrepo.integration.api.legacy;

import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static java.util.regex.Pattern.DOTALL;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api.legacy;
package org.fcrepo.integration.api.legacy;

import static javax.servlet.http.HttpServletResponse.SC_OK;
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api.legacy;
package org.fcrepo.integration.api.legacy;

import static java.util.regex.Pattern.compile;
import static javax.ws.rs.core.MediaType.TEXT_XML;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.api.legacy;
package org.fcrepo.integration.api.legacy;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.syndication;
package org.fcrepo.integration.syndication;

import static java.lang.Integer.parseInt;
import static java.lang.System.getProperty;
Expand Down
@@ -1,5 +1,5 @@

package org.fcrepo.syndication;
package org.fcrepo.integration.syndication;

import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo;
package org.fcrepo.integration;


import org.apache.http.client.ClientProtocolException;
Expand Down
8 changes: 8 additions & 0 deletions fcrepo-webhooks/pom.xml
Expand Up @@ -71,4 +71,12 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
@@ -1,5 +1,5 @@

package org.fcrepo.webhooks;
package org.fcrepo.integration.webhooks;

import static java.lang.Integer.parseInt;
import static java.lang.System.getProperty;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.webhooks;
package org.fcrepo.integration.webhooks;


import static java.util.regex.Pattern.DOTALL;
Expand Down
@@ -1,4 +1,4 @@
package org.fcrepo.webhooks;
package org.fcrepo.integration.webhooks;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
Expand Down

0 comments on commit 8fd8ddb

Please sign in to comment.