Skip to content
Snippets Groups Projects
Commit 6245caa1 authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

Removed deprecations from tests

parent 550275d3
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@
import java.net.URLConnection;
import com.google.common.io.ByteStreams;
import com.google.common.io.NullOutputStream;
public abstract class AbstractIntegrationTest {
......@@ -42,7 +41,7 @@ protected HttpURLConnection createRequest(final String request)
protected long readContents(final URLConnection connection) throws IOException {
final InputStream content = connection.getInputStream();
final long realLength = ByteStreams.copy(content,
new NullOutputStream());
ByteStreams.nullOutputStream());
return realLength;
}
......
package info.textgrid.services.aggregator;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import info.textgrid.middleware.confclient.ConfservClientConstants;
import info.textgrid.middleware.tgsearch.client.SearchClient;
import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.TGCrudService;
......
......@@ -16,9 +16,8 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
import junit.framework.Assert;
import org.apache.cxf.helpers.IOUtils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
......
......@@ -7,7 +7,6 @@
import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ObjectNotFoundFault;
import info.textgrid.services.aggregator.ITextGridRep;
import info.textgrid.services.aggregator.TextGridRepProvider;
import info.textgrid.services.aggregator.teicorpus.TEIHeaderStack;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException;
......@@ -15,8 +14,7 @@
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import junit.framework.Assert;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
......@@ -44,17 +42,17 @@ public void extracted() throws ObjectNotFoundFault, MetadataParseFault,
@Test
public void testGenerateCommonDOM() throws ParserConfigurationException,
JAXBException {
Document document = stack.generateCommonDOM();
final Document document = stack.generateCommonDOM();
Assert.assertNotNull(document);
NodeList childNodes = document.getDocumentElement().getChildNodes();
final NodeList childNodes = document.getDocumentElement().getChildNodes();
Assert.assertTrue("No child nodes :-(", childNodes.getLength() > 0);
}
@Test
public void testLoadStylesheet() throws TransformerConfigurationException {
Templates stylesheet = stack.getStylesheet();
final Templates stylesheet = stack.getStylesheet();
Assert.assertNotNull(stylesheet);
Transformer transformer = stylesheet.newTransformer();
final Transformer transformer = stylesheet.newTransformer();
Assert.assertNotNull(transformer);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment