mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 19:13:18 +00:00
Several Unit test fixes. Add a Mock Indexer for Solr. Add a language for primary test Eperson. Do better context cleanup. Improve fail messages with actual errors.
This commit is contained in:
@@ -58,12 +58,12 @@ public class BitstreamTest extends AbstractDSpaceObjectTest
|
||||
}
|
||||
catch (IOException ex) {
|
||||
log.error("IO Error in init", ex);
|
||||
fail("SQL Error in init");
|
||||
fail("SQL Error in init: " + ex.getMessage());
|
||||
}
|
||||
catch (SQLException ex)
|
||||
{
|
||||
log.error("SQL Error in init", ex);
|
||||
fail("SQL Error in init");
|
||||
fail("SQL Error in init: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,8 @@ public class BitstreamTest extends AbstractDSpaceObjectTest
|
||||
{
|
||||
File f = new File(testProps.get("test.bitstream").toString());
|
||||
Bitstream created = Bitstream.create(context, new FileInputStream(f));
|
||||
context.commit();
|
||||
|
||||
//the item created by default has no name nor type set
|
||||
assertThat("testCreate 0", created.getFormat().getMIMEType(), equalTo("application/octet-stream"));
|
||||
assertThat("testCreate 1", created.getName(), nullValue());
|
||||
|
Reference in New Issue
Block a user