Fix dspace-api module per new code style

This commit is contained in:
Tim Donohue
2018-02-14 10:53:46 -06:00
parent 8ffc97f7f9
commit 8a48f782ea
1051 changed files with 53347 additions and 63373 deletions

View File

@@ -7,27 +7,33 @@
*/
package org.dspace.content;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.SQLException;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamService;
import org.junit.*;
import static org.junit.Assert.* ;
import org.apache.log4j.Logger;
import org.dspace.AbstractUnitTest;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.BitstreamService;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* Unit Test for class Thumbnail. The class is a bean (just getters and setters)
* so no specific tests are created.
*
* @author pvillega
*/
public class ThumbnailTest extends AbstractUnitTest
{
public class ThumbnailTest extends AbstractUnitTest {
/** log4j category */
/**
* log4j category
*/
private static final Logger log = Logger.getLogger(ThumbnailTest.class);
protected BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
@@ -56,23 +62,18 @@ public class ThumbnailTest extends AbstractUnitTest
*/
@Before
@Override
public void init()
{
public void init() {
super.init();
try
{
try {
//we have to create a new bitstream in the database
File f = new File(testProps.get("test.bitstream").toString());
thumb = bitstreamService.create(context, new FileInputStream(f));
orig = bitstreamService.create(context, new FileInputStream(f));
t = new Thumbnail(thumb, orig);
}
catch (IOException ex) {
} catch (IOException ex) {
log.error("IO Error in init", ex);
fail("SQL Error in init: " + ex.getMessage());
}
catch (SQLException ex)
{
} catch (SQLException ex) {
log.error("SQL Error in init", ex);
fail("SQL Error in init: " + ex.getMessage());
}
@@ -87,8 +88,7 @@ public class ThumbnailTest extends AbstractUnitTest
*/
@After
@Override
public void destroy()
{
public void destroy() {
thumb = null;
orig = null;
t = null;
@@ -99,8 +99,7 @@ public class ThumbnailTest extends AbstractUnitTest
* Dummy test to avoid initialization errors
*/
@Test
public void testDummy()
{
public void testDummy() {
assertTrue(true);
}
}
}